Daniel Perrett > WordLists-0.013 > WordLists::Sense

Download:
WordLists-0.013.tar.gz

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

WordLists::Sense - Class for senses in wordlists, dictionaries, etc.

SYNOPSIS ^

  use WordLists::Sense;
  my $sense = WordLists::Sense->new();
  $sense->set('hw', 'head');
  $sense->set('pos', 'noun');
  $sense->set_pos('verb'); # alternative
  $sense->has('pos'); # returns 1
  $sense->get('pos'); # returns 'verb'
  $sense->to_string; # returns "head\tverb" - however it is better to do this from within a wordlist
  my $another_sense = WordLists::Sense->new({hw=>'head', pos=>'verb'});

This class is a very simple class which is little more than a blessed hash with accessors set, get, and has.

The following attributes are 'special' - treated no differently by this module but by others:

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.

syntax highlighting: