Skip to content

Commit

Permalink
non tc expressions are case sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoppiano committed Nov 26, 2021
1 parent 87fd683 commit 5fa1a1c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions grobid_superconductors/linking/linking_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,16 +443,17 @@ def process_doc(self, doc):

tc_expressions = list(filter(lambda w: w.ent_type_ in ['<tc>', 'tc'], doc))

tc_expressions_standard = ["superconductivity"]

# This is case sensitive
non_tc_expressions_before = ["T N", "TN", "t n", "tn", "Curie", "curie", "Neel", "neel", "at T ", "at T =",
"at T=",
"is suppressed at ", "ΔT c", "ΔTc", "Δ T c", "T =", "T=", "T = ", "T= "]

# This is case insensitive
tc_expressions_before = ["superconducts at", "superconductive at around",
"superconducts around", "superconductivity at",
"superconductivity around", "exibits superconductivity at",
"T c =", "Tc ="]

# This is case insensitive
non_tc_expressions_after = ['higher', 'lower']

marked_as_tc = []
Expand Down Expand Up @@ -488,8 +489,8 @@ def process_doc(self, doc):
continue

for non_tc in non_tc_expressions_before:
if temp.i - len(non_tc.split(" ")) >= 0 and str.lower(doc[
temp.i - len(non_tc.split(" ")):temp.i].text) == non_tc:
if temp.i - len(non_tc.split(" ")) >= 0 and doc[
temp.i - len(non_tc.split(" ")):temp.i].text == non_tc:
marked_as_non_tc.append(temp)
break

Expand Down

0 comments on commit 5fa1a1c

Please sign in to comment.