Adjust the return for tl
This commit is contained in:
parent
4346ff8cb6
commit
56d67f9b78
13 changed files with 23 additions and 176 deletions
|
|
@ -622,7 +622,4 @@ def translateGPT(text, history, fullPromptFlag):
|
|||
tList[index] = translatedText.replace("Placeholder Text", "")
|
||||
|
||||
finalList = combineList(tList, text)
|
||||
if format == "json":
|
||||
return [finalList, totalTokens]
|
||||
else:
|
||||
return [finalList[0], totalTokens]
|
||||
return [finalList, totalTokens]
|
||||
|
|
@ -563,7 +563,4 @@ def translateGPT(text, history, fullPromptFlag):
|
|||
tList[index] = translatedText.replace("Placeholder Text", "")
|
||||
|
||||
finalList = combineList(tList, text)
|
||||
if format == "json":
|
||||
return [finalList, totalTokens]
|
||||
else:
|
||||
return [finalList[0], totalTokens]
|
||||
return [finalList, totalTokens]
|
||||
|
|
@ -606,7 +606,4 @@ def translateGPT(text, history, fullPromptFlag):
|
|||
tList[index] = translatedText.replace("Placeholder Text", "")
|
||||
|
||||
finalList = combineList(tList, text)
|
||||
if format == "json":
|
||||
return [finalList, totalTokens]
|
||||
else:
|
||||
return [finalList[0], totalTokens]
|
||||
return [finalList, totalTokens]
|
||||
|
|
|
|||
|
|
@ -198,7 +198,9 @@ def translateRegex(data, translatedList):
|
|||
speaker = response[0]
|
||||
tokens[0] += response[1][0]
|
||||
tokens[1] += response[1][1]
|
||||
data[i] = data[i].replace(match.group(1), speaker)
|
||||
|
||||
if translatedList:
|
||||
data[i] = data[i].replace(match.group(1), speaker)
|
||||
else:
|
||||
speaker = None
|
||||
|
||||
|
|
@ -248,7 +250,6 @@ def translateRegex(data, translatedList):
|
|||
translatedText = re.sub(r"^\[?(.+?)\]?\s?[|:]\s?", "", translatedText)
|
||||
|
||||
# Escape Quotes
|
||||
translatedText = re.sub(r'(?<!\\)"', r'\\"', translatedText)
|
||||
translatedText = re.sub(r"(?<!\\)'", r"\\'", translatedText)
|
||||
|
||||
# Textwrap
|
||||
|
|
@ -558,7 +559,7 @@ def translateGPT(text, history, fullPromptFlag):
|
|||
extractedTranslations = extractTranslation(translatedText, True)
|
||||
if extractedTranslations == None or len(tItem) != len(extractedTranslations):
|
||||
# Mismatch. Try Again
|
||||
response = translateText(system, user, history, 0.05, format, "gpt-4o")
|
||||
response = translateText(system, user, history, 0.05, format, "gpt-4")
|
||||
translatedText = response.choices[0].message.content
|
||||
totalTokens[0] += response.usage.prompt_tokens
|
||||
totalTokens[1] += response.usage.completion_tokens
|
||||
|
|
|
|||
|
|
@ -546,7 +546,4 @@ def translateGPT(text, history, fullPromptFlag):
|
|||
tList[index] = translatedText.replace("Placeholder Text", "")
|
||||
|
||||
finalList = combineList(tList, text)
|
||||
if format == "json":
|
||||
return [finalList, totalTokens]
|
||||
else:
|
||||
return [finalList[0], totalTokens]
|
||||
return [finalList, totalTokens]
|
||||
|
|
@ -2678,7 +2678,4 @@ def translateGPT(text, history, fullPromptFlag):
|
|||
tList[index] = translatedText.replace("Placeholder Text", "")
|
||||
|
||||
finalList = combineList(tList, text)
|
||||
if format == "json":
|
||||
return [finalList, totalTokens]
|
||||
else:
|
||||
return [finalList[0], totalTokens]
|
||||
return [finalList, totalTokens]
|
||||
|
|
@ -2667,7 +2667,4 @@ def translateGPT(text, history, fullPromptFlag):
|
|||
tList[index] = translatedText.replace("Placeholder Text", "")
|
||||
|
||||
finalList = combineList(tList, text)
|
||||
if format == "json":
|
||||
return [finalList, totalTokens]
|
||||
else:
|
||||
return [finalList[0], totalTokens]
|
||||
return [finalList, totalTokens]
|
||||
|
|
@ -537,7 +537,4 @@ def translateGPT(text, history, fullPromptFlag):
|
|||
tList[index] = translatedText.replace("Placeholder Text", "")
|
||||
|
||||
finalList = combineList(tList, text)
|
||||
if format == "json":
|
||||
return [finalList, totalTokens]
|
||||
else:
|
||||
return [finalList[0], totalTokens]
|
||||
return [finalList, totalTokens]
|
||||
|
|
@ -537,7 +537,4 @@ def translateGPT(text, history, fullPromptFlag):
|
|||
tList[index] = translatedText.replace("Placeholder Text", "")
|
||||
|
||||
finalList = combineList(tList, text)
|
||||
if format == "json":
|
||||
return [finalList, totalTokens]
|
||||
else:
|
||||
return [finalList[0], totalTokens]
|
||||
return [finalList, totalTokens]
|
||||
|
|
@ -613,7 +613,4 @@ def translateGPT(text, history, fullPromptFlag):
|
|||
tList[index] = translatedText.replace("Placeholder Text", "")
|
||||
|
||||
finalList = combineList(tList, text)
|
||||
if format == "json":
|
||||
return [finalList, totalTokens]
|
||||
else:
|
||||
return [finalList[0], totalTokens]
|
||||
return [finalList, totalTokens]
|
||||
|
|
@ -2475,7 +2475,4 @@ def translateGPT(text, history, fullPromptFlag):
|
|||
tList[index] = translatedText.replace("Placeholder Text", "")
|
||||
|
||||
finalList = combineList(tList, text)
|
||||
if format == "json":
|
||||
return [finalList, totalTokens]
|
||||
else:
|
||||
return [finalList[0], totalTokens]
|
||||
return [finalList, totalTokens]
|
||||
|
|
@ -580,7 +580,4 @@ def translateGPT(text, history, fullPromptFlag):
|
|||
tList[index] = translatedText.replace("Placeholder Text", "")
|
||||
|
||||
finalList = combineList(tList, text)
|
||||
if format == "json":
|
||||
return [finalList, totalTokens]
|
||||
else:
|
||||
return [finalList[0], totalTokens]
|
||||
return [finalList, totalTokens]
|
||||
137
vocab.txt
137
vocab.txt
|
|
@ -1,11 +1,14 @@
|
|||
Here are some vocabulary and terms so that you know the proper spelling and translation.
|
||||
```
|
||||
# Game Characters
|
||||
黒井 衣 (Kuroi Koromo) - Female
|
||||
ころも (Koromo) - Female
|
||||
鉄仮面 (Iron Mask) - Male
|
||||
ジライヤ (Jiraiya) - Male
|
||||
REMU - Female
|
||||
ルカミラ ハル ロッシュ (Lukamilla Harre Roche) - Female
|
||||
マリアーヌ ローエン グリン (Marianne Roen Green) - Female
|
||||
リアン (Rianne) - Female
|
||||
スカーレット ルンベルク (Scarlet Lumberg) - Female
|
||||
ソフィア (Sofia) - Female
|
||||
アグファス ブロウニン (Agfas Blonin) - Male
|
||||
マルック スタンレー (Marc Stanley) - Male
|
||||
モノキオス (Monokios) - Male
|
||||
|
||||
# Lewd Terms
|
||||
マンコ (pussy)
|
||||
|
|
@ -90,128 +93,4 @@ w ((lol))
|
|||
巫女 (Shrine Maiden)
|
||||
コイツ (this bastard)
|
||||
メナスフィア (Menacephere)
|
||||
|
||||
\i[164]ポーション (\i[164]Potion)
|
||||
\i[164]ハイポーション (\i[164]Hi-Potion)
|
||||
\i[257]エーテル (\i[257]Ether)
|
||||
\i[257]ハイエーテル (\i[257]Hi-Ether)
|
||||
\i[278]エリクサー (\i[278]Elixir)
|
||||
\i[277]万能薬 (\i[277]Remedy)
|
||||
\i[262]発情剤 (\i[262]Arousal Agent)
|
||||
\i[429]精神安定剤 (\i[429]Tranquilizer)
|
||||
\i[429]瞬間安定剤 (\i[429]Instant Stabilizer)
|
||||
----------------- (-----------------)
|
||||
\i[417]アイスジャベリン (\i[417]Ice Javelin)
|
||||
\i[417]ファイアランス (\i[417]Fire Lance)
|
||||
\i[417]ライトニングアロー (\i[417]Lightning Arrow)
|
||||
\i[417]ヒールウォール (\i[417]Heal Wall)
|
||||
\i[417]プリズムヒール (\i[417]Prism Heal)
|
||||
\i[417]パワーアップ (\i[417]Power Up)
|
||||
\i[417]ラピッドアタック (\i[417]Rapid Attack)
|
||||
\i[417]テイルスマッシュ (\i[417]Tail Smash)
|
||||
\i[417]デストロイ (\i[417]Destroy)
|
||||
\i[417]グランドスラム (\i[417]Grand Slam)
|
||||
\i[417]シャドウテイル (\i[417]Shadow Tail)
|
||||
\i[417]シリウス (\i[417]Sirius)
|
||||
\i[417]アルタイル (\i[417]Altair)
|
||||
\i[417]ライキリ (\i[417]Raikiri)
|
||||
\i[417]エクスプロージョン (\i[417]Explosion)
|
||||
\i[480]魔法の裁縫箱 (\i[480]Magic Sewing Box)
|
||||
\i[482]チツケアー (\i[482]Chitsu Care)
|
||||
\i[481]ケツケアー (\i[481]Ketsu Care)
|
||||
\i[417]鬼化 (\i[417]Oni Transformation)
|
||||
\i[451]ラダー (\i[451]Ladder)
|
||||
\i[453]オノ (\i[453]Axe)
|
||||
\i[452]ツルハシ (\i[452]Pickaxe)
|
||||
\i[454]ロウソク (\i[454]Candle)
|
||||
\i[263]客室のカギA (\i[263]Guest Room Key A)
|
||||
\i[263]客室のカギB (\i[263]Guest Room Key B)
|
||||
\i[263]倉庫のカギ (\i[263]Warehouse Key)
|
||||
\i[471]古びたネジ巻き鍵 (\i[471]Old Winding Key)
|
||||
\i[472]ぬ・る・ぶ (\i[472]Nu-Ru-Bu)
|
||||
\i[263]銀色のカギ (\i[263]Silver Key)
|
||||
\i[263]真鍮のカギ (\i[263]Brass Key)
|
||||
\i[263]緑青の浮いたカギ (\i[263]Verdigris Key)
|
||||
\i[473]くしゃくしゃのメモ (\i[473]Crumpled Note)
|
||||
\i[490]木の板 (\i[490]Wooden Plank)
|
||||
\i[404]IDカード (\i[404]ID Card)
|
||||
\i[550]配線A(L字) (\i[550]Wiring A (L-shape))
|
||||
\i[551]配線B(逆L字) (\i[551]Wiring B (Reverse L-shape))
|
||||
\i[552]配線C(反L字) (\i[552]Wiring C (Inverted L-shape))
|
||||
\i[553]配線D(反逆L字) (\i[553]Wiring D (Reverse Inverted L-shape))
|
||||
\i[554]配線E(横) (\i[554]Wiring E (Horizontal))
|
||||
\i[418]りんご (\i[418]Apple)
|
||||
\i[415]ぶどう (\i[415]Grapes)
|
||||
\i[419]青りんご (\i[419]Green Apple)
|
||||
\i[420]奇跡の果実 (\i[420]Miracle Fruit)
|
||||
\i[424]ひらたけ (\i[424]Oyster Mushroom)
|
||||
\i[424]まいたけ (\i[424]Maitake Mushroom)
|
||||
\i[425]エリンギ (\i[425]King Oyster Mushroom)
|
||||
\i[426]奇跡のキノコ (\i[426]Miracle Mushroom)
|
||||
\i[430]鉄鉱石 (\i[430]Iron Ore)
|
||||
\i[431]銅鉱石 (\i[431]Copper Ore)
|
||||
\i[432]銀鉱石 (\i[432]Silver Ore)
|
||||
\i[433]金鉱石 (\i[433]Gold Ore)
|
||||
\i[436]木の枝 (\i[436]Wooden Branch)
|
||||
\i[437]麻 (\i[437]Hemp)
|
||||
\i[438]綿 (\i[438]Cotton)
|
||||
\i[439]絹糸 (\i[439]Silk Thread)
|
||||
\i[455]ヘンプ生地 (\i[455]Hemp Fabric)
|
||||
\i[456]コットン生地 (\i[456]Cotton Fabric)
|
||||
\i[457]ラシャ (\i[457]Woolen Cloth)
|
||||
\i[458]紅花 (\i[458]Safflower)
|
||||
\i[459]アズライト (\i[459]Azurite)
|
||||
\i[460]キャベツ (\i[460]Cabbage)
|
||||
\i[461]藁 (\i[461]Straw)
|
||||
\i[462]炭 (\i[462]Charcoal)
|
||||
\i[463]ネギ (\i[463]Leek)
|
||||
\i[464]カード (\i[464]Card)
|
||||
\i[465]スライムの死骸 (\i[465]Slime Remains)
|
||||
\i[466]整髪料 (\i[466]Hair Styling Product)
|
||||
\i[467]シャムシール (\i[467]Shamshir)
|
||||
\i[468]小さな水晶玉 (\i[468]Small Crystal Ball)
|
||||
\i[428]ミラクルカクテル (\i[428]Miracle Cocktail)
|
||||
\i[470]みーちゃんのご飯 (\i[470]Mii-chan's Meal)
|
||||
\i[469]ゴールデンハンマー (\i[469]Golden Hammer)
|
||||
\i[435]パイナップル (\i[435]Pineapple)
|
||||
\i[162]デスナイトママの敗北証明書 (\i[162]Defeat Certificate of Death Knight Mama)
|
||||
\i[162]魔王の敗北証明書 (\i[162]Defeat Certificate of the Demon King)
|
||||
\i[280]帰還石 (\i[280]Return Stone)
|
||||
\i[440]次元の欠片 (\i[440]Dimensional Fragment)
|
||||
\i[312]\c[22]処女の記憶 (\i[312]\c[22]Memory of a Virgin)
|
||||
\i[556]手記の断片① (\i[556]Journal Fragment ①)
|
||||
\i[556]手記の断片② (\i[556]Journal Fragment ②)
|
||||
\i[556]手記の断片③ (\i[556]Journal Fragment ③)
|
||||
\i[556]手記の断片④ (\i[556]Journal Fragment ④)
|
||||
\i[556]手記の断片⑤ (\i[556]Journal Fragment ⑤)
|
||||
\i[556]手記の断片⑥ (\i[556]Journal Fragment ⑥)
|
||||
\i[556]手記の断片⑦ (\i[556]Journal Fragment ⑦)
|
||||
\i[800]替えのパンツ (\i[800]Spare Panties)
|
||||
\i[447]赤染料 (\i[447]Red Dye)
|
||||
\i[448]青染料 (\i[448]Blue Dye)
|
||||
\i[449]緑染料 (\i[449]Green Dye)
|
||||
\i[450]麦わらのゾフィのコス (\i[450]Zoffy's Straw Costume)
|
||||
\i[450]釜戸 石炭次郎のコス (\i[450]Kamado Sekitanjiro's Costume)
|
||||
\i[450]終音イクのコス (\i[450]Owarine Iku's Costume)
|
||||
\i[450]カードマスターさくらのコス (\i[450]Card Master Sakura's Costume)
|
||||
\i[450]碇珍人のコス (\i[450]Ikari Chinjin's Costume)
|
||||
\i[450]上中条トーマのコス (\i[450]Kaminakajo Toma's Costume)
|
||||
\i[450]星影の内藤のコス (\i[450]Hoshikage no Naito's Costume)
|
||||
\i[450]村雨マリッサのコス (\i[450]Murasame Marissa's Costume)
|
||||
\i[263]アトリエの鍵 (\i[263]Atelier Key)
|
||||
\i[280]綺麗な石 (\i[280]Beautiful Stone)
|
||||
\i[477]緋色の宝玉 (\i[477]Scarlet Jewel)
|
||||
\i[555]配線F(縦) (\i[555]Wiring F (Vertical))
|
||||
\i[277]マッシュドリンク (\i[277]Mash Drink)
|
||||
\i[277]ハイマッシュドリンク (\i[277]High Mash Drink)
|
||||
\i[277]ハイパーマッシュドリンク (\i[277]Hyper Mash Drink)
|
||||
\i[277]ウルトラマッシュドリンク (\i[277]Ultra Mash Drink)
|
||||
\i[479]\c[5]瞬間おしっこドリンク (\i[479]\c[5]Instant Pee Drink)
|
||||
\c[22]スキルキャンディー (\c[22]Skill Candy)
|
||||
\i[493]\c[19]\f[20]ブーストドリンクα (\i[493]\c[19]\f[20]Boost Drink α)
|
||||
\i[493]\c[20]\f[20]ブーストドリンクβ (\i[493]\c[20]\f[20]Boost Drink β)
|
||||
\i[493]\c[21]\f[20]ブーストドリンクγ (\i[493]\c[21]\f[20]Boost Drink γ)
|
||||
\i[493]\c[22]\f[20]ブーストドリンクδ (\i[493]\c[22]\f[20]Boost Drink δ)
|
||||
アイテム配布ポイントへ (To the item distribution point)
|
||||
|
||||
```
|
||||
Loading…
Reference in a new issue