Did I find the right examples for you? yes no

All Samples(9)  |  Call(9)  |  Derive(0)  |  Import(0)
Adds 'a' for plural

:param list sentence: sentence
:return: sentence

        def find_plural(sentence):
    """Adds 'a' for plural

    :param list sentence: sentence
    :return: sentence
    """

    #We find the position of the plural in the sentence
    position = find_the_plural(sentence, 0)
    if position != -1:
        #If not -1 we have plural without determinant
        sentence = sentence[:position] + ['a'] + sentence[position:]
    return sentence
        


src/d/i/Dialogs-0.13/src/dialogs/parsing/analyse_verbal_structure.py   Dialogs(Download)
                if len(phrase) != 0 and (phrase[0] == 'and' or phrase[0] == 'or' or phrase[0] == ':but'):
 
                    phrase = [phrase[0]] + analyse_nominal_group.find_plural(phrase[1:])
 
                    #We have not duplicate the proposal, it depends on the presence of the nominal group after  
                if len(phrase) != 0 and (phrase[0] == 'and' or phrase[0] == 'or' or phrase[0] == ':but'):
 
                    phrase = [phrase[0]] + analyse_nominal_group.find_plural(phrase[1:])
                    object = analyse_nominal_group.find_sn_pos(phrase[1:], 0)
 
 
        #If the last nominal group is followed by another one in plural form 
        phrase = analyse_nominal_group.find_plural(phrase)
        object = analyse_nominal_group.find_sn(phrase)
 
            if x + 1 < len(phrase) and phrase[x] in ResourcePool().compelement_proposals:
                #If there is a plural
                phrase = phrase[:x] + analyse_nominal_group.find_plural(phrase[x:])
 
                if analyse_nominal_group.find_sn_pos(phrase, x + 1):
                if len(sentence) != i + 1 and (
                            sentence[i + 1] == 'and' or sentence[i + 1] == 'or' or sentence[i + 1] == ':but'):
                    sentence = [sentence[i + 1]] + analyse_nominal_group.find_plural(sentence[1:])
                    object = analyse_nominal_group.find_sn_pos(sentence[i + 2:], i + 1)
                    #We process the 'or' like the 'and' and remove it

src/d/i/Dialogs-0.13/src/dialogs/parsing/preprocessing.py   Dialogs(Download)
 
        #If there is plural
        sentence = analyse_nominal_group.find_plural(sentence)
        #If it still start with adjective
        if analyse_nominal_group.is_an_adj(sentence[0]) == 1:
 
        #If there is plural
        sentence = analyse_nominal_group.find_plural(sentence)
        #If it still start with adjective
        if analyse_nominal_group.is_an_adj(sentence[0]) == 1:

src/d/i/Dialogs-0.13/src/dialogs/parsing/analyse_sentence.py   Dialogs(Download)
        sentence = analyse_verbal_structure.process_compare(sentence, vg)
 
        sentence = analyse_nominal_group.find_plural(sentence)
        #We recover the direct, indirect complement and the adverbial
        sentence = analyse_verbal_structure.recover_obj_iobj(sentence, vg)
    sentence = analyse_verbal_structure.process_compare(sentence, vg)
 
    sentence = analyse_nominal_group.find_plural(sentence)
    #We recover the direct, indirect complement and the adverbial
    sentence = analyse_verbal_structure.recover_obj_iobj(sentence, vg)