NAME

Lingua::Interset::OldTagsetDriver - A temporary envelope that provides access to the old (Interset 1.0) drivers from Interset 2.0.

VERSION

version 3.014

SYNOPSIS

  # (No need to
  #     use tagset::en::conll;
  # here. It will be taken care of within OldTagsetDriver.)
  use Lingua::Interset::OldTagsetDriver;
  my $driver = Lingua::Interset::OldTagsetDriver->new(driver => 'en::conll');
  my $fs = $driver->decode("NN\tNN\t_");

DESCRIPTION

Provides object envelope for an old, non-object-oriented driver from Interset 1.0. This makes the old drivers at least partially usable until they are fully ported to Interset 2.0. Note however that the old drivers use Interset features and/or values that have been changed in the new version.

METHODS

decode()

  my $fs  = $driver->decode ($tag);

Takes a tag (string) and returns a Lingua::Interset::FeatureStructure object with corresponding feature values set.

encode()

  my $tag = $driver->encode ($fs);

Takes a Lingua::Interset::FeatureStructure object and returns the tag (string) in the given tagset that corresponds to the feature values. Note that some features may be ignored because they cannot be represented in the given tagset.

list()

  my $list_of_tags = $driver->list();

Returns the reference to the list of all known tags in this particular tagset. This is not directly needed to decode, encode or convert tags but it is very useful for testing and advanced operations over the tagset. Note however that many tagset drivers contain only an approximate list, created by collecting tag occurrences in some corpus.

SEE ALSO

Lingua::Interset::Tagset, Lingua::Interset::FeatureStructure

AUTHOR

Dan Zeman <zeman@ufal.mff.cuni.cz>

COPYRIGHT AND LICENSE

This software is copyright (c) 2019 by Univerzita Karlova (Charles University).

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.