{'fraction_non_alphanumeric': 0.029420837510603842, 'fraction_numerical': 0.012570370941621037, 'mean_word_length': 4.6762967826657915, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Building a Japanese-Chinese Dictionary Using Kanji/Hanzi Conversion

A new bilingual dictionary can be built using two existing bilingual dictionaries, such as Japanese-English and English-Chinese to build Japanese-Chinese dictionary. However, Japanese and Chinese are nearer languages than English, there should be a more direct way of doing this. Since a lot of Japanese words are composed of kanji, which are similar to hanzi in Chinese, we attempt to build a dictionary for kanji words by simple conversion from kanji to hanzi. Our survey shows that around 2/3 of the nouns and verbal nouns in Japanese are kanji words, and more than 1/3 of them can be translated into Chinese directly. The accuracy of conversion is 97%. Besides, we obtain translation candidates for 24% of the Japanese words using English as a pivot language with 77% accuracy. By adding the kanji/hanzi conversion method, we increase the candidates by 9%, to 33%, with better quality candidates.

Bilingual dictionaries have unlimited usage. In order for one to learn a new language, a bilingual dictionary can never be absent. In natural language processing community, bilingual dictionaries are useful in many areas, such as machine translation and cross language information retrieval.
In this research, we attempt to build a Japanese-Chinese dictionary using public available resources. There are already some existing Japanese-Chinese dictionaries, such as Shogakukan's Ri-Zhong Cidian [1], but they are not publicly available in electronic form. Our purpose is to build an electronic dictionary from public resources and make it public available.
The first dictionary that we use is IPADIC [2], a Japanese dictionary used by ChaSen [3], a Japanese morphological analyzer. We extract only nouns, verbal nouns and verbs from this dictionary, and try to search for their translation equivalents in Chinese.
One can build a new bilingual dictionary for a new pair of languages using two bilingual lexicons [4][5][6][7][8]. Since it is always easier to get bilingual dictionaries that involve English as one of the languages, using English as a pivot language is possible. In this case, we first look for the English translations of one language, and then try to find the possible candidates in the other language through English. Then we rank the candidates according to the similarities between the two words using some linguistic knowledge and statistical information. In our research, we make use of two public resources, EDICT [9] -a Japanaese-English dictionary and CEDICT [10] -a Chinese-English dictionary, to create the new language pair Japanese-Chinese dictionary using English as a pivot language. We obtain 77% accuracy. However, this method extracts only translations for about 24% of the Japanese words in IPADIC because the EDICT and CEDICT dictionaries are smaller compared with IPADIC. Therefore, we also look into the possibility to get the translation words using kanji/hanzi conversion. In Japanese, there are three types of characters, namely hiragana, katakana and kanji. Kanji characters are similar to Chinese ideographs. In Chinese, all characters are written in hanzi. Since most of the kanji characters are originally from China, the usage should remain unchangeable in certain contexts. The kanji/hanzi conversion method works only on Japanese words that consist only kanji characters. We obtain a high accuracy of 97% using this conversion. By combining the two methods, we increase the number of translation candidates by 9%, from 24% to 33%.

Previous Work
Tanaka and Umemura [4] used English as an intermediate language to link Japanese and French. They are the first who proposed the inverse consultation. The concept behind is that a translation sometimes may have wider or narrower meaning than the source word. They first look up the English translations of a given Japanese word, then the French translations of these English translations. This step gives a set of French candidates equivalent to the Japanese word. For each French candidate, its translations in English is collected. The similarity between the Japanese word and the French word is measured by the number of matches in their English translation. The more matches show the better candidate. This is referred to as "one time inverse consultation". The extension can be furthered by looking up all the Japanese translations of all the English translation of a given French word and seeing how many times the Japanese word appears; this is referred to as "two times inverse consultation".
Bond at al. [6] applied the "one time inverse consultation" in constructing a Japanese-Malay dictionary using a Japanese-English dictionary and a Malay-English dictionary. They also applied the semantic matching using part of speech and second-language matching. Matching only compatible parts of speech could cut down a lot of false matches. The second-language matching score used Chinese as a second intermediate language. If a word pair could be matched through two different languages, it is considered a very good match. Their research showed that about 80% of the translations are good if only highest rank pairs are considered, and 77% for all pairs. Shirai and Yamamoto [7] used English as an intermediate language to link Korean and Japanese. They tried on 1,000 Korean words and were able to obtain the translations for 365 of them. They achieved an accuracy of 72% when the degree of similarity calculated by one time inverse consultation is higher than a predefined threshold.
Zhang et al. [8] used the same approach, that is using English as a pivot language, for constructing Japanese-Chinese pairs. They used the one time inverse consultation method and also the part of speech information for ranking. Since there is similarity between Japanese kanji and Chinese hanzi, they have further improved on the method by using the kanji information [11]. First they searched for the Chinese translations of single character words in Japanese into using one time inverse consultation. If the Unicode of the two characters are the same, then the ranking is higher. After getting this list of character pairs, the similarity between the Japanese word and the Chinese word is calculated using the edit distance algorithm [12]. Finally, the score obtained from the kanji information is added to the final score function. Their ranking method was improved and the precision increased from 66.67% to 81.43%. Since only about 50% of their Japanese words can be translated into Chinese, they also searched for other approaches to translate the remaining words [13] using web information and machines translation method.
Our work is quite similar to Zhang et al. [11] in the way they constructed the kanji/hanzi conversion table. The difference is that instead of calculating the similarity between kanji and hanzi using Unicode and one time inverse consultation, we make a direct conversion from kanji to hanzi based on the ideographs. Our method sounds more intuitive and direct because kanji and hanzi are of the same origin. Later on, they made use of this conversion table to calcutate the similarity between a Japanese word and a Chinese word from the output of using English as the pivot language. Their method can make the similar Chinese words to have higher ranking but cannot generate new translation candidates. On the other hand, our methods works for both.

The Proposed Methods
We propose to combine two methods to find the translations of Japanese entries in IPADIC version 2.7.0 [2]. IPADIC is a monolingual dictionary and consists of 239,631 entries. We only extract nouns, verbal nouns and verbs (a total of 85,553 entries) in our survey. First, we use English as the pivot languege. Second, we make direct conversion from kanji to hanzi for kanji word translation. We now describe in detail the both methods.

Using Third Language: English
First, we use English as the pivot language to find the translations from Japanese to English, and then from English to Chinese. Since IPADIC is a monolingual dictionary, we use EDICT as the Japanese-English dictionary. The EDICT version (V05-001) consists of 110,424 entries. There exist some words that are polysemous with multiple entries. After combining the multiple entry words, we have 106,925 unique entries in the dictionary. For English to Chinese, we use the CE-DICT dictionary. It consists of 24,665 entries. A word can be polysemous in both dictionary, meaning that for each word there is only one entry but with multiple translations. All the English translations of different senses are in the same record. We assume that a bilingual dictionary should be bi-directional, therefore we reverse the CEDICT dictionary to obtain an English-Chinese dictionary.
The ranking method is the one time inverse consultation [4,[6][7][8]. Since a word can be polysemous in both dictionaries, if a source word shares more English translations with the target translation word, then they can be considered nearer in meaning. The score is calculated as in equation (1): Let S E (J, C i ) denotes the similarity between the Japanese word J and the Chinese translation word candidate C i , where E(J) and E(C i ) are the sets of English translations for J and C i , respectively: Currently we do not apply the part of speech information in the scoring because this method requires linguistic experts to decide on the similarity between two part of speech tags for different languages 1 . However, this will become part of our future work. Table 1 shows the results of using English as the pivot language and one time inverse consultation as the scoring function. Using the EDICT and CE-DICT only, 32,380 Japanese words obtain their Chinese translation candidates. In total, we obtain 149,841 pairs of translation. We get maximum 90 candidates for a Japanese word, and 4.6 candidates per word by average. Then we check the Japanese words in IPADIC to get their part of speech tags. We only investigate on three categories of part of speech tags from the IPADIC, which are nouns, verbal nouns and verbs. We randomly selected 200 Japanese words from each category for evaluation. The results are judged using 4 categories: Correct means that the first rank word is correct (if there are multiple words in the first rank, it is considered correct if any one of the words is correct), Not-first means that the correct word exists but not at the first rank, Acceptable means that the first rank word is acceptable, and Wrong means that all candidates are wrong. All the categories are exclusive of each other. There are about 24.3% of nouns, 31.3% of verbal nouns and 17.0% of verbs in IPADIC that give us some translation candidates in Chinese. For the evaluation using 200 randomly selected words, we obtain 88%, 69.5% and 73% accuracy, respectively. The accuracy is 76%, 45% and 50.5%, respectively, if we considered only the first rank. The accuracy is a bit lower compared with previous work as we did not apply other linguistic resources such as parts of speech for scoring. Although improving scoring function can make the rank of the correct words higher, it cannot further increase the number of candidates. Since both EDICT and CEDICT are prepared by different people, the way they translate the words also varies. Furthermore, there is no standization on the format. For example, to represent a verb in English, sometimes it is written in base form (e.g. "discuss"), and sometimes in infinitive form (e.g. "to discuss"). In Chinese, and sometimes in Japanese too, a word shown in the dictionary can be a noun and a verb without inflection. The part of speech category can only be decided based on the usage in contexts. Therefore the same word may be translated into a noun in English too (e.g. "discussion"). It happened too that we cannot find the matches just because of singular form or plural form (e.g. "discussions") of the English translation. With these non-standardization of the English translation, we cannot match the exact words unless we do a morphological analysis in English. Therefore, we also look for other ways to increase to number of candidates. Since Japanese and Chinese share some common characters (kanji in Japanese and hanzi in Chinese), we are looking into the possibility of direct conversion to create the translations. We discuss this method in the following section.

Direct Conversion of Kanji/Hanzi
Using English as the pivot language is a good starting point to construct a new language pair. However, there remain a lot of words for which the translations cannot be obtained. In Chinese, all the characters are hanzi, but in Japanese, there are hiragana, katakana and kanji. The kanji characters are originated from ancient China. This group of characters, used in China, Japan and Korea, are referred to as Han characters. The Han characters capture some semantic information which should be common in those languages. One can create a new word by combining the existing characters but it is hardly that one can create a new character. Therefore, these characters are stable in their meaning. Due to the common sharing on these Han characters, there might be a more straightforward way to translate a word in Japanese into Chinese if all the characters in the word are made up from kanji only. We refer to this kind of words as kanji words.
A Chinese word can be a noun or a verb without changes of morphological forms. There is no inflection to differenciate them. EDICT and CEDICT make no difference on the parts of speech and therefore the translations in English can be in any form. For example, the following Japanese words and Chinese words exist for the translations of "discussion/discussions/to discuss/discuss". If we were to match each Japanese word to each of the Chinese words (in fact, we can say that some of them are acceptable translations), then we will get a redundency of 286 (22×13) pairs. Although these words have similar translation, but in fact they have slight differences in meaning. For example, " §" means the conference amongst the ministers, "ÃÉ" means negotiations. However, "discussion" is one of the translations in English as provided by EDICT. Since the Japanese kanji characters are originated from China, translating Japanese kanji words directly to Chinese can be more accurate than going through a third language like English. If we look from the Japanese side, 12  There exist equivalent characters between Japanese kanji and Chinese hanzi. Both type of characters (Han characters in general) capture significant semantic information. Although the pronunciation varies across languages, the visual form of the characters retains certain level of similarity. Furthermore, Chinese characters can be divided into the characters used by mainland China (referred to as Simplified Chinese) and Taiwan (including Hong Kong and Macao, referred to as Traditional Chinese). Although the ideographs may be different, they are originally the same characters. Most of the Japanese characters are similar to Traditional characters.
English love garden rice fly kill talk fill up post excellent sun Japanese

& & &
Simplified Chinese É É É , , , < < < À À À 8 8 8 ó ó ó Our original Japanese characters are coded in EUC and Chinese characters are coded in GB-2312 codes. To convert a kanji to a hanzi is not a trivial task. Of course most of the characters share the same ideographs. In this case, we can use the Unicode for the conversion as these characters share the same Unicode. However, there exist also quite a number of characters in Japanese that are written in Traditional Chinese ideographs. We have to convert these characters from Traditional Chinese to Simplified Chinese (see Table 2). Finally, there are English gas hair deliver check home pass by burn bad money whole Japanese [ b`r Ô C Ë Ë Traditional Chinese W W W ÿ ÿ ÿ I I I l l l * * * t t t Ê Ê Ê þ þ þ À À À Simplified Chinese í í í 5 5 5 * * * ² ² ² ä ä ä  also some characters in Japanese having similar ideographs, but they are neither Traditional Chinese nor Simplified Chinese (see Table 3). We manually convert these characters by hand. The following shows the steps to convert the characters from Japanese to Chinese.
1. Convert from EUC to Unicode using iconv. 2. Convert from Unicode to Unicode-simplified using a Chinese encoding converter 3 . This step converts possible Traditional characters to Simplified characters. 3. Convert from Unicode-simplified to GB-2312. 4. Those failed to be converted are edited manually by hand. 5. Those characters that do not exist in GB-2312 are converted into GBK using the Chinese encoding converter.
From IPADIC, we extract 36,069 and 8,016 kanji words from noun and verbal noun categories 4 , respectively. From these words, we get 4,454 distinct kanji characters. Out of these characters, only 2,547 characters can be directly converted using Unicode without changes of ideographs. 1,281 characters are converted from Traditional Chinese to Simplified Chinese using the Chinese encoding converter. Finally 626 characters are manually checked and 339 characters can be converted to Simplified Chinese. 287 remain in Japanese ideographs but are converted into GBK codes 5 . Most of these words are the names of plants, fish, and things invented by Japanese (see Table 4). While these GBK coded words may not be used in Chinese, we just leave them in the conversion table for the sake of completeness.
About 61% of nouns and 67% of verbal nouns in Japanese are kanji words as shown in Table 5. Using the conversion table described above, we convert the kanji words into Chinese words. Then, we consult these words using a Chinese dictionary provided by Peking University [14]. There are about 80,000 entries in this dictionary. About 33% of the nouns and 44% of the verbal nouns are valid words in Chinese. We randomly select 200 words for evaluation. We evaluate the results by 3 categories: Correct means that the translation is good, Part-of means that either the Japanese word or the Chinese word has a wider meaning, and Wrong means that the meanings are not the same though they have the same characters. The accuracies obtained are 97% for nouns and 97.5% for verbal nouns. The pairs that have part-of meaning and different meaning are listed in Table 6 and Table 7     The advantage of this method is that we can get exact translation for those borrowed words from Chinese, especially idioms. We all know that it is always difficult to translate idiomatic phrases from one language to another due to the different cultural background. If we were to use English as the pivot language to translate from Japanese to Chinese, it is difficult to have two different bilin-  gual dictionaries from two different publishers that translate them in the same wordings. Since a lot of the idioms in Japanese are originally from China, the conversion of kanji/hanzi will make the translation process faster and more accurate. Some examples are given below.
¦·¼Ý (same bed different dream -cohabiting but living in different worlds) OÎ¤ ¶ (better to be the beak of a rooster than the rump of a bull -better to be the leader of a small group than a subordinate in a large organization) #wk¢ (appearing in unexpected places and at unexpected moments) The difficulty of this method is the translation of single character words. Single character words normally have wider meaning (multiple senses) and the usage is usually based on the context. It is fair enough if we translate the single character words using the conversion table. However, these characters should have more translations of other multi-character words. There are 2,049 single character nouns in Japanese and 1,873 of them exist in Chinese after the conversion. For verbal nouns, there are 128 Japanese words and 127 words exist in Chinese (only ü (gossip, rumor) does not exist in Chinese).

Intergration
We combine both using English as the pivot language and kanji/hanzi conversion method to get the final list of translation candidates. As an estimation, we will get about 17,014 Japanese words with correct translations in Chinese using English as the pivot language. By using kanji/hanzi conversion method, we could get about 14,822 words with correct translation.

Discussion and Future Work
In our survey, only 33% of nouns and 44% of verbal nouns created by kanji/hanzi conversion method exist in the Peking University dictionary. However, this may be due to the incompleteness of the Chinese dictionary that we used. We also found some words after the conversion which are acceptable in Chinese though can further verify the validity of the Chinese words using other resources such as the information from the web. The current work consider only kanji/hanzi conversion for Japanese words that consists on kanji only. There are a lot of words in Japanese that are mixture of kanji and hiragana. This happens normally with verbs and adjectives. For example, "Rd(eat), +d(escape), yXw2(produce), ae0(difficult), K0 (happy), $(quite)". We should be able to get some acceptable translations of these words after removing the hiragana parts, but most of the cases we cannot obtain the best or good translations. From the 200 verbs that we used for the evaluation, 139 words exist in Chinese but only 35 are good and 43 are acceptable. The single characters used in these words are normally used only in ancient Chinese but not in contemporary Chinese. For example, Rd = Ï Ï Ï (eat) and ?d = ¿ ¿ ¿« « « (throw away), but (eat) and ð ð ð (throw away) in Chinese are also possible translation in certain contexts. Furthermore, the contemporary Chinese uses two character words more often than single character words even they have the same meaning. This is to reduce the semantic ambiguity as single character words tend to be polysemous. Therefore, direct kanji/hanzi conversion is not so appropriate and we need another approach to handle this type of words.
We can apply the kanji/hanzi conversion method directly to most of the Japanese proper nouns, such as person names, organization names and place names because these names are normally written in kanji characters. Therefore, we do not need any effort to translate these words from Japanese to Chinese if we have the character conversion table. This will ease a lot in the processing of machine translation and cross language information retrieval.
The Unicode Consortium encoded the Han characters in Unicode 6 . Till date, all the languages that use Han characters have their own encoding systems. For example, Japanese is encoded in EUC-JP or JIS, Simplified Chinese is in GB-2312, Traditional Chinese is in Big 5 etc. The same character that is used in different languages is assigned with different codes. Therefore it is difficult to convert from one code to another without a conversion table. The Unicode Consortium solved the problem by unifying the encoding. The same character with the same ideograph has only one code no matter in which language it is used. With this unification, it eased a lot on the CJK research, especially in the area of cross language information retrieval. Currently, they have increased the number of Han characters from 27,496 characters (version 3.0) to 70,207 characters (version 4.0). Such a huge increment is done by the addition of a large amount of unusual characters that only have been used in either person names or place names. With this new version, it covers almost all possible characters used in hanzi (Chinese), kanji (Japanese) and hanja (Korean). The Unihan (unicode for Han characters) provides a lot of information such as the origin, the specific language using that character, conversion to other encodings etc. The most useful information in Unihan to our research is the relationship between the characters. It embeds the links for the variants of characters which are useful for the conversion from one encoding to the others (Japanese, Traditional Chinese, Simplified Chinese or Korean). If we can make use of this table, then we can build a complete conversion table that includes all Han characters.
Zhang et al. [11] proposed to use kanji information to find the similarity between a Japanese word and a Chinese word. They matched on the Unicode and calculated the similarity using the one time inverse consultation. Since they did not make any conversion such as traditional characters to simplified characters, some of the characters have the same meaning but different Unicodes. Therefore, they could not be matched. If they could use the conversion table that we proposed, then it would help to increase the score of the kanji words.
To convert from Japanese kanji to Simplified characters is easier than the reverse. It is because some characters in Traditional characters are simplified into the same characters in Simplified Chinese. For example, b (hair) and`(deliver) are simplified to . Therefore, it has to depend on the contexts to decide which Japanese character to use if we were to convert the Chinese Simplified characters back to Japanese kanji.

Conclusion
As a conclusion, we proposed a method to compile a Japanese-Chinese dictionary using English as the pivot language as a starting point. We made use of the public available resources such as EDICT, CEDICT and IPADIC for the construction of the new language pair. The accuracy obtained is 77%. Since Japanese and Chinese share common Han characters which are semantically heavy loaded, the same characters used should carry the same meaning. Therefore, we also proposed a kanji/hanzi conversion method to increase the translation candidates. The accuracy obtained is 97%. The increment of translation candidates is 9%, from 24% to 33%. The conversion table created can also be used in other fields like machine translation and cross language information retrieval.