logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

tag2thesaurus - transform a tagdictionary into a thesaurus

Author

       J.Joao Almeida, jj@di.uminho.pt

Description

       tag2thesaurus converts tag-format in thesaurus-format

       Input file should follow the following tag-format

        lang1  t11
        lang2  t12
        rel ...

        lang1  t21
        lang2  t22
        rel ...

       "tag2thesaurus lang2 file" output looks like:

        %baselang lang2

        t12
        lang1  t11
        rel ...

        t22
        lang1  t21
        rel ...

   Options
        -fs='::'   field separator (def \n)
        -rs='\n'   record separatos (def "\n\n")
        -fss='='   fiels separator2 (def \s+)

       Example: if the file has the following format

        L1=v11 :: L2= v21 :: Ln= vn1
        L1=v12 :: L2= v22 :: Ln= vn2

       the command

        tag2thesaurus -rs='\n' -fs='::' -fss='=' L2 file

       would produce thesaurus :

        %baselang L2

        v21
        L1   v11
        Ln   vn1

        v22
        L1   v12
        Ln   vn2

   ErrorsandWarnings
       Each entry must have a term in the baselanguage (otherwise, it is created one named "undef term 1").

       Each entry should have just one term in the baselanguage (the first one will be taken as the term, the
       other became "SYN-baselang" ).

Name

       tag2thesaurus - transform a tagdictionary into a thesaurus

See Also

perl(1).

perl v5.40.1                                       2025-02-18                                  TAG2THESAURUS(1p)

Synopsis

        tag2thesaurus baselang tagdictionary

See Also