trainlid builds a trigram transition matrix for use with the Lingua::Ident module.
It reads a training text from standard input and outputs a transition matrix with the specified language_name as identifier to standard output.

It is recommended that language_name be a POSIX locale name constructed from an ISO 639 2-letter language code,
possibly extended by an ISO 3166 2-letter country code and a character set identifier.
Example: de_DE.iso88591.