add scripts. rename NlpCodec. update documents
This commit is contained in:
		@ -4,7 +4,7 @@ import collections
 | 
			
		||||
 | 
			
		||||
if NlpUtils.g_EnableDebugging:
 | 
			
		||||
    g_SupportedEncoding = {
 | 
			
		||||
        'template': ('English', ('ascii', ), )
 | 
			
		||||
        'template': ('English', ('windows-1252', ), )
 | 
			
		||||
    }
 | 
			
		||||
else:
 | 
			
		||||
    g_SupportedEncoding = {
 | 
			
		||||
@ -36,12 +36,12 @@ if __name__ == "__main__":
 | 
			
		||||
        preLoadedData[ver] = PreLoadedDiffIdxTuple._make((insertedKey, deletedKey, plainKeys))
 | 
			
		||||
 | 
			
		||||
    # iterate lang first
 | 
			
		||||
    # because we use progressive patch. we need iterate vt ver in order
 | 
			
		||||
    # because we use progressive patch. we need iterate vt ver in order for each single languages
 | 
			
		||||
    for lang in NlpUtils.g_SupportedLangs:
 | 
			
		||||
        
 | 
			
		||||
        prevPlainValues: list[str] = None
 | 
			
		||||
        for ver in NlpUtils.g_VirtoolsVersion:
 | 
			
		||||
            print(f'Processing {ver}.{lang}...')
 | 
			
		||||
            print(f'Loading {ver}.{lang}...')
 | 
			
		||||
 | 
			
		||||
            # pick data from pre-loaded dict
 | 
			
		||||
            diffIdxData = preLoadedData[ver]
 | 
			
		||||
 | 
			
		||||
@ -4,7 +4,7 @@ import io
 | 
			
		||||
import json
 | 
			
		||||
import re
 | 
			
		||||
 | 
			
		||||
g_EnableDebugging = True
 | 
			
		||||
g_EnableDebugging = False
 | 
			
		||||
 | 
			
		||||
g_VirtoolsVersion: tuple[str] = (
 | 
			
		||||
    '25', '35', '40', '50',
 | 
			
		||||
 | 
			
		||||
@ -4,3 +4,5 @@ Example:
 | 
			
		||||
 | 
			
		||||
Create templates: `py NlpJsonDecoder.py`
 | 
			
		||||
Compile translations: `py NlpJsonEncoder.py`
 | 
			
		||||
 | 
			
		||||
NOTE: all python files should be executed in this folder. NOT ROOT folder.
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user