Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
This function recovers the indirect object                                       
Input=class indirect object                                                      
Output=phrase concatenate all information of this class                             

        def indirect_compl_rebuilding(indirect_compl):
    """
    This function recovers the indirect object                                       
    Input=class indirect object                                                      
    Output=phrase concatenate all information of this class                             
    """

    #init
    ind_cmpl = []
    k = 0

    #We have 2 cases : with proposal and without
    if indirect_compl.prep:
        nom_gr = nom_struc_rebuilding(indirect_compl.gn)

        #If we have another i_cmpl with a different preposition
        if nom_gr != [] and (nom_gr[0] == 'and' or nom_gr[0] == 'or' or nom_gr[0] == 'but'):
            nom_gr = [nom_gr[0]] + indirect_compl.prep + nom_gr[1:]
        else:
            nom_gr = indirect_compl.prep + nom_gr

        #For a preposition we can have different i_cmpl with different conjunctions
        while k < len(nom_gr):
            if (nom_gr[k] == 'or' or nom_gr[k] == 'but') and nom_gr[k + 1] != indirect_compl.prep[0]:
                nom_gr = nom_gr[:k + 1] + indirect_compl.prep + nom_gr[k + 1:]
            k += 1

    else:
        nom_gr = indirect_compl.prep + nom_struc_rebuilding(indirect_compl.gn)

    ind_cmpl = ind_cmpl + nom_gr
    return ind_cmpl
        


src/d/i/Dialogs-0.13/src/dialogs/verbalization/sentence_rebuilding.py   Dialogs(Download)
 
            for x in analysis.sv[0].i_cmpl:
                phrase = phrase + element_rebuilding.indirect_compl_rebuilding(x)
 
            phrase = phrase + analysis.sv[0].advrb