Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
We will find the complement of the nominal group which is also a nominal group
We know the position of the complement so we use find_sn_pos                     

:param nominal_group: the nominal group we look the complement for
:param sentence: the complete sentence as a list of words
:param position: the position of the nominal group in the sentence
:return: nominal group complement                                                 

        def find_nom_gr_compl(nominal_group, sentence, position):
    """
    We will find the complement of the nominal group which is also a nominal group
    We know the position of the complement so we use find_sn_pos                     

    :param nominal_group: the nominal group we look the complement for
    :param sentence: the complete sentence as a list of words
    :param position: the position of the nominal group in the sentence
    :return: nominal group complement                                                 
    """

    #If the nominal_group or sentence is empty
    if not nominal_group:
        return []
    else:
        #This condition include the case when we have 'of' at the end of the sentence
        if len(sentence) <= len(nominal_group) + position or len(sentence) == len(nominal_group) + position + 1:
            return []
        else:
            #We have a complement when there is 'of' before
            if sentence[position + len(nominal_group)] == 'of':
                return find_sn_pos(sentence, position + len(nominal_group) + 1)
        #Default case
    return []
        


src/d/i/Dialogs-0.13/src/dialogs/parsing/analyse_nominal_structure.py   Dialogs(Download)
 
    #We start by recovering all information we need
    nom_gr_compl = analyse_nominal_group.find_nom_gr_compl(nom_gr, phrase, pos_nom_gr)
    det = analyse_nominal_group.return_det(nom_gr)
    adj = analyse_nominal_group.return_adj(nom_gr)