Skip to content

Commit e7f6724

Browse files
authored
fixed the synset.pos call
fixed the synset.pos call and a spelling mistake
1 parent 9a5622f commit e7f6724

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nltk/app/wordnet_app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def get_relations_data(word, synset):
414414
),
415415
),
416416
)
417-
elif synset.pos() == wn.ADJ or synset.pos == wn.ADJ_SAT:
417+
elif synset.pos() == wn.ADJ or synset.pos() == wn.ADJ_SAT:
418418
return (
419419
(ANTONYM, "Antonym", lemma_property(word, synset, lambda l: l.antonyms())),
420420
(SIMILAR, "Similar to", synset.similar_tos()),
@@ -435,7 +435,7 @@ def get_relations_data(word, synset):
435435
)
436436
# Derived from adjective - not supported by corpus
437437
else:
438-
raise TypeError("Unhandles synset POS type: " + str(synset.pos()))
438+
raise TypeError("Unhandled synset POS type: " + str(synset.pos()))
439439

440440

441441
html_header = """

0 commit comments

Comments
 (0)