Grammalecte  Diff

Differences From Artifact [66f5eb17ae]:

To Artifact [e2706fc6a2]:


     3      3   
     4      4   import os
     5      5   import sys
     6      6   import re
     7      7   
     8      8   import graphspell.ibdawg as ibdawg
     9      9   
    10         -oDict = ibdawg.IBDAWG("French.bdic")
           10  +oDict = ibdawg.IBDAWG("fr-allvars.json")
    11     11   
    12     12   
    13     13   def readFile (spf):
    14     14       if os.path.isfile(spf):
    15     15           with open(spf, "r", encoding="utf-8") as hSrc:
    16     16               for sLine in hSrc:
    17     17                   yield sLine
................................................................................
    22     22   
    23     23   def listUnknownWords (spf):
    24     24       with open(spf+".res.txt", "w", encoding="utf-8") as hDst:
    25     25           for sLine in readFile(spfSrc):
    26     26               sLine = sLine.strip()
    27     27               if sLine:
    28     28                   for sWord in sLine.split():
    29         -                    if not oDict.isValid(sWord): 
           29  +                    if not oDict.isValid(sWord):
    30     30                           hDst.write(sWord+"\n")
    31     31   
    32     32   # --------------------------------------------------------------------------------------------------
    33     33   
    34     34   def createLexStatFile (spf, dStat):
    35     35       dWord = {}
    36     36       for i, sLine in enumerate(readFile(spf)):