Tara Andrews > Text-TEI-Collate-1.0 > Text::TEI::Collate::Word

Download:
Text-TEI-Collate-1.0.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.01   Source  

DESCRIPTION ^

Text::TEI::Collate::Word is an object that describes a word in a collated text. This may be a useful way for editors of other things to plug in their own logic.

METHODS ^

new

Creates a new word object. Should not be called directly.

Access methods ^

word

If called with an argument, sets the stripped form of the word that should be used for comparison. Returns the word's stripped form.

printable

Return either the word or the 'special', as applicable

original_form

If called with an argument, sets the form of the word, punctuation and all, that was originally passed. Returns the word's original form.

accented_form

If called with an argument, sets the accented form of the word (minus punctuation). Returns the word's accented form.

canonical_form

If called with an argument, sets the canonical form of the word (minus punctuation). Returns the word's canonical form.

comparison_form

If called with an argument, sets the comparison form of the word (using a set standard for orthographic equivalence.) Returns the word's comparison form.

punctuation

If called with an argument, sets the punctuation marks that were passed with the word. Returns the word's puncutation.

canonizer

If called with an argument, sets the canonizer subroutine that the word object should use. Returns the subroutine.

comparator

If called with an argument, sets the comparator subroutine that the word object should use. Returns the subroutine.

special

Returns a word's special value. Used for meta-words like BEGIN and END.

is_empty

Returns whether this is an empty word. Useful to distinguish from a special word.

state

Returns a hash of all the values that might be changed by a re-comparison. Useful to 'back up' a word before attempting a rematch. Currently does not expect any of the 'mutable' keys to contain data structure refs.

is_glommed

Returns true if the word has been matched together with its following word. If passed with an argument, sets this value.

is_base

Returns true if the word has been matched together with its following word. If passed with an argument, sets this value.

placeholders

Returns the sectional markers, if any, that go before the word.

add_placeholder

Adds a sectional marker that should precede the word in question.

ms_sigil

Returns the sigil of the manuscript wherein this word appears.

links

Returns the list of links, or an empty list.

add_link

Adds to the list of 'like' words in this word's column.

variants

Returns the list of variants, or an empty list.

add_variant

Adds to the list of 'different' words in this word's column.

BUGS / TODO ^

Many things. I shall enumerate them later.

AUTHOR ^

Tara L Andrews <aurum@cpan.org>