Skip to content

ntc-langdetect is a module Language Detector using Apache OpenNLP

License

Notifications You must be signed in to change notification settings

congnghia0609/ntc-langdetect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ntc-langdetect

ntc-langdetect is a library Language Detector using Apache OpenNLP

Maven

<dependency>
    <groupId>com.streetcodevn</groupId>
    <artifactId>ntc-langdetect</artifactId>
    <version>1.0.0</version>
</dependency>

Build local

# Build
mvn package
or
mvn -Dmaven.test.skip=true package

# Clean
mvn clean install

Quick start

LangDetect ld = new LangDetect();
String s = "anh yêu em";
// Get the most probable language
Language bestLanguage = ld.langDetect(s);
System.out.println("bestLanguage: " + bestLanguage.toString());

// or

Language bestLanguage = ld.getLdME().predictLanguage(s);
System.out.println("bestLanguage: " + bestLanguage.toString());

License

This code is under the Apache License v2.

About

ntc-langdetect is a module Language Detector using Apache OpenNLP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages