TAG2THESAURUS(1p)

πŸ“¦
version 0.43 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble

✨ 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(1).


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