module

Hansa

Hansa is a port of go-enry's language classification algorithm It uses a naive bayes classifier to classify the language of a given text based on the corpus from Linguist

The most surprising bit is that ... it mostly works?

Constants

CLASSIFIER = Classifier.from_json((BakedData.get("/frequencies.json")).gets_to_end)
VERSION = {{ (`shards version /tmp/tmp.iKoFbF/src/src`).chomp.stringify }}

Class methods

classify(code : String) : String
Source

Nested types