# Path: pycryptics/utils/synonyms.py
# def cached_synonyms(x, length=None):
#     x = x.lower()
#     if x in SYNONYMS:
#         syns = [s for s in SYNONYMS[x] if (not length) or (len(s) <= length)]
#         return set(syns)
#     else:
#         return set([])


from pycryptics.utils.synonyms import cached_synonyms
from nltk.corpus import wordnet as wn


def semantic_similarity(word1, word2):
    words1 = word1.split('_')
    words2 = word2.split('_')
    if fast_semantic_similarity(word1, word2) == 1:
        return 1

# Path: pycryptics/utils/synonyms.py
# def cached_synonyms(x, length=None):
#     x = x.lower()
#     if x in SYNONYMS:
#         syns = [s for s in SYNONYMS[x] if (not length) or (len(s) <= length)]
#         return set(syns)
#     else:
#         return set([])


# Path: pycryptics/utils/language.py
from pycryptics.utils.synonyms import cached_synonyms
from nltk.corpus import wordnet as wn



def semantic_similarity(word1, word2):
    words1 = word1.split('_')
    words2 = word2.split('_')
    if fast_semantic_similarity(word1, word2) == 1:
        return 1

    max_p = 0