62718
I'm fond of Unicode and what romanization attempts. My goal is to get a first
latin char (for sorting purposes) of a non-latin character - so far I
succeeded by transcribing Cyrillic, Greek, Hebrew, Katakana, Hiragana, Hangul
(including all its syllables), Berber, Thai and Arabic letters by assigning
the most appropriate starting letter to each case.

I also know that multiple systems for transliterations and transcribings (and
romanization) exist - so far their differences are almost irrelevant for my
needs. I'm not fond of Japanese itself - at most I might be able to recognize
English terms written in Katakanas.

My problem is: how to assign Unicode code points U+4E00 thru U+9FFF by
algorithm? For Hangul syllables this is quite easy: U+AC00 thru U+B097 => K
(as all of them start with that); U+B098 thru B2E3 => N. I've looked at JS
solutions like <https://github.com/hexenq/kuroshiro/> and
<https://github.com/WaniKani/WanaKana/>, but I only find the code for
processing Hiraganas and Katakanas (which I already got), never Kanjis
(although all of their demos succeed in processing them).

Is there a table or dictionary? If romanization of Kanjis is achieved thru
first converting each Kanji into Katakanas, then how to achieve that?
CC BY-SA 4.0
2018-11-08T11:28:35.920
62716
2018-11-09T02:58:35.993
31873
question
kanji rōmaji unicode
Kanjis to Romajis first letter
**EDIT** : It turned out that OP did not know most kanji have multiple
readings in Japanese. He is actually trying to get the reading of **words**
(e.g., 生地 → K, 生卵 → N, 生命 → S, 生霊 → I). For this purpose, a word-based
dictionary is needed. There are several open source morphological analyzers
that can do the job and more
([kuromoji](https://www.atilika.com/en/kuromoji/),
[mecab](https://github.com/neologd/mecab-ipadic-neologd),
[Kagome](https://github.com/ikawaha/kagome), etc). See also: [Is it possible
to algorithmically convert Japanese text to
Romaji?](https://japanese.stackexchange.com/q/56640/5010)

* * *

### Original Answer

CJK unified ideographs are sorted based on
[radicals](https://en.wikipedia.org/wiki/Radical_\(Chinese_characters\)), not
readings. This is because it's impossible to determine the reading of those
characters in one way. The Unicode Consortium provides [**Unihan
Database**](http://unicode.org/charts/unihan.html), which can display the
representative readings of CJK ideographs written in simple Latin alphabet.
For example, here is the result for a very basic ideograph 日 (U+65E5; "day",
"date", "sun", etc):

[![Readings of
日](https://i.stack.imgur.com/sWUOC.png)](https://i.stack.imgur.com/sWUOC.png)

The table says the "first roman letter of 日" is `J` in Cantonese, `R` in
Mandarin, `H-or-K-or-N-or-J` in Japanese and `I` in Korean. To understand
what's going on here, please keep in mind that the 'CJK Unified Ideographs'
block has characters used in Chinese, Korean and Japanese jumbled together.
Each character is read differently in different languages. Especially in
Japanese, one character [can have many
readings](https://www.tofugu.com/japanese/onyomi-kunyomi/) depending on the
context. To make matters worse, there are some characters [whose readings are
totally unknown](https://japanese.stackexchange.com/q/35856/5010). If you can
accept all those limitations and still want the Latin readings anyway, go
ahead and use the database according to your needs. If you're only interested
in _Japanese_ kanji, a reasonable method would be to pick the first letter of
the `kJapaneseOn` field (or the first letter of `kJapaneseKun` if there is no
`kJapaneseOn`).
CC BY-SA 4.0
2018-11-08T12:35:17.523
62718
2018-11-09T02:58:35.993
2018-11-09T02:58:35.993
5010
5010
62716
answer