Skip to content

xondre09/cld3-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cld3-Java

Cld3-Java is a wrapper of CLD3 for Java.

Installation

Debian/Ubuntu

sudo apt-get install protobuf-compiler libprotobuf-dev cmake
ant jar

Example

NNetLanguageIdentifierWrapper identifier = new NNetLanguageIdentifierWrapper(0, 1000);

String text = "This text is written in English.";
NNetLanguageIdentifierWrapper.Result result = identifier.findLanguage(text);

System.out.println("Text: " + text);
System.out.println("  language:    " + result.language);
System.out.println("  probability: " + result.probability);
System.out.println("  reliable:    " + result.is_reliable);
System.out.println("  proportion:  " + result.proportion);

text = "This text is written in English. Text napsaný v češtině";
NNetLanguageIdentifierWrapper.Result[] results = identifier.findTopNMostFreqLangs(text, 2);

identifier.dispose();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published