Upd: Keywords in 1.1

This commit is contained in:
LmeSzinc 2023-07-24 22:56:48 +08:00
parent b2ab868351
commit 3e5a9d4625
5 changed files with 174 additions and 85 deletions

View File

@ -13,7 +13,7 @@ UI_LANGUAGES = ['cn', 'cht', 'en', 'jp']
def text_to_variable(text):
text = re.sub("'s |s' ", '_', text)
text = re.sub('[ \-—:\'/]+', '_', text)
text = re.sub('[ \-—:\'/]+', '_', text)
text = re.sub(r'[(),#]|</?\w+>', '', text)
# text = re.sub(r'[#_]?\d+(_times?)?', '', text)
return text
@ -100,6 +100,7 @@ def replace_templates(text: str) -> str:
class KeywordExtract:
def __init__(self):
self.text_map: dict[str, TextMap] = {lang: TextMap(lang) for lang in UI_LANGUAGES}
self.text_map['cn'] = TextMap('chs')
self.keywords_id: list[int] = []
def iter_guide(self) -> t.Iterable[int]:

View File

@ -23,7 +23,7 @@ Synthesis_Materials = AssignmentGroup(
id=3,
name='Synthesis_Materials',
cn='合成材料',
cht='合成',
cht='合成',
en='Synthesis Materials',
jp='合成材料',
)

View File

@ -27,8 +27,16 @@ Bailu = CharacterList(
en='Bailu',
jp='白露',
)
Bronya = CharacterList(
Blade = CharacterList(
id=4,
name='Blade',
cn='',
cht='',
en='Blade',
jp='',
)
Bronya = CharacterList(
id=5,
name='Bronya',
cn='布洛妮娅',
cht='布洛妮婭',
@ -36,7 +44,7 @@ Bronya = CharacterList(
jp='ブローニャ',
)
Clara = CharacterList(
id=5,
id=6,
name='Clara',
cn='克拉拉',
cht='克拉拉',
@ -44,15 +52,23 @@ Clara = CharacterList(
jp='クラーラ',
)
DanHeng = CharacterList(
id=6,
id=7,
name='DanHeng',
cn='丹恒',
cht='丹恆',
en='Dan Heng',
jp='丹恒',
)
DanHengImbibitorLunae = CharacterList(
id=8,
name='DanHengImbibitorLunae',
cn='丹恒•饮月',
cht='丹恆•飲月',
en='Dan Heng•Imbibitor Lunae',
jp='丹恒・飲月',
)
Gepard = CharacterList(
id=7,
id=9,
name='Gepard',
cn='杰帕德',
cht='傑帕德',
@ -60,7 +76,7 @@ Gepard = CharacterList(
jp='ジェパード',
)
Herta = CharacterList(
id=8,
id=10,
name='Herta',
cn='黑塔',
cht='黑塔',
@ -68,7 +84,7 @@ Herta = CharacterList(
jp='ヘルタ',
)
Himeko = CharacterList(
id=9,
id=11,
name='Himeko',
cn='姬子',
cht='姬子',
@ -76,7 +92,7 @@ Himeko = CharacterList(
jp='姫子',
)
Hook = CharacterList(
id=10,
id=12,
name='Hook',
cn='虎克',
cht='虎克',
@ -84,7 +100,7 @@ Hook = CharacterList(
jp='フック',
)
JingYuan = CharacterList(
id=11,
id=13,
name='JingYuan',
cn='景元',
cht='景元',
@ -92,15 +108,23 @@ JingYuan = CharacterList(
jp='景元',
)
Kafka = CharacterList(
id=12,
id=14,
name='Kafka',
cn='卡芙卡',
cht='卡芙卡',
en='Kafka',
jp='カフカ',
)
Luka = CharacterList(
id=15,
name='Luka',
cn='卢卡',
cht='盧卡',
en='Luka',
jp='ルカ',
)
Luocha = CharacterList(
id=13,
id=16,
name='Luocha',
cn='罗刹',
cht='羅剎',
@ -108,7 +132,7 @@ Luocha = CharacterList(
jp='羅刹',
)
March7th = CharacterList(
id=14,
id=17,
name='March7th',
cn='三月七',
cht='三月七',
@ -116,7 +140,7 @@ March7th = CharacterList(
jp='三月なのか',
)
Natasha = CharacterList(
id=15,
id=18,
name='Natasha',
cn='娜塔莎',
cht='娜塔莎',
@ -124,7 +148,7 @@ Natasha = CharacterList(
jp='ナターシャ',
)
Pela = CharacterList(
id=16,
id=19,
name='Pela',
cn='佩拉',
cht='佩拉',
@ -132,7 +156,7 @@ Pela = CharacterList(
jp='ペラ',
)
Qingque = CharacterList(
id=17,
id=20,
name='Qingque',
cn='青雀',
cht='青雀',
@ -140,7 +164,7 @@ Qingque = CharacterList(
jp='青雀',
)
Sampo = CharacterList(
id=18,
id=21,
name='Sampo',
cn='桑博',
cht='桑博',
@ -148,7 +172,7 @@ Sampo = CharacterList(
jp='サンポ',
)
Seele = CharacterList(
id=19,
id=22,
name='Seele',
cn='希儿',
cht='希兒',
@ -156,7 +180,7 @@ Seele = CharacterList(
jp='ゼーレ',
)
Serval = CharacterList(
id=20,
id=23,
name='Serval',
cn='希露瓦',
cht='希露瓦',
@ -164,7 +188,7 @@ Serval = CharacterList(
jp='セーバル',
)
SilverWolf = CharacterList(
id=21,
id=24,
name='SilverWolf',
cn='银狼',
cht='銀狼',
@ -172,7 +196,7 @@ SilverWolf = CharacterList(
jp='銀狼',
)
Sushang = CharacterList(
id=22,
id=25,
name='Sushang',
cn='素裳',
cht='素裳',
@ -180,31 +204,31 @@ Sushang = CharacterList(
jp='素裳',
)
Tingyun = CharacterList(
id=23,
id=26,
name='Tingyun',
cn='停云',
cht='停雲',
en='Tingyun',
jp='停雲',
)
TrailblazertheDestruction = CharacterList(
id=24,
name='TrailblazertheDestruction',
TrailblazerDestruction = CharacterList(
id=27,
name='TrailblazerDestruction',
cn='Trailblazer•毁灭',
cht='Trailblazer•毀滅',
en='Trailblazer: the Destruction',
en='Trailblazer: Destruction',
jp='Trailblazer・壊滅',
)
TrailblazerthePreservation = CharacterList(
id=25,
name='TrailblazerthePreservation',
TrailblazerPreservation = CharacterList(
id=28,
name='TrailblazerPreservation',
cn='Trailblazer•存护',
cht='Trailblazer•存護',
en='Trailblazer: the Preservation',
en='Trailblazer: Preservation',
jp='Trailblazer・存護',
)
Welt = CharacterList(
id=26,
id=29,
name='Welt',
cn='瓦尔特',
cht='瓦爾特',
@ -212,7 +236,7 @@ Welt = CharacterList(
jp='ヴェルト',
)
Yanqing = CharacterList(
id=27,
id=30,
name='Yanqing',
cn='彦卿',
cht='彥卿',
@ -220,7 +244,7 @@ Yanqing = CharacterList(
jp='彦卿',
)
Yukong = CharacterList(
id=28,
id=31,
name='Yukong',
cn='驭空',
cht='馭空',

View File

@ -79,7 +79,7 @@ Use_Technique_2_times = DailyQuest(
id=10,
name='Use_Technique_2_times',
cn='累计施放2次秘技',
cht='施放2次秘技',
cht='施放2次秘技',
en='Use Technique 2 times',
jp='秘技を累計2回発動する',
)
@ -103,7 +103,7 @@ Destroy_3_destructible_objects = DailyQuest(
id=13,
name='Destroy_3_destructible_objects',
cn='累计击碎3个可破坏物',
cht='擊碎3個可破壞物',
cht='擊碎3個可破壞物',
en='Destroy 3 destructible objects',
jp='破壊できるオブジェクトを累計で3つ破壊する',
)

View File

@ -48,7 +48,7 @@ Calyx_Crimson_Hunt = DungeonList(
name='Calyx_Crimson_Hunt',
cn='巡猎之蕾•拟造花萼(赤)',
cht='巡獵之蕾•擬造花萼(赤)',
en='Calyx (Crimson): Bud of Hunt',
en='Bud of Hunt',
jp='疑似花萼(赤)・巡狩の蕾',
)
Calyx_Crimson_Abundance = DungeonList(
@ -155,56 +155,72 @@ Stagnant_Shadow_Doom = DungeonList(
en='Shape of Doom',
jp='凝結虚影・震厄の形',
)
Cavern_of_Corrosion_Path_of_Gelid_Wind = DungeonList(
Stagnant_Shadow_Celestial = DungeonList(
id=20,
name='Cavern_of_Corrosion_Path_of_Gelid_Wind',
name='Stagnant_Shadow_Celestial',
cn='天人之形•凝滞虚影',
cht='天人之形•凝滯虛影',
en='Shape of Celestial',
jp='凝結虚影・天人の形',
)
Path_of_Gelid_Wind = DungeonList(
id=21,
name='Path_of_Gelid_Wind',
cn='霜风之径•侵蚀隧洞',
cht='霜風之徑•侵蝕隧洞',
en='Cavern of Corrosion: Path of Gelid Wind',
en='Path of Gelid Wind',
jp='侵蝕トンネル・霜風の路',
)
Cavern_of_Corrosion_Path_of_Jabbing_Punch = DungeonList(
id=21,
name='Cavern_of_Corrosion_Path_of_Jabbing_Punch',
Path_of_Jabbing_Punch = DungeonList(
id=22,
name='Path_of_Jabbing_Punch',
cn='迅拳之径•侵蚀隧洞',
cht='迅拳之徑•侵蝕隧洞',
en='Cavern of Corrosion: Path of Jabbing Punch',
en='Path of Jabbing Punch',
jp='侵蝕トンネル・迅拳の路',
)
Cavern_of_Corrosion_Path_of_Drifting = DungeonList(
id=22,
name='Cavern_of_Corrosion_Path_of_Drifting',
Path_of_Drifting = DungeonList(
id=23,
name='Path_of_Drifting',
cn='漂泊之径•侵蚀隧洞',
cht='漂泊之徑•侵蝕隧洞',
en='Cavern of Corrosion: Path of Drifting',
en='Path of Drifting',
jp='侵蝕トンネル・漂泊の路',
)
Cavern_of_Corrosion_Path_of_Providence = DungeonList(
id=23,
name='Cavern_of_Corrosion_Path_of_Providence',
Path_of_Providence = DungeonList(
id=24,
name='Path_of_Providence',
cn='睿治之径•侵蚀隧洞',
cht='睿治之徑•侵蝕隧洞',
en='Cavern of Corrosion: Path of Providence',
en='Path of Providence',
jp='侵蝕トンネル・睿治の路',
)
Cavern_of_Corrosion_Path_of_Holy_Hymn = DungeonList(
id=24,
name='Cavern_of_Corrosion_Path_of_Holy_Hymn',
Path_of_Holy_Hymn = DungeonList(
id=25,
name='Path_of_Holy_Hymn',
cn='圣颂之径•侵蚀隧洞',
cht='聖頌之徑•侵蝕隧洞',
en='Cavern of Corrosion: Path of Holy Hymn',
en='Path of Holy Hymn',
jp='侵蝕トンネル・聖頌の路',
)
Cavern_of_Corrosion_Path_of_Conflagration = DungeonList(
id=25,
name='Cavern_of_Corrosion_Path_of_Conflagration',
Path_of_Conflagration = DungeonList(
id=26,
name='Path_of_Conflagration',
cn='野焰之径•侵蚀隧洞',
cht='野焰之徑•侵蝕隧洞',
en='Cavern of Corrosion: Path of Conflagration',
en='Path of Conflagration',
jp='侵蝕トンネル・野焔の路',
)
Path_of_Elixir_Seekers = DungeonList(
id=27,
name='Path_of_Elixir_Seekers',
cn='药使之径•侵蚀隧洞',
cht='藥使之徑•侵蝕隧洞',
en='Path of Elixir Seekers',
jp='侵蝕トンネル・薬使の路',
)
Destruction_Beginning = DungeonList(
id=26,
id=28,
name='Destruction_Beginning',
cn='毁灭的开端•历战余响',
cht='毀滅的開端•歷戰餘響',
@ -212,15 +228,23 @@ Destruction_Beginning = DungeonList(
jp='歴戦余韻・壊滅の始まり',
)
Echo_of_War_End_of_the_Eternal_Freeze = DungeonList(
id=27,
id=29,
name='Echo_of_War_End_of_the_Eternal_Freeze',
cn='寒潮的落幕•历战余响',
cht='寒潮的落幕•歷戰餘響',
en='End of the Eternal Freeze',
jp='歴戦余韻・寒波の幕切れ',
)
Divine_Seed = DungeonList(
id=30,
name='Divine_Seed',
cn='不死的神实•历战余响',
cht='不死的神實•歷戰餘響',
en='Divine Seed',
jp='歴戦余韻・不死の神実',
)
Simulated_Universe_World_1 = DungeonList(
id=28,
id=31,
name='Simulated_Universe_World_1',
cn='第一世界•模拟宇宙',
cht='第一世界•模擬宇宙',
@ -228,7 +252,7 @@ Simulated_Universe_World_1 = DungeonList(
jp='第一世界・模擬宇宙',
)
Simulated_Universe_World_3 = DungeonList(
id=29,
id=32,
name='Simulated_Universe_World_3',
cn='第三世界•模拟宇宙',
cht='第三世界•模擬宇宙',
@ -236,7 +260,7 @@ Simulated_Universe_World_3 = DungeonList(
jp='第三世界・模擬宇宙',
)
Simulated_Universe_World_4 = DungeonList(
id=30,
id=33,
name='Simulated_Universe_World_4',
cn='第四世界•模拟宇宙',
cht='第四世界•模擬宇宙',
@ -244,7 +268,7 @@ Simulated_Universe_World_4 = DungeonList(
jp='第四世界・模擬宇宙',
)
Simulated_Universe_World_5 = DungeonList(
id=31,
id=34,
name='Simulated_Universe_World_5',
cn='第五世界•模拟宇宙',
cht='第五世界•模擬宇宙',
@ -252,47 +276,63 @@ Simulated_Universe_World_5 = DungeonList(
jp='第五世界・模擬宇宙',
)
Simulated_Universe_World_6 = DungeonList(
id=32,
id=35,
name='Simulated_Universe_World_6',
cn='第六世界•模拟宇宙',
cht='第六世界•模擬宇宙',
en='Simulated Universe — World 6',
jp='第六世界・模擬宇宙',
)
Favor_of_Amber_Forgotten_Hall = DungeonList(
id=33,
name='Favor_of_Amber_Forgotten_Hall',
Simulated_Universe_World_7 = DungeonList(
id=36,
name='Simulated_Universe_World_7',
cn='第七世界•模拟宇宙',
cht='第七世界•模擬宇宙',
en='Simulated Universe — World 7',
jp='第七世界・模擬宇宙',
)
The_Voyage_of_Navis_Astriger = DungeonList(
id=37,
name='The_Voyage_of_Navis_Astriger',
cn='天艟求仙迷航录',
cht='天艟求仙迷航錄',
en='The Voyage of Navis Astriger',
jp='天艟求仙放浪記',
)
Favor_of_Amber = DungeonList(
id=38,
name='Favor_of_Amber',
cn='琥珀恩赐•忘却之庭',
cht='琥珀恩賜•忘卻之庭',
en='Favor of Amber — Forgotten Hall',
en='Favor of Amber',
jp='琥珀の賜物・忘却の庭',
)
Frostscar_Reverie_Forgotten_Hall = DungeonList(
id=34,
name='Frostscar_Reverie_Forgotten_Hall',
Frostscar_Reverie = DungeonList(
id=39,
name='Frostscar_Reverie',
cn='霜痕旧梦•忘却之庭',
cht='霜痕舊夢•忘卻之庭',
en='Frostscar Reverie — Forgotten Hall',
en='Frostscar Reverie',
jp='霜跡に旧夢・忘却の庭',
)
Everwinter_Trials_Forgotten_Hall = DungeonList(
id=35,
name='Everwinter_Trials_Forgotten_Hall',
Everwinter_Trials = DungeonList(
id=40,
name='Everwinter_Trials',
cn='永冬试炼•忘却之庭',
cht='永冬試煉•忘卻之庭',
en='Everwinter Trials — Forgotten Hall',
en='Everwinter Trials',
jp='常冬の試練・忘却の庭',
)
ColdironTribulation = DungeonList(
id=36,
name='ColdironTribulation',
Coldiron_Tribulation = DungeonList(
id=41,
name='Coldiron_Tribulation',
cn='寒铁砥砺•忘却之庭',
cht='寒鐵砥礪•忘卻之庭',
en='ColdironTribulation',
en='Coldiron Tribulation',
jp='寒鉄練磨・忘却の庭',
)
Hyperborean_Search_for_Warmth = DungeonList(
id=37,
id=42,
name='Hyperborean_Search_for_Warmth',
cn='蹈冰寻火•忘却之庭',
cht='蹈冰尋火•忘卻之庭',
@ -300,15 +340,39 @@ Hyperborean_Search_for_Warmth = DungeonList(
jp='氷踏みて炎求む・忘却の庭',
)
Stormquell = DungeonList(
id=38,
id=43,
name='Stormquell',
cn='风暴止息•忘却之庭',
cht='風暴止息•忘卻之庭',
en='Stormquell',
jp='止息せし嵐・忘却の庭',
)
Adrift_in_Astral_Seas = DungeonList(
id=44,
name='Adrift_in_Astral_Seas',
cn='孤航天海•忘却之庭',
cht='孤航太海•忘卻之庭',
en='Adrift in Astral Seas',
jp='天海の孤航・忘却の庭',
)
Raintear_Strife = DungeonList(
id=45,
name='Raintear_Strife',
cn='泪雨长战•忘却之庭',
cht='淚雨長戰•忘卻之庭',
en='Raintear Strife',
jp='涙雨戦争・忘却の庭',
)
Traces_of_Sanctus_Medicus = DungeonList(
id=46,
name='Traces_of_Sanctus_Medicus',
cn='药王垂迹•忘却之庭',
cht='藥王垂跡•忘卻之庭',
en='Traces of Sanctus Medicus',
jp='薬王の垂迹・忘却の庭',
)
The_Last_Vestiges_of_Towering_Citadel = DungeonList(
id=39,
id=47,
name='The_Last_Vestiges_of_Towering_Citadel',
cn='永屹之城遗秘',
cht='永屹之城遺秘',