Lingua::PT::Abbrev - An abbreviations dictionary manager for NLP
Version 0.05
This module handles a built-in abbreviations dictionary, and a user customized abbreviations dictionary. It provides handy functions for NLP processing.
use Lingua::PT::Abbrev;
my $dic = Lingua::PT::Abbrev->new;
my $exp = $dic -> expand("sr");
$text = $dic -> text_expand($text);
This is the Lingua::PT::Abbrev dictionaries constructor. You don't need to pass it any parameter, unless you want to maintain a personal dictionary. In that case, pass the path to your personal dictionary file.
The dictionary file is a text file, one abbreviation by line, as:
sr senhor sra senhora dr doutor
Given an abbreviation, this method expands it. For expanding
abbreviations in a text use <text_expand>, a lot faster.
Returns undef if the abbreviation is not known.
Given a text, this method expands all known abbreviations
Use this method to add an abbreviation to your current dictionary.
Use this method to add an abbreviation to your session dictionary.
This method saves the custom dictionary
This method returns a regular expression matching all abbreviations. Pass as option an hash table for configuration.
The key <nodot> is used to define a regular expression not
containing the final dot.
Alberto Simões, <ambs@cpan.org>
Please report any bugs or feature requests to
bug-lingua-pt-abbrev@rt.cpan.org, or through the web interface at
http://rt.cpan.org. I will be notified, and then you'll automatically
be notified of progress on your bug as I make changes.
Copyright 2004 Alberto Simões, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.