-
-
06 Jul 2012 08:34:37 UTC
- Distribution: WordLists
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (2)
- Testers (151 / 14 / 0)
- Kwalitee
Bus factor: 0- 69.85% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (27.52KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors-
Daniel Perrett
- Dependencies
- Data::Dumper
- IO::File
- JSON
- Lingua::EN::Tagger
- Storable
- Test::Deep
- Test::More
- Unicode::Normalize
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
WordLists::WordList
SYNOPSIS
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;
DESCRIPTION
WordLists::WordList is a base class for a group of WordLists::Sense objects.
new
The constructor creates an empty wordlist, and will populate the wordlist if you pass it parameters such as
from_string
andfrom_file
(in which case, you can also specifyencoding
). These parameters should be passed in a hash ref (as per the example in the synopsis). You can populate the wordlist later, of course.parser
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
orfrom_string
is used).serialiser
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).
get_senses_for
This returns senses which match the parameters specified (hw, pos).
get_all_senses
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.TODO
BUGS
Please use the Github issues tracker.
LICENSE
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.
Module Install Instructions
To install WordLists::Tag, copy and paste the appropriate command in to your terminal.
cpanm WordLists::Tag
perl -MCPAN -e shell install WordLists::Tag
For more information on module installation, please visit the detailed CPAN module installation guide.