romaji-henkan/README.md

35 lines
1.0 KiB
Markdown
Raw Normal View History

2019-12-13 21:05:45 +05:00
2019-12-15 19:40:43 +05:00
# romaji-henkan
Romaji-henkan is a simple open-source Java library for converting Japanese text to Latin alphabet (romaji)
2019-12-13 17:10:40 +05:00
2019-12-15 19:40:43 +05:00
## Example:
Add the dependency to your `pom.xml`:
```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:
2019-12-13 20:58:58 +05:00
```java
2019-12-15 19:40:43 +05:00
import com.bernd32.romajihenkan.RomajiHenkan;
public class RomajiHenkanExample {
public static void main(String[] args) {
RomajiHenkan henkan = new RomajiHenkan();
System.out.println(henkan.convert("自己紹介の最後に添える挨拶として使う表現"));
}
}
```
Output:
2019-12-13 20:58:58 +05:00
```
2019-12-15 19:40:43 +05:00
jikō shōkai nō saigō ni sōeru aisatsu tōshite tsukau hyōgen
```
## Additional information
Powered by [kuromoji](https://github.com/atilika/kuromoji), some part of the code were taken from [moji4j](https://github.com/andree-surya/moji4j).
This library is using IPADIC dictionary.
2019-12-13 17:10:40 +05:00
## License
Romaji-henkan is licensed under the MIT License. See `LICENSE.md` for details.