Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Latest commit

 

History

History
42 lines (29 loc) · 943 Bytes

Readme.md

File metadata and controls

42 lines (29 loc) · 943 Bytes

Language Detection

.NET Port of Language Detection Library for Java by @shuyo

Install

Add a reference to LanguageDetection.dll.

Use

using LanguageDetection;

Load all supported languages

LanguageDetector detector = new LanguageDetector();
detector.AddAllLanguages();
Assert.AreEqual("lv", detector.Detect("čau, man iet labi, un kā iet tev?"));

or a small subset

LanguageDetector detector = new LanguageDetector();
detector.AddLanguages("lv", "lt", "en");
Assert.AreEqual("lv", detector.Detect("čau, man iet labi, un kā iet tev?"));

You can also change parameters

LanguageDetector detector = new LanguageDetector();
detector.RandomSeed = 1;
detector.ConvergenceThreshold = 0.9;
detector.MaxIterations = 50;

License

Apache 2.0