Feat: skip s words
This commit is contained in:
4
main.py
4
main.py
@ -45,8 +45,10 @@ def get_words():
|
|||||||
if pos == 'n':
|
if pos == 'n':
|
||||||
# Use WordNet's morphy to get base form
|
# Use WordNet's morphy to get base form
|
||||||
base_form = wn.morphy(word, pos='n')
|
base_form = wn.morphy(word, pos='n')
|
||||||
if word.endswith("ing"):
|
if word.endswith("ing"): # possibly remove all words ending with s ( a lot of abstract words and plurals got in)
|
||||||
continue # winning, twisiting; only want win, twist or feelings
|
continue # winning, twisiting; only want win, twist or feelings
|
||||||
|
if word.endswith("s") and not word.endswith("ss"):
|
||||||
|
continue # leave dutschess but skip provisions
|
||||||
# If base form matches the word, it's singular/uncountable
|
# If base form matches the word, it's singular/uncountable
|
||||||
if base_form == word:
|
if base_form == word:
|
||||||
nouns.add(word)
|
nouns.add(word)
|
||||||
|
Reference in New Issue
Block a user