[ Skip to the content ]

Institute of Formal and Applied Linguistics Wiki


[ Back to the navigation ]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
user:zeman:interset:how-to-use [2008/03/13 17:45]
zeman Caching.
user:zeman:interset:how-to-use [2009/02/20 15:00]
zeman Level of headings.
Line 1: Line 1:
-===== Manual =====+====== Manual ======
  
-==== Installation ====+===== Installation =====
  
-If you exist on the ÚFAL network, you can use directly Dan's version here. Otherwise, you need to [[mailto:zeman@ufal.mff.cuni.cz|ask Dan]] for a zipped package of the currently existing drivers. (I intend to maintain it here for download some time later.) Unzip it to a convenient place; below, we assume it is in ''/home/zeman/lib/perl''+If you exist on the ÚFAL network, you can use directly Dan's version here. Otherwise, you need to [[download]] a zipped package of the currently existing drivers. Unzip it to a convenient place; below, we assume it is in ''/home/zeman/interset''.
- +
-**Note:** I decided to put the whole thing under version control. At the same time, I moved it from my lib folder to my project folder. So the current ÚFAL location is ''/home/zeman/projekty/interset/lib''.+
  
 **Contributions welcome!** If you write your own driver, please share it with others! If you send it to me, I will add it to the package for download here. **Contributions welcome!** If you write your own driver, please share it with others! If you send it to me, I will add it to the package for download here.
  
-=== Existing drivers ===+==== Existing drivers ====
  
 Note: This list may not be up-to-date. To see what drivers are currently available on your system, call ''driver-test.pl'' without arguments. Note: This list may not be up-to-date. To see what drivers are currently available on your system, call ''driver-test.pl'' without arguments.
  
-  tagset::ar::conll - Arabic CoNLL treebank (coarse, fine and feat fields in one string, delimited by tabs) +  tagset::ar::conll - Arabic CoNLL treebank (coarse, fine and feat fields in one string, delimited by tabs) 
-  tagset::bg::conll - Bulgarian CoNLL treebank +  tagset::bg::conll - Bulgarian CoNLL treebank 
-  tagset::cs::pdt - Czech positional tags of the Prague Dependency Treebank +  - tagset::cs::conll - Czech CoNLL treebank, based on the Prague Dependency Treebank 
-  tagset::da::conll - Danish CoNLL treebank +  - tagset::cs::multext - Czech subset of the tagset from the Multext East project 
-  tagset::en::conll - English CoNLL treebank +  - tagset::cs::pdt - Czech positional tags of the Prague Dependency Treebank 
-  tagset::en::penn - English Penn Treebank +  tagset::da::conll - Danish CoNLL treebank 
-  tagset::sv::hajic - Tags output by Swedish tagger by Jan Hajič +  - tagset::de::conll - German CoNLL treebank (one-to-one mapping to de::stts) 
-  tagset::sv::mamba - Swedish Mamba tags from Talbanken05 (CoNLL treebank) +  - tagset::de::stts - German: Stuttgart-Tübingen Tagset (Tiger treebank) 
-  tagset::sv::svdahybrid - Dan's tagset, aiming at making distribution of tags from sv::hajic and da::conll as close as possible+  - tagset::en::conll - English CoNLL treebank (one-to-one mapping to en::penn) 
 +  tagset::en::penn - English Penn Treebank 
 +  - tagset::pt::conll - Portuguese CoNLL treebank (based on the Floresta treebank) 
 +  - tagset::sv::conll - Swedish CoNLL treebank (one-to-one mapping to sv::mamba) 
 +  - tagset::sv::hajic - Tags output by Swedish tagger by Jan Hajič 
 +  tagset::sv::mamba - Swedish Mamba tags from Talbanken05 (CoNLL treebank) 
 +  tagset::sv::svdahybrid - Dan's tagset, aiming at making distribution of tags from sv::hajic and da::conll as close as possible 
 +  - tagset::zh::conll - Chinese CoNLL treebank
  
-=== Directory Structure ===+==== Directory Structure ====
  
-The drivers are Perl modules and must be somewhere under ''$PERLLIB'' (''@INC''). Their root folder is ''tagset'' (this is what separates the tag set drivers from other Perl libraries). Subfolders of ''tagset'' are two-letter codes of languages (ISO). Some tagsets may be designed for more than one language but most are language-specific. PM files in language folders are drivers. Drivers are called xxx.pm, where xxx is the code name of the tagset. The driver xxx.pm for language ll should be accessible from Perl via+The drivers are Perl modules and must be somewhere under ''$PERLLIB'' (''@INC''). Their root folder is ''tagset'' (this is what separates the tag set drivers from other Perl libraries). Subfolders of ''tagset'' are two-letter codes of languages ([[http://en.wikipedia.org/wiki/ISO_639-1|ISO 639-1]]). Some tagsets may be designed for more than one language but most are language-specific. PM files in language folders are drivers. Drivers are called xxx.pm, where xxx is the code name of the tagset. The driver xxx.pm for language ll should be accessible from Perl via
  
 <code perl> <code perl>
Line 35: Line 40:
 There is also the driver testing script, ''bin/driver-test.pl''. The distribution may contain some sample conversion scripts as well; however, these depend much more on the file format than on the tagset drivers, and thus you'll probably need to write your own anyway. There is also the driver testing script, ''bin/driver-test.pl''. The distribution may contain some sample conversion scripts as well; however, these depend much more on the file format than on the tagset drivers, and thus you'll probably need to write your own anyway.
  
 +===== How to use the Interset =====
  
- +You can write your own tag conversion Perl script, and use the Interset driver library. You have to tell Perl where to find the drivers (the following commands work in ''csh''; you have to use different syntax under ''bash'' or in Windows command line):
- +
-==== How to use the Interset ==== +
- +
-You can write your own tag conversion Perl script, and use the Interset driver library. You have to tell Perl where to find the drivers:+
  
 <code>setenv PERLLIB /home/zeman/projekty/interset/lib:$PERLLIB <code>setenv PERLLIB /home/zeman/projekty/interset/lib:$PERLLIB
Line 86: Line 88:
             my $features = tagset::cs::pdt::decode($tag0);             my $features = tagset::cs::pdt::decode($tag0);
             $tag1 = tagset::en::penn::encode($features);             $tag1 = tagset::en::penn::encode($features);
 +            $cache{$tag0} = $tag1;
         }         }
         s/<_tag_to_convert_>/<t>$tag1/;         s/<_tag_to_convert_>/<t>$tag1/;

[ Back to the navigation ] [ Back to the content ]