Commit ·
5f0a85a
1
Parent(s): d721629
Update helper.py
Browse files
helper.py
CHANGED
|
@@ -67,7 +67,6 @@ def find_comptives_straight_patterns(sentence):
|
|
| 67 |
|
| 68 |
# this part is to check what will be before more/less. We can add a NOUN as mandatory (e.g magnitude) or even specifically the word magnitude
|
| 69 |
# for the moment we have disable it
|
| 70 |
-
# if prev_token.pos_ == "NOUN":
|
| 71 |
|
| 72 |
if token.text.lower() == 'more':
|
| 73 |
comparatives.append({'comparative': [token.text+" "+next_token.text, '>']})
|
|
@@ -366,19 +365,6 @@ def single_verb_comptives(sentence):
|
|
| 366 |
equal_list.append({'comparative': [token.text, "="]})
|
| 367 |
break
|
| 368 |
|
| 369 |
-
# for syn in synsets:
|
| 370 |
-
# antonyms = syn.lemmas()[0].antonyms()
|
| 371 |
-
|
| 372 |
-
# if antonyms and any(lemma in bigger_references_sg for lemma in antonyms[0].name()):
|
| 373 |
-
# return 0
|
| 374 |
-
|
| 375 |
-
# elif antonyms and any(lemma in lesser_references_sg for lemma in antonyms[0].name()):
|
| 376 |
-
# return 0
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
# elif antonyms and any(lemma in equal_references_sg for lemma in antonyms[0].name()):
|
| 380 |
-
# return 0
|
| 381 |
-
|
| 382 |
final_list = bigger_list + smaller_list + equal_list
|
| 383 |
|
| 384 |
if final_list:
|
|
|
|
| 67 |
|
| 68 |
# this part is to check what will be before more/less. We can add a NOUN as mandatory (e.g magnitude) or even specifically the word magnitude
|
| 69 |
# for the moment we have disable it
|
|
|
|
| 70 |
|
| 71 |
if token.text.lower() == 'more':
|
| 72 |
comparatives.append({'comparative': [token.text+" "+next_token.text, '>']})
|
|
|
|
| 365 |
equal_list.append({'comparative': [token.text, "="]})
|
| 366 |
break
|
| 367 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 368 |
final_list = bigger_list + smaller_list + equal_list
|
| 369 |
|
| 370 |
if final_list:
|