MAKE-LI...LANGUAGE(1)

πŸ“¦
version 0.56 Β· 2 versions
, in fedora 43

πŸ‘‘ MAKE-LI...LANGUAGE πŸ’…

okay bestie, welcome to make-lingua-identify-language β€” it's a little script from the User Contributed Perl Documentation corner of the universe, and it makes language modules for Lingua::Identify. yes she's a mouthful, no we're not shortening her, she earned that name. πŸŽ€


✨ NAME ✨

make-lingua-identify-language β€” creates language modules for Lingua::Identify. that's the whole job. that's the vibe. 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

three ways to run her, pick your fighter:

make-lingua-identify-language Language-Tag Language-Name file1 [file2 ...]

or

make-lingua-identify-language -d TAG1-LANGUAGE1/ [TAG2-LANGUAGE2/ ...]

or

make-lingua-identify

πŸ’– DESCRIPTION πŸ’–

she creates language modules that Lingua::Identify gets to use. that's the glow-up. ✨

heads up bestie: after the modules are created, you still have to install them. she does not do that part for you. she's not your mom. 😭

also, real talk β€” this script is still at an early stage. the docs literally say "Please do not even look at the code..." and honestly? respect the honesty. πŸ™ˆ

with no parameters at all, make-lingua-identify-language assumes mode -d and just walks through all the directories in the current one. which is iconic when you're sitting in a directory that looks like this:

.
|-- en-english
|   `-- english.txt
|-- fr-french
|   `-- french1.txt
|   `-- french2.txt
`-- pt-portuguese
    `-- portuguese.txt

βš™οΈ OPTIONS βš™οΈ

  • -d β€” Directory mode. every parameter you pass should be a directory, and its name has to be in the form tag-name (like en-english/). each one of those directories should hold text files that can be used to train Lingua::Identify. feed the algorithm. she's hungry. πŸ“
  • -D β€” Debug mode. development only, don't get any ideas. πŸ”§
  • -h β€” show help and dip. that's it, that's the whole option. πŸ‘‹
  • -v β€” show the version and exit. πŸ‘‘
  • -verbose β€” Verbose mode. she will talk. a lot. πŸ’¬
  • -locale="<locale>" β€” set a specific locale. this way your text gets all lowercased before it's analysed. so fancy. πŸ’…

πŸŽ€ META.yml πŸŽ€

okay so META.yml files are not parsed like the other files β€” they get ignored by default. no cap.

BUT. in directory mode (the -d switch), those META.yml files are checked for info about language codes and sets. it's giving secret menu. 🀫

here's a simple META.yml for you to drop into your directories:

two_letter_code:   pt
three_letter_code: por
sets:
  spoken_in_portugal

and with that lil guy in place, the language gets identified with the two letter code pt or the three letter code por, and it also gets put in the set :spoken_in_portugal. slay. 🫢


🌈 CONTRIBUTING WITH NEW LANGUAGES 🌈

please do not contribute with modules you made yourself. i know, i know, you worked so hard 😭 β€” but it's genuinely easier to contribute with unprocessed text, because that way new versions of Lingua::Identify don't have to drop languages down in case they can't contact you by that time. it's a logistics thing, not a talent thing.

if you must, use make-lingua-identify-language to create a new module for your own personal use. but fr fr, try to contribute unprocessed text rather than those modules. πŸ’œ


πŸ”₯ SEE ALSO πŸ”₯


⭐ AUTHOR ⭐

Jose Alves de Castro, <cog@cpan.org> πŸ‘‘


Copyright 2004-2005 by Jose Alves de Castro

this library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. 🌸


and that's the whole page bestie, no crumbs left. this was perl v5.42.0, dated 2025-07-25, and honestly? iconic of her to still be out here doing language detection in a group chat era. πŸ¦‹βœ¨πŸ’– periodt.

πŸ“¦ where this page comes from