Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Function return 1 if the word is a number and 2 if it is a adjective-number                    
Input=word          Output=flag(0 if no number or 1 if number or 2 adjective-number)        

        def number(word):
    """
    Function return 1 if the word is a number and 2 if it is a adjective-number                    
    Input=word          Output=flag(0 if no number or 1 if number or 2 adjective-number)        
    """

    for n in ResourcePool().numbers:
        if word.startswith(n[1]):
            return 1

        if word.startswith(n[0]):
            #We have adjective-number 
            if word.endswith('th'):
                return 2
            else:
                return 1
    return 0
        


src/d/i/Dialogs-0.13/src/dialogs/verbalization/utterance_rebuilding.py   Dialogs(Download)
 
    #For adjectives created from numbers
    if phrase[word_pos].endswith('th') and other_functions.number(phrase[word_pos]) == 2:
        return 1 + adjective_pos(phrase, word_pos + 1)
 
 
            #If there is a number, it will be the same with determinant
    if other_functions.number(phrase[begin_pos]) == 1:
        end_pos += adjective_pos(phrase, begin_pos + 1)
        return phrase[begin_pos: end_pos + begin_pos]