public ArrayList <KeyDat <double, LanguageProfile> > DetectLanguageAll(string str) { Utils.ThrowException(mLanguageProfiles.Count == 0 ? new InvalidOperationException() : null); Utils.ThrowException(str == null ? new ArgumentNullException("str") : null); NGramProfile p = new NGramProfile(mN); p.AddTokensFromString(str); if (p.IsEmpty) { return(null); } p.DoRanking(); return(DetectLanguageAll(p)); }
public LanguageProfile FindMatchingLanguage(string str) { Utils.ThrowException(languageProfiles.Count == 0 ? new InvalidOperationException() : null); Utils.ThrowException(str == null ? new ArgumentNullException("str") : null); NGramProfile p = new NGramProfile(n); p.AddTokensFromString(str); if (p.IsEmpty) { return(null); } p.DoRanking(); return(FindMatchingLanguage(p)); }
public ArrayList<KeyDat<double, LanguageProfile>> DetectLanguageAll(string str) { Utils.ThrowException(mLanguageProfiles.Count == 0 ? new InvalidOperationException() : null); Utils.ThrowException(str == null ? new ArgumentNullException("str") : null); NGramProfile p = new NGramProfile(mN); p.AddTokensFromString(str); if (p.IsEmpty) { return null; } p.DoRanking(); return DetectLanguageAll(p); }