Build scripts cleanup and dictionary loading optimization
* moved the source languages out of assets/ into their own directory (#356) * split build.gradle into several smaller files * improved word frequency validation during build time * slightly optimized dictionary loading speed using pre-calculated file size * fixed a potential crash when loading invalid assets * fixed dictionary loading progress starting at 100% then jumping to 0% when manually loading two dictionaries one after another * documentation update
This commit is contained in:
parent
d8c2f7fc15
commit
44ecb8999e
50 changed files with 367 additions and 320 deletions
16
gradle/scripts/constants.gradle
Normal file
16
gradle/scripts/constants.gradle
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
ext.LANGUAGES_DIR_NAME = 'languages'
|
||||
ext.DEFINITIONS_DIR_NAME = 'definitions'
|
||||
ext.DICTIONARIES_DIR_NAME = 'dictionaries'
|
||||
ext.DICTIONARY_SIZES_DIR_NAME = 'dictionary-sizes'
|
||||
|
||||
ext.LANGUAGES_INPUT_DIR = "${project.rootDir}/${LANGUAGES_DIR_NAME}"
|
||||
ext.DEFINITIONS_INPUT_DIR = "${LANGUAGES_INPUT_DIR}/${DEFINITIONS_DIR_NAME}"
|
||||
ext.DICTIONARIES_INPUT_DIR = "${LANGUAGES_INPUT_DIR}/${DICTIONARIES_DIR_NAME}"
|
||||
|
||||
ext.LANGUAGES_OUTPUT_DIR = "${LANGUAGES_INPUT_DIR}".replace("${project.rootDir}", "${project.rootDir}/assets")
|
||||
ext.DEFINITIONS_OUTPUT_DIR = "${DEFINITIONS_INPUT_DIR}".replace("${project.rootDir}", "${project.rootDir}/assets")
|
||||
ext.DICTIONARIES_OUTPUT_DIR = "${DICTIONARIES_INPUT_DIR}".replace("${project.rootDir}", "${project.rootDir}/assets")
|
||||
|
||||
ext.CSV_DELIMITER = ' ' // TAB
|
||||
ext.MAX_WORD_FREQUENCY = 255
|
||||
ext.MAX_ERRORS = 50
|
||||
Loading…
Add table
Add a link
Reference in a new issue