class Linguist::Strategy::Classifier
- Linguist::Strategy::Classifier
- Cadmium::Classifier::Bayes
- Reference
- Object
Defined in:
linguist/strategy/classifier.crConstructors
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(pull : JSON::PullParser)
- .new(languages : ::Linguist::LanguageContainer)
Class Method Summary
Instance Method Summary
- #categorize(text : String, results = 3)
- #language_probability(language)
- #load(dir)
- #save(dir)
- #simple_categorize(text : String, languages : Array(Language))
- #simple_categorize(text : String, langauges : Array(Tuple(Language, Float64))) : Array(Language)
- #tokens_probability(tokens, language)
- #train_on(dir, overwrite = false)
Constructor Detail
Class Method Detail
def self.call(blob, languages, real_languages) : Array(Language) | Array(Tuple(Language, Float64))
#