Lingua::PT::ProperNames - Simple module to extract proper names from Portuguese Text
Version 0.10
This module contains simple Perl-based functions to detect and extract proper names from Portuguese text.
use Lingua::PT::ProperNames; printPN(@options); printPNstring({ %options... } ,$textstrint); printPNstring([ @options... ] ,$textstrint); forPN( sub{my ($pn, $contex)=@_;... } ) ; forPN( {t=>"double"}, sub{my ($pn, $contex)=@_;... }, sub{...} ) ; $outstr = forPN($instr, sub{my ($pn, $contex)=@_;... }, ... ) ; forPNstring(sub{my ($pn, $contex)=@_;... }, $textstring, regsep) ; my $pndict = Lingua::PT::ProperNames->new;
Creates a new ProperNames dictionary
This method checks if a name exists in the Names dictionary as a Given Name.
Thie method checks if a name exists in the Names dictionary as a Surname.
Substitutes all Proper Names found on STDIN by the result of calling a function <f> with arguments ($propername,$context). The result is sent to STDOUT.
<f
Usage:
forPN({options...}, sub{ propername processor...})
Optionally you can define input or output files:
forPN({in=> "inputfile", out => "outputfile" }, sub{...})
Also, <{t = "double"}>> helps to treat in a special way names after punctuation (".", etc). With this options you must provide 2 functions: one for standard Proper Names and one for names after punctuation.
<{t =
forPN({t=>"double"}, sub{...}, sub{...})
You can also define record paragraph separator
forPN({sep=>"\n", t=>"normal"}, sub{...}) ## each line is a par. forPN({sep=>""}, sub{...}) ## par. empty lines
forPNstring( $funref, "textstring" [, regSeparator] )>
Substitutes all propername by funref(propername) in the text string.
propername
funref(propername)
printPNstring("oco")
printPN("oco") printPN - extrai os nomes próprios dum texto. -comp junta certos nomes: Fermat + Pierre de Fermat = (Pierre de) Fermat -prof -e "Sebastiao e Silva" "e" como pertencente a PN -em "em Famalicão" como pertencente a PN
José João Almeida, <jj@di.uminho.pt>
<jj@di.uminho.pt>
Alberto Simões, <ambs@di.uminho.pt>
<ambs@di.uminho.pt>
Please report any bugs or feature requests to bug-lingua-pt-propernames@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.
bug-lingua-pt-propernames@rt.cpan.org
Copyright 2004-2008 Projecto Natura, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Lingua::PT::ProperNames, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::PT::ProperNames
CPAN shell
perl -MCPAN -e shell install Lingua::PT::ProperNames
For more information on module installation, please visit the detailed CPAN module installation guide.