Skip to content

Latest commit

 

History

History
92 lines (52 loc) · 2.15 KB

README-ENGLISH.md

File metadata and controls

92 lines (52 loc) · 2.15 KB

opencc4j

Opencc4j is an opensource project for conversion between Traditional Chinese and Simplified Chinese, supporting character-level conversion, phrase-level conversion for java.

Maven Central Build Status Coverage Status

中文简介

Features

  • Strict distinction between "a simple and complex" and "a simple and diverse".

  • Fully compatible with different characters, you can achieve dynamic replacement.

  • Strict review of a simple and more complicated entries, the principle of "can be divided but not consistent."

  • Thesaurus and function library completely separated, you can freely modify, import, expand.

  • Compatible with Windows, Linux, Mac platform.

Why write this

  • OpenCC

OpenCC is an awesome project, but not have direct support jar for java.

  • jopencc

jopencc has no word segmentation provided.

Quick Start

maven import

<dependency>
    <groupId>com.github.houbb</groupId>
    <artifactId>opencc4j</artifactId>
    <version>1.0.2</version>
</dependency>

convert to simple

String original = "生命不息,奮鬥不止";
String result = ZhConverterUtil.convertToSimple(original);

the result is:

生命不息,奋斗不止

convert to traditional

String original = "生命不息,奋斗不止";
String result = ZhConverterUtil.convertToTraditional(original);

the result is:

生命不息,奮鬥不止

Thanks

OpenCC

OpenCC support the original data.

HUABAN

jieba-analysis support the Chinese word segmentation

Issues & Bugs

Issues & Bugs, welcome to provide valuable suggestions.