Grammalecte  Check-in [4e84b8a6cf]

Overview
Comment:[fr] lexicographe: minor changes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fr | Lexicographe
Files: files | file ages | folders
SHA3-256: 4e84b8a6cffd2022ee692fe3c4990ab7cf14180c0a08532518de754722fb80ba
User & Date: olr on 2017-10-30 16:44:46
Other Links: branch diff | manifest | tags
Context
2017-10-30
20:50
[fr] lexicographe: analyse des sous-parties des locutions check-in: 2ef57e5809 user: olr tags: Lexicographe, fr
16:44
[fr] lexicographe: minor changes check-in: 4e84b8a6cf user: olr tags: Lexicographe, fr
13:48
[fr] lexicographe: restructuration des données, réduction de l’échantillon de test, élisons dorénavant acceptées check-in: f8019de85c user: olr tags: Lexicographe, fr
Changes

Modified gc_lang/fr/modules-js/lexicographe.js from [ffb5515826] to [f3882fd6a0].

   329    329           if (s.endsWith("ous")) {
   330    330               s += '2';
   331    331           }
   332    332           let nPos = s.indexOf("-");
   333    333           return _dAD.get(s.slice(0, nPos)) + " +" + _dAD.get(s.slice(nPos + 1));
   334    334       }
   335    335   
   336         -    getListOfTokens (sText, bInfo = true) {
          336  +    getListOfTokens (sText, bInfo=true) {
   337    337           let aElem = [];
   338    338           if (sText !== "") {
   339    339               for (let oToken of this.oTokenizer.genTokens(sText)) {
   340    340                   if (bInfo) {
   341    341                       let aRes = this.getInfoForToken(oToken);
   342    342                       if (aRes) {
   343    343                           aElem.push(aRes);
................................................................................
   346    346                       aElem.push(oToken);
   347    347                   }
   348    348               }
   349    349           }
   350    350           return aElem;
   351    351       }
   352    352   
   353         -    getListOfTokensReduc (sText, bInfo = true) {
          353  +    getListOfTokensReduc (sText, bInfo=true) {
   354    354           let aTokenList = this.getListOfTokens(sText.replace("'", "’").trim(), false);
   355    355           let iKey = 0;
   356    356           let aElem = [];
   357    357           do {
   358    358               let oToken = aTokenList[iKey];
   359    359               let sMorphLoc = '';
   360    360               let aTokenTempList = [oToken];
................................................................................
   377    377               }
   378    378   
   379    379               if (sMorphLoc) {
   380    380                   let sWord = '';
   381    381                   for (let oTokenWord of aTokenTempList) {
   382    382                       sWord += oTokenWord.sValue+' ';
   383    383                   }
   384         -                iKey = iKey + aTokenTempList.length-1;
   385    384                   let oTokenLocution = {
   386         -                    'nEnd': aTokenTempList[aTokenTempList.length-1].nEnd,
   387    385                       'nStart': aTokenTempList[0].nStart,
          386  +                    'nEnd': aTokenTempList[aTokenTempList.length-1].nEnd,
   388    387                       'sType': "LOC",
   389    388                       'sValue': sWord.replace('’ ','’').trim()
   390    389                   };
   391    390                   if (bInfo) {
   392    391                       let aFormatedTag = [];
   393    392                       for (let sTagMulti of sMorphLoc.split('|') ){
   394    393                           aFormatedTag.push( this._formatTags(sTagMulti).replace(/( \(él.\))/g,'') );
................................................................................
   397    396                           sType: oTokenLocution.sType,
   398    397                           sValue: oTokenLocution.sValue,
   399    398                           aLabel: aFormatedTag
   400    399                       });
   401    400                   } else {
   402    401                       aElem.push(oTokenLocution);
   403    402                   }
          403  +                iKey = iKey + aTokenTempList.length;
   404    404               } else {
   405    405                   if (bInfo) {
   406    406                       let aRes = this.getInfoForToken(oToken);
   407    407                       if (aRes) {
   408    408                           aElem.push(aRes);
   409    409                       }
   410    410                   } else {
   411    411                       aElem.push(oToken);
   412    412                   }
          413  +                iKey++;
   413    414               }
   414         -            iKey++;
   415    415           } while (iKey < aTokenList.length);
   416    416           return aElem;
   417    417       }
   418    418   }
   419    419   
   420    420   
   421    421   if (typeof(exports) !== 'undefined') {
   422    422       exports.Lexicographe = Lexicographe;
   423    423   }