Grammalecte  Check-in [0f67f597ce]

Overview
Comment:[build] code cleaning (pylint)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | build
Files: files | file ages | folders
SHA3-256: 0f67f597cebea3635a29b68595f66eece5082f8746341152e34aece71de92779
User & Date: olr on 2019-05-11 12:56:59
Other Links: manifest | tags
Context
2019-05-11
14:34
[graphspell] code cleaning (pylint) check-in: 23fcc016ee user: olr tags: graphspell, trunk
12:56
[build] code cleaning (pylint) check-in: 0f67f597ce user: olr tags: build, trunk
12:52
[build] code cleaning (pylint) check-in: 1e6121ef2b user: olr tags: build, trunk
Changes

Modified lex_build.py from [72263209a8] to [0d00b07703].

     1      1   #!python3
     2      2   
     3         -# Lexicon builder
            3  +"""
            4  +Lexicon builder
            5  +"""
     4      6   
     5      7   import argparse
     6      8   from distutils import dir_util
     7      9   
     8     10   import graphspell.dawg as fsa
     9     11   from graphspell.ibdawg import IBDAWG
    10     12   
................................................................................
    18     20       if bJSON:
    19     21           dir_util.mkpath("graphspell-js/_dictionaries")
    20     22           oDic = IBDAWG(sfDict + ".bdic")
    21     23           oDic.writeAsJSObject("graphspell-js/_dictionaries/" + sfDict + ".json", bBinaryDictAsHexString=True)
    22     24   
    23     25   
    24     26   def main ():
           27  +    "parse args from CLI"
    25     28       xParser = argparse.ArgumentParser()
    26     29       xParser.add_argument("src_lexicon", type=str, help="path and file name of the source lexicon")
    27     30       xParser.add_argument("lang_code", type=str, help="language code")
    28     31       xParser.add_argument("lang_name", type=str, help="language name")
    29     32       xParser.add_argument("dic_filename", type=str, help="dictionary file name (without extension)")
    30     33       xParser.add_argument("-js", "--json", help="Build dictionary in JSON", action="store_true")
    31     34       xParser.add_argument("-s", "--stemming", help="stemming method: S=suffixes, A=affixes, N=no stemming", type=str, choices=["S", "A", "N"], default="S")