Grammalecte  Check-in [023f83bc15]

Overview
Comment:[core][fr] end of lemma is now a slash instead of a space
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fr | core | rg
Files: files | file ages | folders
SHA3-256: 023f83bc15e122d80b334eafd7e8762572a2c73369ea743e7e94583559e29c9f
User & Date: olr on 2018-06-06 10:36:26
Other Links: branch diff | manifest | tags
Context
2018-06-06
15:24
[core] DARG: text processing check-in: 5fc6d41650 user: olr tags: core, rg
10:36
[core][fr] end of lemma is now a slash instead of a space check-in: 023f83bc15 user: olr tags: core, fr, rg
10:35
[fr] end of lemma is now a slash instead of a space check-in: 3bd7a19c94 user: olr tags: fr, rg
Changes

Modified gc_lang/fr/modules-js/conj.js from [f544af05b0] to [8124143953].

    83     83           return this._lVtyp[this._dVerb[sVerb][0]];
    84     84       },
    85     85   
    86     86       getSimil: function (sWord, sMorph, bSubst=false) {
    87     87           if (!sMorph.includes(":V")) {
    88     88               return new Set();
    89     89           }
    90         -        let sInfi = sMorph.slice(1, sMorph.indexOf(" "));
           90  +        let sInfi = sMorph.slice(1, sMorph.indexOf("/"));
    91     91           let aSugg = new Set();
    92     92           let tTags = this._getTags(sInfi);
    93     93           if (tTags) {
    94     94               if (!bSubst) {
    95     95                   // we suggest conjugated forms
    96     96                   if (sMorph.includes(":V1")) {
    97     97                       aSugg.add(sInfi);

Modified gc_lang/fr/modules-js/gce_suggestions.js from [7b6a3f8cde] to [6803550153].

    16     16       for (let sStem of _oSpellChecker.getLemma(sFlex)) {
    17     17           let tTags = conj._getTags(sStem);
    18     18           if (tTags) {
    19     19               // we get the tense
    20     20               let aTense = new Set();
    21     21               for (let sMorph of _oSpellChecker.getMorph(sFlex)) {
    22     22                   let m;
    23         -                let zVerb = new RegExp (">"+sStem+" .*?(:(?:Y|I[pqsf]|S[pq]|K))", "g");
           23  +                let zVerb = new RegExp (">"+sStem+"/.*?(:(?:Y|I[pqsf]|S[pq]|K))", "g");
    24     24                   while ((m = zVerb.exec(sMorph)) !== null) {
    25     25                       // stem must be used in regex to prevent confusion between different verbs (e.g. sauras has 2 stems: savoir and saurer)
    26     26                       if (m) {
    27     27                           if (m[1] === ":Y") {
    28     28                               aTense.add(":Ip");
    29     29                               aTense.add(":Iq");
    30     30                               aTense.add(":Is");

Modified gc_lang/fr/modules/conj.py from [c668aaf269] to [96ddf4a9dc].

    54     54           return None
    55     55       return _lVtyp[_dVerb[sVerb][0]]
    56     56   
    57     57   
    58     58   def getSimil (sWord, sMorph, bSubst=False):
    59     59       if ":V" not in sMorph:
    60     60           return set()
    61         -    sInfi = sMorph[1:sMorph.find(" ")]
           61  +    sInfi = sMorph[1:sMorph.find("/")]
    62     62       aSugg = set()
    63     63       tTags = _getTags(sInfi)
    64     64       if tTags:
    65     65           if not bSubst:
    66     66               # we suggest conjugated forms
    67     67               if ":V1" in sMorph:
    68     68                   aSugg.add(sInfi)

Modified gc_lang/fr/modules/gce_suggestions.py from [818aeb6977] to [a5e2b1d398].

    11     11       aSugg = set()
    12     12       for sStem in _oSpellChecker.getLemma(sFlex):
    13     13           tTags = conj._getTags(sStem)
    14     14           if tTags:
    15     15               # we get the tense
    16     16               aTense = set()
    17     17               for sMorph in _oSpellChecker.getMorph(sFlex):
    18         -                for m in re.finditer(">"+sStem+" .*?(:(?:Y|I[pqsf]|S[pq]|K|P))", sMorph):
           18  +                for m in re.finditer(">"+sStem+"/.*?(:(?:Y|I[pqsf]|S[pq]|K|P))", sMorph):
    19     19                       # stem must be used in regex to prevent confusion between different verbs (e.g. sauras has 2 stems: savoir and saurer)
    20     20                       if m:
    21     21                           if m.group(1) == ":Y":
    22     22                               aTense.add(":Ip")
    23     23                               aTense.add(":Iq")
    24     24                               aTense.add(":Is")
    25     25                           elif m.group(1) == ":P":