Lingua-LinkParser-FindPath

 view release on metacpan or  search on metacpan

lib/Lingua/LinkParser/FindPath.pm  view on Meta::CPAN


use fields qw(parser sentence);
use Lingua::LinkParser;
sub new {
    my $class = shift;
    my %arg = @_;
    if( ! ref $arg{parser} ){
        require Lingua::LinkParser;
        $arg{parser} = Lingua::LinkParser->new;
    }
    bless { parser => $arg{parser}, sentence => undef } => $class;
}

sub sentence {
    my $self = shift;
    $self->{sentence} = ref $_[0] ? shift : $self->{parser}->create_sentence(shift);
    return $self;
}

sub clean_word {
    $_[0] =~ s/(\[.\])?\..$//o;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.589 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )