Did I find the right examples for you? yes no

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)
Returns the position of the end of the nominal group                
We have to use the list of irregular adjectives                                  

:param list sentence: the sentence (list of strings)
:param word_pos: the position of the first adjective    
:return: the position of the last word of the nominal group                       

        def adjective_pos(sentence, word_pos):
    """
    Returns the position of the end of the nominal group                
    We have to use the list of irregular adjectives                                  
    
    :param list sentence: the sentence (list of strings)
    :param word_pos: the position of the first adjective    
    :return: the position of the last word of the nominal group                       
    """

    #If it is the end of the sentence
    if len(sentence) - 1 <= word_pos:
        return 1

    #The case of '2 of them'
    if sentence[word_pos] == 'of':
        return 0

    #It is a noun so we have to return 1
    if sentence[word_pos] in ResourcePool().special_nouns:
        return 1

    #For the regular adjectives
    for k in ResourcePool().adjective_rules:
        if sentence[word_pos].endswith(k):
            return 1 + adjective_pos(sentence, word_pos + 1)

    #For adjectives created from numbers
    if sentence[word_pos].endswith('th') and other_functions.number(sentence[word_pos]) == 2:
        return 1 + adjective_pos(sentence, word_pos + 1)

    #We use the irregular adjectives list to find it
    if sentence[word_pos] in list(
            ResourcePool().adjectives.keys()) + ResourcePool().adjective_numbers + ResourcePool().adj_quantifiers:
        return 1 + adjective_pos(sentence, word_pos + 1)

    #Default case
    return 1
        


src/d/i/Dialogs-0.13/src/dialogs/parsing/analyse_verbal_structure.py   Dialogs(Download)
    #In case there is a state verb followed by an adjective
    if sentence:
        if vg.vrb_main[0] in ResourcePool().state and analyse_nominal_group.adjective_pos(sentence, 0) - 1 != 0:
 
            #Here we have juist to process adjectives, nominal groups are processed
            pos = analyse_nominal_group.adjective_pos(sentence, 0)
                sentence = sentence[1:]
 
                pos = analyse_nominal_group.adjective_pos(sentence, 0)
                adj_list = analyse_nominal_group.process_adj_quantifier(sentence[:pos - 1])
                #We put all adjectives in the direct complement