Hansa::Classifier
Inherits JSON::Serializable < Struct < Value < Object
Constructors
new(pull : JSON::PullParser)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
Scores the content over the candidate languages (go-enry v2 "hints" semantics): with no candidates every known language competes, with candidates only those do.
default_token_probability
Probability for tokens not present in a language's token table, derived from the corpus like go-enry v2 does
known_languages
Despite the name this only reports the 100 most common languages in the corpus, to avoid super unilely false positives for obscure languages
languages_log_probabilities
Sourcetokens_log_probabilities
Sourcetokens_total
Source