# Path: OSMTagFinder/wordforms/constants.py
# ALL_WORDNET_WORDS = set()
# 
# CONJUGATED_VERB_LIST = []
# 
# ADJECTIVE_TO_ADVERB = {"good" : "well", "fast" : "fast", "hard" : "hard",
#                        "late" : "late", "early" : "early", "daily" : "daily",
#                        "straight" : "straight"}


    from nltk.corpus import wordnet as wn
from .constants import (ALL_WORDNET_WORDS, CONJUGATED_VERB_LIST,
                        ADJECTIVE_TO_ADVERB)
    import nltk
import inflect
                new_lemmas.append(new_lemma)
    while len(new_lemmas) > 0:
        all_lemmas_for_new_words = []
        for new_lemma in new_lemmas:
            word = new_lemma.name()
            all_lemmas_for_this_word = [lemma for ss in wn.synsets(word)
                                        for lemma in ss.lemmas()
                                        if lemma.name() == word]
            for lemma in all_lemmas_for_this_word:
                if not belongs(lemma, all_lemmas_for_new_words):
                    all_lemmas_for_new_words.append(lemma)
        all_related_lemmas += all_lemmas_for_new_words
        new_lemmas = []
        for lemma in all_lemmas_for_new_words:
            for new_lemma in (lemma.derivationally_related_forms() +
                              lemma.pertainyms()):
                if (not belongs(new_lemma, all_related_lemmas) and
                not belongs(new_lemma, new_lemmas)):
                    new_lemmas.append(new_lemma)
    return all_related_lemmas

def singularize(noun):
    """
    args
        - noun : a noun e.g "man"

    returns the singular form of the word if it finds one. Otherwise,
    returns the word itself.
    """
    singular = inflect.engine().singular_noun(noun)

# Path: OSMTagFinder/wordforms/constants.py
# ALL_WORDNET_WORDS = set()
# 
# CONJUGATED_VERB_LIST = []
# 
# ADJECTIVE_TO_ADVERB = {"good" : "well", "fast" : "fast", "hard" : "hard",
#                        "late" : "late", "early" : "early", "daily" : "daily",
#                        "straight" : "straight"}


# Path: OSMTagFinder/wordforms/word_forms.py
    from nltk.corpus import wordnet as wn
from .constants import (ALL_WORDNET_WORDS, CONJUGATED_VERB_LIST,
                        ADJECTIVE_TO_ADVERB)
    import nltk
import inflect

                new_lemmas.append(new_lemma)
    while len(new_lemmas) > 0:
        all_lemmas_for_new_words = []
        for new_lemma in new_lemmas:
            word = new_lemma.name()
            all_lemmas_for_this_word = [lemma for ss in wn.synsets(word)
                                        for lemma in ss.lemmas()
                                        if lemma.name() == word]
            for lemma in all_lemmas_for_this_word:
                if not belongs(lemma, all_lemmas_for_new_words):
                    all_lemmas_for_new_words.append(lemma)
        all_related_lemmas += all_lemmas_for_new_words
        new_lemmas = []
        for lemma in all_lemmas_for_new_words:
            for new_lemma in (lemma.derivationally_related_forms() +
                              lemma.pertainyms()):
                if (not belongs(new_lemma, all_related_lemmas) and
                not belongs(new_lemma, new_lemmas)):
                    new_lemmas.append(new_lemma)
    return all_related_lemmas

def singularize(noun):
    """
    args
        - noun : a noun e.g "man"

    returns the singular form of the word if it finds one. Otherwise,
    returns the word itself.
    """
    singular = inflect.engine().singular_noun(noun)

    if singular in ALL_WORDNET_WORDS: