in reply to How to Identify a language
Even among the Asian languages with large character inventories, each language may tend to use characters that the other Asian languages do not use.
To the extent that the same characters are used in two or more languages, the frequency ranking of the most commonly used characters in each language will tend to be distinctive, but you need a good sample of known text in each language (at least 50,000 characters in size for any language that uses CJK characters) in order to get good-enough statistics, and even then, the reliability of identification will depend on the size of the text you are trying to identify.
(update: the frequency ranking of character bi-grams will be even more distinctive; you will tend to need more training data to get good statistics, but you can get more reliable results when trying to identify smaller amounts of unknown data.)
If you have data with "legacy" (non-unicode) encodings, like KSC, GB, Big5, Shift-JIS, etc, the encoding tends to correlate with the language, and for that, you can try Encode::Guess, which is actually best suited for identifying among the various Asian legacy encodings.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to Identify a language
by Gavin (Archbishop) on Sep 18, 2006 at 18:33 UTC | |
|
Re^2: How to Identify a language
by Anonymous Monk on Sep 19, 2006 at 16:08 UTC |