WordLists::WordList
my $wl = WordLists::WordList->new({from_file=>'unit1.txt'}); my @senses = $wl->get_senses_for('book', 'verb'); $wl->add_sense($new_sense); print OUT $wl->to_string;
WordLists::WordList is a base class for a group of WordLists::Sense objects.
The constructor creates an empty wordlist, and will populate the wordlist if you pass it parameters such as from_string and from_file (in which case, you can also specify encoding). These parameters should be passed in a hash ref (as per the example in the synopsis). You can populate the wordlist later, of course.
from_string
from_file
encoding
This is an accessor for the parser, and returns the parser and/or sets the parser if given one. The parser defaults to WordLists::Parse::Simple, and the parser is created the first time it is requested (not when the WordLists::WordList object is created, unless from_file or from_string is used).
This is an accessor for the serialiser, and returns the serialiser and/or sets the serialiser if given one. The serialiser defaults to WordLists::Serialise::Simple, and the serialiser is created the first time it is requested (not when the WordLists::WordList object is created).
This returns senses which match the parameters specified (hw, pos).
This returns all senses; by default, it will return them in the order in which they were entered, but senses can be reordered using the sort method.
sort
Please use the Github issues tracker.
Copyright 2011-2012 © Cambridge University Press. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install WordLists::Tag, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WordLists::Tag
CPAN shell
perl -MCPAN -e shell install WordLists::Tag
For more information on module installation, please visit the detailed CPAN module installation guide.