Progress on Kanji to Romaji

Advertisemen

So I began writing in Java, however after nearly completing it Java decided to spout an OutOfMemoryException. Just had to store two hashmaps, one for the On readings, the other for the Kun readings. Parsing the second XML file gave me an OutOfMemory exception. So I switched to C#. Very annoying since it was almost complete.

But anyhow, C# version is in progress, it's nice to start again as the code can be refactored and cleaned up. So far, I have kanji being parsed (only into Kata and Hira as the functionality to translate them both hasn't been implemented. Below are some test runs (modified Dir en grey song titles):


Kanji Expected Romaji Output Kata/Hira Output Romaji
凱歌沈黙頃 gaika chinmoku goro ガイ カ チン モク ケイ gai ka chin moku kei
欲巣欲巣 yoku su yoku su ヨク ソウ ヨク ソウ yoku sou yoku sou
獣慾 jyuuyoku ジュウ ヨク juu yoku
akatsuki ギョウ gyou
激闇雨 geki yame u ゲキ アン ウ geki an u

Note that for 獣慾, the romaji translator gives shishi yoku as output, however, it should be jyuuyoku.

So the tests were nowhere near good enough, some further refactoring:
y>KanjiExpected RomajiOutput Kata/HiraOutput Romaji凱歌沈黙頃gaika chinmoku goroがいか チン モク ころgaika chin moku koro欲巣欲巣yoku su yoku suよく す よく すyoku su yoku su獣慾jyuuyokuけもの ヨクke mo no yoku暁akatsukiあかつきakatsuki激闇雨geki yame uげき やみ あめ geki ya mi ame  
I know checked 獣慾 in the XML and I'm not parsing all the data, so that isn't coming out correctly.

A so onto another round of testing!

KanjiExpected RomajiOutput Kata/HiraOutput Romaji
凱歌沈黙頃gaika chinmoku goroガイ カ チン モク ころgai ka chin moku koro
欲巣欲巣yoku su yoku suよく す よく すyoku su yoku su
獣慾jyuuyokuジュウ ヨクjyuuyoku
akatsukiあかつきakatsuki
激闇雨geki yame uカチンとくる アン ウkachin to kuru an u

Aside from spacing errors, the only incorrect one is the last one, which is completely incorrect!

Advertisemen

Disclaimer: Gambar, artikel ataupun video yang ada di web ini terkadang berasal dari berbagai sumber media lain. Hak Cipta sepenuhnya dipegang oleh sumber tersebut. Jika ada masalah terkait hal ini, Anda dapat menghubungi kami disini.

Tidak ada komentar:

Posting Komentar

© Copyright 2017 Game Engine Tutorial