MAKE-L...ANGUAGE(1p)

πŸ“¦
version 0.56 Β· 2 versions
  • 0.56 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.56 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

okay bestie, gather round β€” this page is all about make-lingua-identify-language πŸ’– and its whole entire job is creating language modules for Lingua::Identify. That's it, that's the gig. πŸ‘‘


🌸 SYNOPSIS 🌸

three whole ways to run this thing, pick your fighter:

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

or, if you're feeling directory-ish:

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

or literally just:

make-lingua-identify

πŸ¦‹ DESCRIPTION πŸ¦‹

So what it does is create language modules that Lingua::Identify uses. That's the whole vibe. ✨

heads up though: after it makes the modules, you still have to install them yourself. It does not do that part for you, bestie. not me doing half the job πŸ’…

real talk: this script is still at an early stage. The original author says please do not even look at the code... 😭 so like, respect the boundary, don't peek.

If you run it with no parameters at all, make-lingua-identify-language assumes mode -d and goes through all the directories in the current one. Super handy when you're sitting in a directory that looks something 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 that directory's name has to be in the form tag-name (think en-english/). Each directory you pass should hold text files you can use to train Lingua::Identify. πŸŽ€
  • -D β€” Debug mode. Only for development, so like... devs only, iykyk.
  • -h β€” Shows you the help, then dips out. 🫢
  • -v β€” Shows the version, then dips out. ⭐
  • -verbose β€” Verbose mode. It's gonna tell you everything.
  • -locale="<locale>" β€” Sets a specific locale. The way this works is your text gets all lowercased before it's analysed. lowercase era fr fr 🌸

πŸŽ€ META.yml πŸŽ€

META.yml files are not parsed like the other files β€” they get ignored, periodt.

But in directory mode (the -d switch), META.yml files do get checked for info on language codes and sets. πŸ‘€

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

With that in place, the language gets identified with the two letter code pt or the three letter code por, and it'll also be in the set :spoken_in_portugal. iconic ✨


🌈 CONTRIBUTING WITH NEW LANGUAGES 🌈

okay this part matters, listen up bestie:

Please do not contribute modules you made yourself. It's way easier to contribute with unprocessed text, because that means new versions of Lingua::Identify don't have to drop languages down if the author can't contact you by that time. the way that unprocessed text is the move πŸ’…

If you absolutely must, sure, use make-lingua-identify-language to create a new module for your own personal use β€” but please, please try to contribute the 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 cap. This little beauty comes to you from perl v5.34.0, dated 2022-05-28, and it's filed under MAKE-L...ANGUAGE(1p) in the User Contributed Perl Documentation section. slay, go make some language modules πŸ’–βœ¨

πŸ“¦ where this page comes from