Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
user:zeman:interset:how-to-use [2017/01/13 18:07] zeman Updated instructions for the current version of Interset. |
user:zeman:interset:how-to-use [2017/01/16 13:06] (current) zeman |
===== Installation ===== | ===== Installation ===== |
| |
If you exist on the ÚFAL network and use Perl from PerlBrew, you probably already have ''Lingua::Interset'' available (depending on which Perl version you take from PerlBrew). Or you can point your `PERL5LIB` directly to Dan's version in ''/home/zeman/projekty/interset/lib''. Otherwise you can install ''Lingua::Interset'' from CPAN, e.g. using | If you exist on the ÚFAL network and use Perl from PerlBrew, you probably already have ''Lingua::Interset'' available (depending on which Perl version you take from PerlBrew). Or you can point your ''PERL5LIB'' directly to Dan's version in ''/home/zeman/projekty/interset/lib''. Otherwise you can install ''Lingua::Interset'' from CPAN, e.g. using |
| |
<code bash>cpanm Lingua::Interset</code> | <code bash>cpanm Lingua::Interset</code> |
===== How to use the Interset ===== | ===== How to use the Interset ===== |
| |
You can write your own tag conversion Perl script, and use the Interset driver library. You may have to tell Perl where to find Interset (the following commands work in ''csh''; you have to use different syntax under ''bash'' or in Windows command line): | You can write your own Perl script to convert tags, and use the Interset driver library. You may have to tell Perl where to find Interset (the following commands work in ''csh''; you have to use different syntax under ''bash'' or in Windows command line): |
| |
<code>setenv PERLLIB /home/zeman/projekty/interset/lib:$PERLLIB | <code>setenv PERLLIB /home/zeman/projekty/interset/lib:$PERLLIB |
setenv PATH /home/zeman/interset/bin:$PATH</code> | setenv PATH /home/zeman/projekty/interset/bin:$PATH</code> |
| |
Once the variable is set, writing a conversion script is very easy. Here is an example: | Once the variable is set, writing a conversion script is very easy. Here is an example (note that in CoNLL-X files we often merge the contents of the CPOS, POS and FEATS columns to create one long string that will be seen by Interset as one “tag”): |
| |
<code perl> | <code perl> |