Grammalecte  Diff

Differences From Artifact [bb0326be30]:

To Artifact [c6776ced05]:


63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90


def getNamesFrom (sVerb):
    "returns a list of names derivating from <sVerb>"
    if sVerb in _dVerbNames:
        # there are names derivated from the verb
        return list(_dVerbNames[sVerb])
    else:
        # we suggest past participles
        tTags = _getTags(sVerb)
        if tTags:
            aSugg = [ _getConjWithTags(sVerb, tTags, ":Q", ":m:s") ]
            if _hasConjWithTags(tTags, ":Q", ":f:s"):
                aSugg.append(_getConjWithTags(sVerb, tTags, ":Q", ":f:s"))
            if _hasConjWithTags(tTags, ":Q", ":m:p"):
                aSugg.append(_getConjWithTags(sVerb, tTags, ":Q", ":m:p"))
            if _hasConjWithTags(tTags, ":Q", ":f:p"):
                aSugg.append(_getConjWithTags(sVerb, tTags, ":Q", ":f:p"))
            # if there is only one past participle (epi inv), unreliable.
            return aSugg  if len(aSugg) > 1  else []
        return []


def getConjSimilInfiV1 (sInfi):
    "returns verbal forms phonetically similar to infinitive form (for verb in group 1)"
    if sInfi not in _dVerb:
        return []
    aSugg = []







<
|
|
|
|
|
|
|
|
|
|
|
|
|







63
64
65
66
67
68
69

70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89


def getNamesFrom (sVerb):
    "returns a list of names derivating from <sVerb>"
    if sVerb in _dVerbNames:
        # there are names derivated from the verb
        return list(_dVerbNames[sVerb])

    # nothing found: we suggest past participles
    tTags = _getTags(sVerb)
    if tTags:
        aSugg = [ _getConjWithTags(sVerb, tTags, ":Q", ":m:s") ]
        if _hasConjWithTags(tTags, ":Q", ":f:s"):
            aSugg.append(_getConjWithTags(sVerb, tTags, ":Q", ":f:s"))
        if _hasConjWithTags(tTags, ":Q", ":m:p"):
            aSugg.append(_getConjWithTags(sVerb, tTags, ":Q", ":m:p"))
        if _hasConjWithTags(tTags, ":Q", ":f:p"):
            aSugg.append(_getConjWithTags(sVerb, tTags, ":Q", ":f:p"))
        # if there is only one past participle (epi inv), unreliable.
        return aSugg  if len(aSugg) > 1  else []
    return []


def getConjSimilInfiV1 (sInfi):
    "returns verbal forms phonetically similar to infinitive form (for verb in group 1)"
    if sInfi not in _dVerb:
        return []
    aSugg = []