Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Completes the relative with her object                                    

:param sentence: the relative
:param object: the object of the relative (its nominal group)
:return: relative concatenated to the nominal group                                        

        def complete_relative(sentence, object):
    """
    Completes the relative with her object                                    
    
    :param sentence: the relative
    :param object: the object of the relative (its nominal group)
    :return: relative concatenated to the nominal group                                        
    """

    #init
    i = 0

    #If there is a subject, the relative proposal refer to direct or indirect complement
    if find_sn_pos(sentence, 0):

        while i < len(sentence):
            if sentence[i] in ResourcePool().proposals and find_sn_pos(sentence, i + 1) == []:
                #It is an indirect complement
                sentence = sentence[:i + 1] + object + sentence[i + 1:]
                return sentence

            elif sentence[i] in ResourcePool().proposals:
                #We don't have an indirect object
                i += len(find_sn_pos(sentence, i + 1))

            i += 1
            #It is a direct complement
        sentence = sentence + object

    #Default case
    return sentence               
        


src/d/i/Dialogs-0.13/src/dialogs/parsing/analyse_nominal_structure.py   Dialogs(Download)
        #If it is a place, we have not to duplicate the nominal group
        if phrase[begin_pos_rel] != 'where':
            relative_phrase = analyse_nominal_group.complete_relative(relative_phrase, nom_gr)
 
        relative = relative + [analyse_sentence.other_sentence(RELATIVE, phrase[begin_pos_rel], relative_phrase)]