-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpy3TranslateLLM.ini
145 lines (128 loc) · 11.5 KB
/
py3TranslateLLM.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# Options can be specified here or by using the command line interface (CLI) at the command prompt/terminal.
# Settings specified at the CLI override these values.
# A hash tag # at the start of a line means the line is a comment.
# The key in the key=value pairs are case sensitive.
# 'None' means 'leave as the default value' or 'do not specify this value.'
# Some options are required, so setting them to None and also not specifying them in the CLI will result in an error.
# For valid encodings, please always and only use utf-8. Alternatively, refer to this list: https://docs.python.org/3.7/library/codecs.html#standard-encodings
# Important:
# Using relative paths like 'mypath\myFile.xlsx' is just asking for trouble because they resolve relative to the location of wherever the command prompt happens to be at the time.
# Use absolute paths if at all possible like: C:\Users\Public\Downloads\myGame\scenario\scene1.xlsx
# Backslash \ or forwardslash / for paths does not matter. Both work.
# cacheOnly, koboldcpp, py3translationserver, sugoi, deepl_api_free, deepl_api_pro, deepl_web, pykakasi, cutlet
translationEngine=None
# Enter the file to translate here. Can be a raw text file ( .txt ) or a spreadsheet file ( .csv, .xlsx, .xls, .ods, .tsv ).
#fileToTranslate=scratchpad\ks_testFiles\A01.ks.xlsx
fileToTranslate=None
fileToTranslateEncoding=None
outputFile=None
# The default encoding for the outputfile is the same as the input file. If the input encoding is not specified or the input is a binary spreadsheet, then this is utf-8.
outputFileEncoding=None
# A prompt.txt file is required for LLMs.
promptFile=None
promptFileEncoding=None
memoryFile=None
memoryFileEncoding=None
#Specify a custom name and path for languageCodes.csv Default=resources/languageCodes.csv
languageCodesFile=None
languageCodesFileEncoding=None
sourceLanguage=None
#sourceLanguage=Japanese
targetLanguage=None
#targetLanguage=English
# These dictionaries contain mappings that will alter the strings used before and after translation. For the exact order and usage of each one, see Readme.md => Regarding the Various Dictionaries
characterNamesDictionary=None
characterNamesDictionaryEncoding=None
revertAfterTranslationDictionary=None
revertAfterTranslationDictionaryEncoding=None
preTranslationDictionary=None
preTranslationDictionaryEncoding=None
postTranslationDictionary=None
postTranslationDictionaryEncoding=None
postWritingToFileDictionary=None
postWritingToFileDictionaryEncoding=None
# True, False. Toggles cache setting. Specifying this will disable using or updating the cache file. Default=Use the cache file to fill in previously translated entries and update it with new entries. Leaving this enabled dramatically speeds up translation speed for previously translated entries.
cache=None
# The location of the file that will be used to store translated lines as cache. Must be in cache.xlsx format. Default=backups/cache.xlsx Bug: This path is always relative to main program.
#cacheFile=backups/cache.xlsx
cacheFile=None
# True, False. Use all translation engines when considering the cache. The right-most translation engine will take priority. Default=Only consider the current translation engine as valid for cache hits.
# True, False.
cacheAnyMatch=None
# True, False. Override any already translated lines in the spreadsheet with results from the cache. Default=Do not override already translated lines.
overrideWithCache=None
# True, False. Override any already translated lines in the cache using mainSpreadsheet. Default=Do not override already translated lines. This setting is overridden by reTranslate. overrideWithCache takes precedence over this setting.
overrideWithSpreadsheet=None
# True, False. Translate all lines even if they already have translations or are in the cache. Update the cache with the new translations. Default=Do not retranslate lines. Use the cache to fill in previously translated lines.
reTranslate=None
# True, False. Opens the cache file in read-only mode and disables updates to it. This dramatically decreases the memory used by the cache file. Default=Read and write to the cache file.
readOnlyCache=None
# If there is any error detected when generating it, this rebuilds the cache, removing blank lines and duplicates, based upon an existing spreadsheet. Use this if the cache ever becomes corrupt. Rebuilding the cache lowers memory usage. The first column will be used as the untranslated data. This can also be done manually using cocolate.Strawberry().rebuildCache() and then cocolate.Strawberry().export().
rebuildCache=None
# True, False. Toggles context history setting. Specifying this will toggle keeping track of or submitting history of previously translated entries to the translation engine. Default=Keep track of previously translated entries and submit them to the translation engines that support history to improve the quality of future translations.
contextHistory=None
# The number of previous translations that should be sent to the translation engine to provide context for the current translation. Sane values are 2-10. Set to 0 to disable. Default = 6. Not all translation engines support context. Actuallly using this requires the following string to be present in the prompt.txt file: {history}
contextHistoryMaxLength=None
# True, False. Should contextHistory be fully reset when contextHistoryMaxLength is reached or should only the oldest entry be removed? Default=True, Fully reset contextHistory after reaching contextHistoryMaxLength in order to set a max to LLM hallucination errors that corrupt surrounding entries. Setting this option to False means to remove the oldest entry instead of fully reseting the contextHistory buffer.
contextHistoryReset=None
# Experimental feature. The location of the sceneSummaryPrompt.txt file, a text file used to generate a summary of the untranslated text prior to translation. Only valid with specific translation engines. Specifying this text file will enable generating a scene summary prior to translation to potentially boost translation quality. Due to the highly experimental nature of this feature, translations are disabled by default when this feature is enabled in order to provide time to quality check the generated summary before attempting translation and to potentially one engines/APIs to generate the summary and another for the subsequent translation. After quality checking the generated summaries, use sceneSummaryEnableTranslation to enable translations when using this feature. Actually using the summary during translation requires the following string to be present in either the memory.txt or prompt.txt file: {scene} Default=Do not generate a summary prior to translation.
sceneSummaryPrompt=None
# The encoding of the sceneSummaryPrompt.txt file.
sceneSummaryPromptEncoding=None
# Experimental feature. The number of entries that should be summarized at any one time. Default=40. If batches are enabled, batches and this will be reduced to the same number depending on whichever is lower. Set to 0 to disable limits when generating a summary. This will still be limited by batchSizeLimit even if batches are disabled unless batchSizeLimit = 0.
sceneSummaryLength=None
# Experimental feature. True, False. Enable the use of summaries of untranslated text when translating data. This setting always requires a sceneSummaryPrompt.txt file. sceneSummaryCacheFile will be used as cache. Default= Do not translate when generating a summary. The summary will be inserted in place of {scene} of memory.txt and prompt.txt.
sceneSummaryEnableTranslation=None
# Experimental feature. The location of the sceneSummaryCache.xlsx file which stores a cache of every previously generated summary. Bug: This path is always relative to main program.
sceneSummaryCacheFile=None
# Experimental feature. True, False. Use all translation engines when considering the sceneSummaryCache. Default=Only consider the current translation engine as valid for cache hits. This setting only affects sceneSummaryCache.
sceneSummaryCacheAnyMatch=None
# True, False. Toggles if entries should be submitted for translations engines that support them. Enabling batches disables context history. Default=Batches are automatically enabled for NMTs that support batches and DeepL, but disabled for LLMs. Specifying this will disable them globally for all engines.
batches=None
# True, False. For translation engines that support both batches and single translations, should batches be enabled? Batches are automatically enabled for NMTs that support batches and DeepL regardless of this setting. Enabling batches for LLMs disables context history.
batchesEnabledForLLMs=None
# Specify the maximum number of translations that should be sent to the translation engine if that translation engine supports batches. Not all translation engines support batches. Set to 0 to disable. Default=1000
batchSizeLimit=None
# Specify the protocol and IP for NMT/LLM server, Examples:
# http://192.168.0.100
# http://localhost
address=None
# Specify the port for the NMT/LLM server. Example: 5001
port=None
# Specify the maximum number of seconds each individual request to a translation engine can take before quiting. Example: 360 for 6 minutes.
#timeout=360
timeout=None
# True, False. This setting toggles writing backup files for mainSpreadsheet. This setting does not affect cache. Default=Write mainSpreadsheet to backups/[date]/* periodically for use with --resume. Setting this to False will disable creating backups.
backups=None
# True, False. If True, attempt to resume previously interupted operation. No gurantees. Only checks backups made today and yesterday.
resume=None
# Specifying this will read all input files and import the translation engine, but there will be no translation or output files written. Default=Translate contents and write output.
testRun=None
# The is the program.ini file from which to read program settings. This is not applicable here, but can be specified at the CLI to load different program.userInput.ini files. This should enable a high degree of automation when combined with shell scripting.
#settingsFile=None
# This handles the error handling when changing between encoding formats. To write any text file, an encoding must be specified.
# Reading from and writing to the same encoding can still result in decoding errors due to internal conversions required to process the data.
# See: docs.python.org/3.7/library/codecs.html#error-handlers and www.w3schools.com/python/ref_string_encode.asp
#inputErrorHandling=strict
inputErrorHandling=None
# See: docs.python.org/3.7/library/codecs.html#error-handlers and www.w3schools.com/python/ref_string_encode.asp
#outputErrorHandling=namereplace
outputErrorHandling=None
# Always use the default of utf-8. For more options: docs.python.org/3.7/library/codecs.html#standard-encodings
#consoleEncoding='utf-8'
consoleEncoding=None
# True, False. If True, print more information.
verbose=None
# True, False. If True, print too much information.
debug=None
# True, False. If True, print out version information and exit.
version=None
# Put engine specific settings here.
# romajiFormat is only used for pykakasi and cutlet. Default=Use engine default which is hepburn.
# pykakasi can use hepburn, kunrei, passport, hira, kana. Passport is a hepburn variant. See: codeberg.org/miurahr/pykakasi
# Cutlet can use hepburn, kunrei, nihon. See: github.com/polm/cutlet
#romajiFormat=hepburn
romajiFormat=None
# For KoboldCpp.
# True, False. Should full width characters be normalized to half-width characters during post processing? Default is True meaning that full width characters are normalized.
targetLanguageIsHalfWidth=None