NAME

Lingua::TokenParse - Parse a word into familiar parts

SYNOPSIS

use Lingua::TokenParse;

my %lexicon;
@lexicon{qw(part i tion on)} = ();

my $obj = Lingua::TokenParse->new(
    word    => 'partition',
    lexicon => \%lexicon,
);

$obj->output_knowns;

ABSTRACT

Parse a word into familiar parts.

DESCRIPTION

Parse a word into familiar parts.

METHODS

new()

Return a new Lingua::TokenParse object.

build_parts()

Construct an array of the word partitions.

successors()

Recursively compute the array of all possible word part combinations.

trim_combinations()

Compute the familiar word part combinations.

output_knowns()

Convenience method to output the familiar word part combinations.

ACCESSORS

These accessors both get and set their respective values. Note that, if you set any of these after construction, you must manually run the partition methods. Also, note that it is pretty useless to set the parts, combinations and knowns lists, as they are computed by the partition methods.

word()

The actual word to partition.

lexicon()

The hash of word parts (keys) with their (optional) definitions (values).

parts()

The array of word partitions.

combinations()

The array of all possible word part combinations.

knowns()

The hash of known combinations (keys) with their familiarity scores (values). Note that only the non-zero scored combinations are kept.

DEPENDENCIES

None

TO DO

Return word part definitions.

Synthesize a term list based on word part (thesaurus) definitions.

DEDICATION

My Grandmother and English teacher - Frances Jones

THANK YOU

Sean M. Burke <sburke@cpan.org>

AUTHOR

Gene Boggs <cpan@ology.net>

COPYRIGHT AND LICENSE

Copyright 2003 by Gene Boggs

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