class Linguist::Strategy::Classifier

Defined in:

linguist/strategy/classifier.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new(languages : ::Linguist::LanguageContainer) #

[View source]

Class Method Detail

def self.call(blob, languages, real_languages) : Array(Language) | Array(Tuple(Language, Float64)) #

[View source]

Instance Method Detail

def categorize(text : String, results = 3) #

[View source]
def language_probability(language) #

[View source]
def load(dir) #

[View source]
def save(dir) #

[View source]
def simple_categorize(text : String, languages : Array(Language)) #

[View source]
def simple_categorize(text : String, langauges : Array(Tuple(Language, Float64))) : Array(Language) #

[View source]
def tokens_probability(tokens, language) #

[View source]
def train_on(dir, overwrite = false) #

[View source]