Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Shin/Kyuu Kanji Conversion #29

Open
jet082 opened this issue May 17, 2023 · 3 comments
Open

Support Shin/Kyuu Kanji Conversion #29

jet082 opened this issue May 17, 2023 · 3 comments

Comments

@jet082
Copy link

jet082 commented May 17, 2023

It would be nice for standardizing text inputs to be able to switch a string from shin to kyuu (or vice-versa).

@jet082
Copy link
Author

jet082 commented May 17, 2023

I do not know if it is helpful, but I wrote the following code for a project I am working on and it might be possible to incorporate some of it into your project?

def toShin(someString):
	for someChar in kyuu.keys():
		someString = someString.replace(someChar, kyuu[someChar])
	return someString

def toKyuu(someString):
	for someChar in shin.keys():
		someString = someString.replace(someChar, shin[someChar])
	return someString

kyuu = {}
kyuu['亞'] = '亜'
kyuu['惡'] = '悪'
kyuu['壓'] = '圧'
kyuu['圍'] = '囲'
kyuu['醫'] = '医'
kyuu['爲'] = '為'
kyuu['壹'] = '壱'
kyuu['逸'] = '逸'
kyuu['飮'] = '飲'
kyuu['隱'] = '隠'
kyuu['羽'] = '羽'
kyuu['榮'] = '栄'
kyuu['營'] = '営'
kyuu['銳'] = '鋭'
kyuu['衞'] = '衛'
kyuu['益'] = '益'
kyuu['驛'] = '駅'
kyuu['悅'] = '悦'
kyuu['謁'] = '謁'
kyuu['閱'] = '閲'
kyuu['圓'] = '円'
kyuu['鹽'] = '塩'
kyuu['緣'] = '縁'
kyuu['艷'] = '艶'
kyuu['應'] = '応'
kyuu['歐'] = '欧'
kyuu['毆'] = '殴'
kyuu['櫻'] = '桜'
kyuu['奧'] = '奥'
kyuu['橫'] = '横'
kyuu['溫'] = '温'
kyuu['穩'] = '穏'
kyuu['假'] = '仮'
kyuu['價'] = '価'
kyuu['禍'] = '禍'
kyuu['畫'] = '画'
kyuu['會'] = '会'
kyuu['悔'] = '悔'
kyuu['海'] = '海'
kyuu['繪'] = '絵'
kyuu['壞'] = '壊'
kyuu['懷'] = '懐'
kyuu['慨'] = '慨'
kyuu['槪'] = '概'
kyuu['擴'] = '拡'
kyuu['殼'] = '殻'
kyuu['覺'] = '覚'
kyuu['學'] = '学'
kyuu['嶽'] = '岳'
kyuu['樂'] = '楽'
kyuu['喝'] = '喝'
kyuu['渴'] = '渇'
kyuu['褐'] = '褐'
kyuu['鐮'] = '鎌'
kyuu['罐'] = '缶'
kyuu['卷'] = '巻'
kyuu['陷'] = '陥'
kyuu['閒'] = '間'
kyuu['勸'] = '勧'
kyuu['寬'] = '寛'
kyuu['漢'] = '漢'
kyuu['關'] = '関'
kyuu['歡'] = '歓'
kyuu['館'] = '館'
kyuu['觀'] = '観'
kyuu['顏'] = '顔'
kyuu['巖'] = '巌'
kyuu['氣'] = '気'
kyuu['祈'] = '祈'
kyuu['既'] = '既'
kyuu['旣'] = '既'
kyuu['歸'] = '帰'
kyuu['龜'] = '亀'
kyuu['器'] = '器'
kyuu['僞'] = '偽'
kyuu['戲'] = '戯'
kyuu['犧'] = '犠'
kyuu['卻'] = '却'
kyuu['舊'] = '旧'
kyuu['據'] = '拠'
kyuu['擧'] = '挙'
kyuu['虛'] = '虚'
kyuu['峽'] = '峡'
kyuu['挾'] = '挟'
kyuu['狹'] = '狭'
kyuu['强'] = '強'
kyuu['敎'] = '教'
kyuu['鄕'] = '郷'
kyuu['響'] = '響'
kyuu['堯'] = '尭'
kyuu['曉'] = '暁'
kyuu['勤'] = '勤'
kyuu['謹'] = '謹'
kyuu['區'] = '区'
kyuu['驅'] = '駆'
kyuu['勳'] = '勲'
kyuu['薰'] = '薫'
kyuu['徑'] = '径'
kyuu['莖'] = '茎'
kyuu['契'] = '契'
kyuu['惠'] = '恵'
kyuu['揭'] = '掲'
kyuu['溪'] = '渓'
kyuu['經'] = '経'
kyuu['螢'] = '蛍'
kyuu['輕'] = '軽'
kyuu['繼'] = '継'
kyuu['鷄'] = '鶏'
kyuu['藝'] = '芸'
kyuu['擊'] = '撃'
kyuu['缺'] = '欠'
kyuu['硏'] = '研'
kyuu['縣'] = '県'
kyuu['儉'] = '倹'
kyuu['劍'] = '剣'
kyuu['險'] = '険'
kyuu['圈'] = '圏'
kyuu['檢'] = '検'
kyuu['獻'] = '献'
kyuu['權'] = '権'
kyuu['顯'] = '顕'
kyuu['驗'] = '験'
kyuu['彥'] = '彦'
kyuu['嚴'] = '厳'
kyuu['戶'] = '戸'
kyuu['吳'] = '呉'
kyuu['娛'] = '娯'
kyuu['廣'] = '広'
kyuu['效'] = '効'
kyuu['恆'] = '恒'
kyuu['黃'] = '黄'
kyuu['鑛'] = '鉱'
kyuu['號'] = '号'
kyuu['吿'] = '告'
kyuu['國'] = '国'
kyuu['黑'] = '黒'
kyuu['穀'] = '穀'
kyuu['碎'] = '砕'
kyuu['濟'] = '済'
kyuu['齋'] = '斎'
kyuu['歲'] = '歳'
kyuu['劑'] = '剤'
kyuu['册'] = '冊'
kyuu['殺'] = '殺'
kyuu['雜'] = '雑'
kyuu['參'] = '参'
kyuu['棧'] = '桟'
kyuu['蠶'] = '蚕'
kyuu['慘'] = '惨'
kyuu['產'] = '産'
kyuu['贊'] = '賛'
kyuu['殘'] = '残'
kyuu['絲'] = '糸'
kyuu['祉'] = '祉'
kyuu['視'] = '視'
kyuu['齒'] = '歯'
kyuu['飼'] = '飼'
kyuu['兒'] = '児'
kyuu['辭'] = '辞'
kyuu['濕'] = '湿'
kyuu['實'] = '実'
kyuu['寫'] = '写'
kyuu['社'] = '社'
kyuu['舍'] = '舎'
kyuu['者'] = '者'
kyuu['煮'] = '煮'
kyuu['釋'] = '釈'
kyuu['壽'] = '寿'
kyuu['收'] = '収'
kyuu['臭'] = '臭'
kyuu['從'] = '従'
kyuu['澁'] = '渋'
kyuu['獸'] = '獣'
kyuu['縱'] = '縦'
kyuu['祝'] = '祝'
kyuu['肅'] = '粛'
kyuu['處'] = '処'
kyuu['渚'] = '渚'
kyuu['暑'] = '暑'
kyuu['署'] = '署'
kyuu['緖'] = '緒'
kyuu['諸'] = '諸'
kyuu['敍'] = '叙'
kyuu['尙'] = '尚'
kyuu['將'] = '将'
kyuu['祥'] = '祥'
kyuu['稱'] = '称'
kyuu['涉'] = '渉'
kyuu['燒'] = '焼'
kyuu['證'] = '証'
kyuu['奬'] = '奨'
kyuu['條'] = '条'
kyuu['狀'] = '状'
kyuu['乘'] = '乗'
kyuu['淨'] = '浄'
kyuu['剩'] = '剰'
kyuu['疊'] = '畳'
kyuu['繩'] = '縄'
kyuu['壤'] = '壌'
kyuu['孃'] = '嬢'
kyuu['穰'] = '穣'
kyuu['讓'] = '譲'
kyuu['釀'] = '醸'
kyuu['觸'] = '触'
kyuu['囑'] = '嘱'
kyuu['神'] = '神'
kyuu['晉'] = '晋'
kyuu['眞'] = '真'
kyuu['寢'] = '寝'
kyuu['愼'] = '慎'
kyuu['盡'] = '尽'
kyuu['圖'] = '図'
kyuu['粹'] = '粋'
kyuu['醉'] = '酔'
kyuu['穗'] = '穂'
kyuu['隨'] = '随'
kyuu['髓'] = '髄'
kyuu['樞'] = '枢'
kyuu['數'] = '数'
kyuu['瀨'] = '瀬'
kyuu['聲'] = '声'
kyuu['靑'] = '青'
kyuu['齊'] = '斉'
kyuu['淸'] = '清'
kyuu['晴'] = '晴'
kyuu['靖'] = '靖'
kyuu['精'] = '精'
kyuu['靜'] = '静'
kyuu['稅'] = '税'
kyuu['竊'] = '窃'
kyuu['攝'] = '摂'
kyuu['節'] = '節'
kyuu['說'] = '説'
kyuu['絕'] = '絶'
kyuu['專'] = '専'
kyuu['淺'] = '浅'
kyuu['戰'] = '戦'
kyuu['踐'] = '践'
kyuu['錢'] = '銭'
kyuu['潛'] = '潜'
kyuu['纖'] = '繊'
kyuu['禪'] = '禅'
kyuu['祖'] = '祖'
kyuu['雙'] = '双'
kyuu['壯'] = '壮'
kyuu['爭'] = '争'
kyuu['莊'] = '荘'
kyuu['搜'] = '捜'
kyuu['插'] = '挿'
kyuu['巢'] = '巣'
kyuu['曾'] = '曽'
kyuu['瘦'] = '痩'
kyuu['裝'] = '装'
kyuu['僧'] = '僧'
kyuu['層'] = '層'
kyuu['總'] = '総'
kyuu['聰'] = '聡'
kyuu['騷'] = '騒'
kyuu['增'] = '増'
kyuu['憎'] = '憎'
kyuu['藏'] = '蔵'
kyuu['贈'] = '贈'
kyuu['臟'] = '臓'
kyuu['卽'] = '即'
kyuu['屬'] = '属'
kyuu['續'] = '続'
kyuu['墮'] = '堕'
kyuu['對'] = '対'
kyuu['體'] = '体'
kyuu['帶'] = '帯'
kyuu['滯'] = '滞'
kyuu['臺'] = '台'
kyuu['瀧'] = '滝'
kyuu['擇'] = '択'
kyuu['澤'] = '沢'
kyuu['琢'] = '琢'
kyuu['脫'] = '脱'
kyuu['擔'] = '担'
kyuu['單'] = '単'
kyuu['膽'] = '胆'
kyuu['嘆'] = '嘆'
kyuu['團'] = '団'
kyuu['斷'] = '断'
kyuu['彈'] = '弾'
kyuu['遲'] = '遅'
kyuu['癡'] = '痴'
kyuu['蟲'] = '虫'
kyuu['晝'] = '昼'
kyuu['鑄'] = '鋳'
kyuu['著'] = '著'
kyuu['猪'] = '猪'
kyuu['廳'] = '庁'
kyuu['徵'] = '徴'
kyuu['聽'] = '聴'
kyuu['懲'] = '懲'
kyuu['敕'] = '勅'
kyuu['鎭'] = '鎮'
kyuu['塚'] = '塚'
kyuu['禎'] = '禎'
kyuu['遞'] = '逓'
kyuu['鐵'] = '鉄'
kyuu['點'] = '点'
kyuu['轉'] = '転'
kyuu['傳'] = '伝'
kyuu['都'] = '都'
kyuu['燈'] = '灯'
kyuu['當'] = '当'
kyuu['黨'] = '党'
kyuu['盜'] = '盗'
kyuu['稻'] = '稲'
kyuu['鬪'] = '闘'
kyuu['鬭'] = '闘'
kyuu['德'] = '徳'
kyuu['獨'] = '独'
kyuu['讀'] = '読'
kyuu['突'] = '突'
kyuu['屆'] = '届'
kyuu['內'] = '内'
kyuu['難'] = '難'
kyuu['貳'] = '弐'
kyuu['惱'] = '悩'
kyuu['腦'] = '脳'
kyuu['霸'] = '覇'
kyuu['拜'] = '拝'
kyuu['廢'] = '廃'
kyuu['賣'] = '売'
kyuu['梅'] = '梅'
kyuu['麥'] = '麦'
kyuu['發'] = '発'
kyuu['髮'] = '髪'
kyuu['拔'] = '抜'
kyuu['飯'] = '飯'
kyuu['繁'] = '繁'
kyuu['晚'] = '晩'
kyuu['蠻'] = '蛮'
kyuu['卑'] = '卑'
kyuu['祕'] = '秘'
kyuu['碑'] = '碑'
kyuu['姬'] = '姫'
kyuu['濱'] = '浜'
kyuu['賓'] = '賓'
kyuu['頻'] = '頻'
kyuu['敏'] = '敏'
kyuu['甁'] = '瓶'
kyuu['侮'] = '侮'
kyuu['福'] = '福'
kyuu['拂'] = '払'
kyuu['佛'] = '仏'
kyuu['倂'] = '併'
kyuu['竝'] = '並'
kyuu['塀'] = '塀'
kyuu['餠'] = '餅'
kyuu['邊'] = '辺'
kyuu['變'] = '変'
kyuu['辯'] = '弁'
kyuu['辨'] = '弁'
kyuu['瓣'] = '弁'
kyuu['勉'] = '勉'
kyuu['步'] = '歩'
kyuu['舖'] = '舗'
kyuu['寶'] = '宝'
kyuu['豐'] = '豊'
kyuu['襃'] = '褒'
kyuu['墨'] = '墨'
kyuu['沒'] = '没'
kyuu['飜'] = '翻'
kyuu['槇'] = '槙'
kyuu['每'] = '毎'
kyuu['萬'] = '万'
kyuu['滿'] = '満'
kyuu['免'] = '免'
kyuu['麵'] = '麺'
kyuu['默'] = '黙'
kyuu['彌'] = '弥'
kyuu['譯'] = '訳'
kyuu['藥'] = '薬'
kyuu['祐'] = '祐'
kyuu['與'] = '与'
kyuu['豫'] = '予'
kyuu['餘'] = '余'
kyuu['譽'] = '誉'
kyuu['搖'] = '揺'
kyuu['樣'] = '様'
kyuu['謠'] = '謡'
kyuu['遙'] = '遥'
kyuu['瑤'] = '瑶'
kyuu['來'] = '来'
kyuu['賴'] = '頼'
kyuu['亂'] = '乱'
kyuu['覽'] = '覧'
kyuu['欄'] = '欄'
kyuu['龍'] = '竜'
kyuu['隆'] = '隆'
kyuu['旅'] = '旅'
kyuu['虜'] = '虜'
kyuu['兩'] = '両'
kyuu['獵'] = '猟'
kyuu['綠'] = '緑'
kyuu['鄰'] = '隣'
kyuu['淚'] = '涙'
kyuu['壘'] = '塁'
kyuu['類'] = '類'
kyuu['禮'] = '礼'
kyuu['勵'] = '励'
kyuu['戾'] = '戻'
kyuu['靈'] = '霊'
kyuu['隸'] = '隷'
kyuu['齡'] = '齢'
kyuu['曆'] = '暦'
kyuu['歷'] = '歴'
kyuu['戀'] = '恋'
kyuu['廉'] = '廉'
kyuu['練'] = '練'
kyuu['鍊'] = '錬'
kyuu['爐'] = '炉'
kyuu['勞'] = '労'
kyuu['郞'] = '郎'
kyuu['朗'] = '朗'
kyuu['廊'] = '廊'
kyuu['樓'] = '楼'
kyuu['祿'] = '禄'
kyuu['錄'] = '録'
kyuu['灣'] = '湾'
shin = dict((v, k) for k, v in kyuu.items())

@ikegami-yukino
Copy link
Owner

ikegami-yukino commented Jan 12, 2025

@jet082
What do you think about proper nouns?
I don't think it's a good idea to replace old kanji with new kanji for proper nouns that contain old kanji.

If we can find a solution to this issue, I think it's a good idea 👍

@ikegami-yukino
Copy link
Owner

@jet082
I apologize for the inappropriate message I sent earlier.
If the function is deterministic, I think adding the function to jaconv is OK.
Whether the target text contains proper nouns is up to the user to decide, and jaconv is not responsible for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants