public IEnumerable <Tuple <LanguageInfo, double> > Identify(string text) { var extractor = new CharacterNGramExtractor(MaxNGramLength, OnlyReadFirstNLines); var tokens = extractor.GetFeatures(text); var likelyLanguages = _classifier.Classify(tokens); return(likelyLanguages); }
public IEnumerable <Tuple <LanguageInfo, double> > Identify(string text) { var extractor = new CharacterNGramExtractor(MaxNGramLength, OnlyReadFirstNLines); var tokens = extractor.GetFeatures(text); var model = LanguageModelCreator.CreateLangaugeModel(tokens, OccuranceNumberThreshold, MaximumSizeOfDistribution); var likelyLanguages = _classifier.Classify(model); return(likelyLanguages); }