Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)
Determines if a word is an adjective

:param string word: a word

:return: True if the word is recognized as an adjective, False else. 

        def is_an_adj(word):
    """Determines if a word is an adjective

    :param string word: a word

    :return: True if the word is recognized as an adjective, False else. 
    """

    #It is a noun verb pronoun or determinant so we have to return False
    if word in ResourcePool().special_nouns + ResourcePool().special_verbs + ResourcePool().pronouns + ResourcePool().determinants:
        return False

    #For the regular adjectives
    for k in ResourcePool().adjective_rules:
        if word.endswith(k):
            return True

    #For adjectives created from numbers
    if word.endswith('th') and other_functions.number(word) == 2:
        return True

    #We use the irregular adjectives list to find it
    if word in list(
            ResourcePool().adjectives.keys()) + ResourcePool().adjective_numbers + ResourcePool().adj_quantifiers:
        return True

    return False
        


src/d/i/Dialogs-0.13/src/dialogs/parsing/preprocessing.py   Dialogs(Download)
        sentence = analyse_nominal_group.find_plural(sentence)
        #If it still start with adjective
        if analyse_nominal_group.is_an_adj(sentence[0]) == 1:
            sentence = ['the'] + sentence
 
        sentence = analyse_nominal_group.find_plural(sentence)
        #If it still start with adjective
        if analyse_nominal_group.is_an_adj(sentence[0]) == 1:
            sentence = ['the'] + sentence
 
    while i < len(sentence) - 1:
        if sentence[i] == ',' or sentence[i] == 'and':
            if analyse_nominal_group.is_an_adj(sentence[i + 1]) and analyse_nominal_group.is_an_adj(sentence[i - 1]):
                if other_functions.number(sentence[i + 1]) == 0 and other_functions.number(sentence[i - 1]) == 0:
                    sentence = sentence[:i] + sentence[i + 1:]