Overview
| Comment: | [build] change arguments order for dictionary building | 
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive | 
| Timelines: | family | ancestors | descendants | both | trunk | build | 
| Files: | files | file ages | folders | 
| SHA3-256: | 
4bc364b3acdbf9c9e847ac1ec5c9ec56 | 
| User & Date: | olr on 2017-06-23 12:55:05 | 
| Other Links: | manifest | tags | 
Context
| 
   2017-06-23 
 | ||
| 13:19 | [build] lex_build.py: main() + options check-in: e091821b50 user: olr tags: trunk, build | |
| 12:55 | [build] change arguments order for dictionary building check-in: 4bc364b3ac user: olr tags: trunk, build | |
| 12:19 | [build] separate dictionary builder from make.py check-in: 03448dc173 user: olr tags: trunk, build | |
Changes
Modified lex_build.py from [e2774a881f] to [17cde37b09].
1 2 3 4 5 6 7 8 9 10  | #!python3 # Lexicon builder from distutils import dir_util import grammalecte.dawg as fsa from grammalecte.ibdawg import IBDAWG  | |  | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  | 
#!python3
# Lexicon builder
from distutils import dir_util
import grammalecte.dawg as fsa
from grammalecte.ibdawg import IBDAWG
def build (spfSrc, sLangName, sDicName, bJSON=False, cStemmingMethod="S", nCompressMethod=1):
    "transform a text lexicon as a binary indexable dictionary"
    oDAWG = fsa.DAWG(spfSrc, sLangName, cStemmingMethod)
    dir_util.mkpath("grammalecte/_dictionaries")
    oDAWG.writeInfo("grammalecte/_dictionaries/" + sDicName + ".info.txt")
    oDAWG.createBinary("grammalecte/_dictionaries/" + sDicName + ".bdic", int(nCompressMethod))
    if bJSON:
        dir_util.mkpath("grammalecte-js/_dictionaries")
 | 
| ︙ | ︙ | 
Modified make.py from [993f7b57c8] to [50653d3e54].
| ︙ | ︙ | |||
311 312 313 314 315 316 317  | 
                    build_data_module = importlib.import_module("gc_lang."+sLang+".build_data")
                except ImportError:
                    print("# Error. Couldn’t import file build_data.py in folder gc_lang/"+sLang)
            if build_data_module:
                build_data_module.before('gc_lang/'+sLang, dVars, xArgs.javascript)
            if xArgs.dict or not os.path.exists("grammalecte/_dictionaries"):
                import lex_build
 | |  | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325  | 
                    build_data_module = importlib.import_module("gc_lang."+sLang+".build_data")
                except ImportError:
                    print("# Error. Couldn’t import file build_data.py in folder gc_lang/"+sLang)
            if build_data_module:
                build_data_module.before('gc_lang/'+sLang, dVars, xArgs.javascript)
            if xArgs.dict or not os.path.exists("grammalecte/_dictionaries"):
                import lex_build
                lex_build.build(dVars['lexicon_src'], dVars['lang_name'], dVars['dic_name'], xArgs.javascript, dVars['stemming_method'], int(dVars['fsa_method']))
            if build_data_module:
                build_data_module.after('gc_lang/'+sLang, dVars, xArgs.javascript)
            # make
            sVersion = create(sLang, xConfig, xArgs.install, xArgs.javascript, )
            # tests
 | 
| ︙ | ︙ |