TAG2THESAURUS(1p)
β¨ NAME β¨
tag2thesaurus β bestie, it takes a tagdictionary and turns it into a thesaurus π
(also hello, this is a 1p page from the User Contributed Perl Documentation section, so you know it's the good stuff π«Ά)
πΈ SYNOPSIS πΈ
tag2thesaurus baselang tagdictionary
π DESCRIPTION π
okay so. tag2thesaurus converts tag-format into thesaurus-format. that's literally it, that's the whole job. π
your input file should follow this here tag-format:
lang1 t11
lang2 t12
rel ...
lang1 t21
lang2 t22
rel ...
and when you run tag2thesaurus lang2 file, the output looks like this:
%baselang lang2
t12
lang1 t11
rel ...
t22
lang1 t21
rel ...
so yeah, the base language term hops up top and everything else lines up under it. main character energy fr fr π
π¦ Options π¦
-fs='::'β the field separator (default is\n)-rs='\n'β the record separator (default is"\n\n")-fss='='β field separator number two (default is\s+)
ok so picture this: your file is formatted like this π«
L1=v11 :: L2= v21 :: Ln= vn1
L1=v12 :: L2= v22 :: Ln= vn2
then this command right here
tag2thesaurus -rs='\n' -fs='::' -fss='=' L2 file
would produce a thesaurus like:
%baselang L2
v21
L1 v11
Ln vn1
v22
L1 v12
Ln vn2
ate. no notes. β¨
π Errors and Warnings π
- every single entry must have a term in the baselanguage. if it doesn't? it just makes one for you, and that one is named
"undef term 1". not ideal but here we are π - every entry should have just one term in the baselanguage. if you give it more than one, the first one gets taken as the term, and all the other ones become
"SYN-baselang". lowkey a glow-up for them tbh π
bestie please don't skip the warnings, they will absolutely come for you π«Ά
π AUTHOR π
J.Joao Almeida, jj@di.uminho.pt
π SEE ALSO π
perl v5.34.0 Β· 2022-06-09 β mwah, that's the version and the date, go forth and thesaurus-ify everything, ily bye ππ§πΈ
π¦ where this page comes from
- debian bookworm: libbiblio-thesaurus-perl 0.43-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libbiblio-thesaurus-perl 0.43-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libbiblio-thesaurus-perl 0.43-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms