# Note that Lingua::StanfordCoreNLP can't be instantiated.
use Lingua::StanfordCoreNLP;
# Create a new NLP pipeline (silence messages, make corefs bidirectional)
my $pipeline = new Lingua::StanfordCoreNLP::Pipeline(1, 1);
# Process text
# (Will output lots of debug info from the Java classes to STDERR.)
my $result = $pipeline->process( $text );
####
package MyModule;
use Lingua::StanfordCoreNLP;
my $pipeline = new Lingua::StanfordCoreNLP::Pipeline(1, 1);
sub process_text {
my ($self,$text) = @_;
$pipeline->process( $text );
}
####
Can't locate object method "new" via package "Lingua::StanfordCoreNLP::Pipeline" (perhaps you forgot to load "Lingua::StanfordCoreNLP::Pipeline"?)