Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
recovers the verb part of a question                               
Input=tense, verb in infinitive form, his state, the adverb and subject          
Output=verb part                                                                 

        def vrb_ques_rebuilding(tense, verb, adverb, sn, state, aim):
    """
    recovers the verb part of a question                               
    Input=tense, verb in infinitive form, his state, the adverb and subject          
    Output=verb part                                                                 
    """
    #If verb is empty
    if not verb:
        return []

    #We take of the '+'
    vrb = other_functions.list_rebuilding(verb[0])

    #If there is be or have : it is ok
    if vrb[0] == 'be' or vrb[0] == 'have':
        vrb_condjugated = conjugate_vrb(tense, vrb, sn, '', aim)
        if state == Verbal_Group.negative:
            return [vrb_condjugated[0]] + ['not'] + adverb + vrb_condjugated[1:]
        return [vrb_condjugated[0]] + adverb + vrb_condjugated[1:]

    #Modal also
    for i in ResourcePool().modal:
        if i == vrb[0]:
            if state == Verbal_Group.negative:
                if tense == 'present passive' or tense == 'passive conditional':
                    return [vrb[0]] + ['not'] + adverb + ['be'] + conjugate_vrb('present passive', vrb[1:], sn, '',
                                                                                aim)[1:]
                return [vrb[0]] + ['not'] + adverb + vrb[1:]
            elif tense == 'present passive' or tense == 'passive conditional':
                return [vrb[0]] + adverb + ['be'] + conjugate_vrb('present passive', vrb[1:], sn, '', aim)[1:]
            return [vrb[0]] + adverb + vrb[1:]

    if tense == 'present simple' or tense == 'past simple':
        #We need to add the auxilary
        aux = conjugate_vrb(tense, ['do'], sn, '', aim)
        if state == Verbal_Group.negative:
            return aux + ['not'] + adverb + vrb
        return aux + adverb + vrb
    else:
        vrb_condjugated = conjugate_vrb(tense, vrb, sn, '', aim)
        if state == Verbal_Group.negative:
            return [vrb_condjugated[0]] + ['not'] + adverb + vrb_condjugated[1:]
        return [vrb_condjugated[0]] + adverb + vrb_condjugated[1:]
        


src/d/i/Dialogs-0.13/src/dialogs/verbalization/sentence_rebuilding.py   Dialogs(Download)
 
            #Same processing with yes no question
            phrase = element_rebuilding.vrb_ques_rebuilding(analysis.sv[0].vrb_tense, analysis.sv[0].vrb_main,
                                                            analysis.sv[0].vrb_adv, analysis.sn, analysis.sv[0].state,
                                                            analysis.aim)