Skip to content

A Java library for converting Japanese text to Latin alphabet (romaji)

License

Notifications You must be signed in to change notification settings

bernd32/romaji-henkan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

romaji-henkan

Romaji-henkan is a simple open-source Java library for converting Japanese text to Latin alphabet (romaji)

Example:

Add the dependency to your pom.xml:

<dependency>
  <groupId>io.github.bernd32</groupId>
  <artifactId>romaji-henkan</artifactId>
  <version>0.0.1</version>
</dependency>

The following code converts string in Japanese to romaji:

import com.bernd32.romajihenkan.RomajiHenkan;
public class RomajiHenkanExample {
    public static void main(String[] args) {
		RomajiHenkan henkan = new RomajiHenkan();
		System.out.println(henkan.convert("自己紹介の最後に添える挨拶として使う表現")); 
	}
}

Output:

jikō shōkai nō saigō ni sōeru aisatsu tōshite tsukau hyōgen

Additional information

Powered by kuromoji, some part of the code were taken from moji4j.
This library is using IPADIC dictionary.

License

Romaji-henkan is licensed under the MIT License. See LICENSE.md for details.

About

A Java library for converting Japanese text to Latin alphabet (romaji)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages