view release on metacpan or search on metacpan
lib/Lingua/YaTeA/Document.pm view on Meta::CPAN
return $this->{ID};
}
sub getName
{
my ($this) = @_;
return $this->{NAME};
}
sub update
{
my ($this,$word) = @_;
$this->{NAME} = $word->getLexItem->getIF;
}
1;
__END__
=head1 NAME
lib/Lingua/YaTeA/Edge.pm view on Meta::CPAN
}
else{
if ((blessed($this)) && ($this->isa('Lingua::YaTeA::PatternLeaf')))
{
return "";
}
}
}
}
sub update
{
my ($this,$new_value) = @_;
$this = $new_value;
}
sub print
{
my ($this,$words_a,$fh) = @_;
lib/Lingua/YaTeA/InternalNode.pm view on Meta::CPAN
my ($this,$father) = @_;
$this->{FATHER} = $father;
}
sub getFather
{
my ($this) = @_;
return $this->{FATHER};
}
sub updateLevel
{
my ($this,$new_level) = @_;
$this->{LEVEL} = $new_level++;
# warn "Debug: Level in updateLevel: $new_level \n";
if ($new_level < 50) { # Temporary added by Thierry Hamon 02/02/2007
if ((blessed($this->getLeftEdge)) && ($this->getLeftEdge->isa('Lingua::YaTeA::InternalNode')))
{
$this->getLeftEdge->updateLevel($new_level);
lib/Lingua/YaTeA/Node.pm view on Meta::CPAN
}
else
{
warn "searchLeaf: Going out a deep recursive method call (more than 50 calls)\n";
return undef;
}
# print STDERR "SL5\n";
return ($node,$position);
}
sub updateLeaves
{
my ($this,$counter_r,$index_set) = @_;
if ((blessed($this->getLeftEdge)) && ($this->getLeftEdge->isa('Lingua::YaTeA::TermLeaf')))
{
$this->{LEFT_EDGE} = Lingua::YaTeA::TermLeaf->new($index_set->getIndex($$counter_r++));
}
else
{
lib/Lingua/YaTeA/NodeSet.pm view on Meta::CPAN
}
sub getNode
{
my ($this,$index) = @_;
return $this->getNodes->[$index];
}
sub updateRoot
{
my ($this) = @_;
my %nodes_id;
my $node;
foreach $node (@{$this->getNodes})
{
$nodes_id{$node->getID}++;
}
if(scalar @{$this->getNodes} == 0)
lib/Lingua/YaTeA/NodeSet.pm view on Meta::CPAN
sub fillNodeLeaves
{
my ($this,$index_set) = @_;
my $counter = 0;
$this->getRoot->fillLeaves(\$counter,$index_set, 0);
}
sub updateLeaves
{
my ($this,$index_set) = @_;
my $counter = 0;
$this->getRoot->updateLeaves(\$counter,$index_set);
}
sub searchFreeNodes
{
my ($this,$words_a) = @_;
my $node;
lib/Lingua/YaTeA/Option.pm view on Meta::CPAN
return $this->{NAME};
}
sub getValue
{
my ($this) = @_;
return $this->{VALUE};
}
sub update
{
my ($this,$new_value,$message_set,$display_language) = @_;
my $old_value = $this->getValue;
$this->{VALUE} = $new_value;
if(defined $message_set)
{
print STDERR "WARNING: " . $this->getName . ": " . $message_set->getMessage('OPTION_VALUE_UPDATE')->getContent($display_language) . "\"" . $new_value . "\" (";
print STDERR $message_set->getMessage('OLD_OPTION_VALUE')->getContent($display_language) . "\"". $old_value . "\")\n";
}
}
lib/Lingua/YaTeA/PhraseSet.pm view on Meta::CPAN
# $phrase->printForestParenthesised($fh);
# print $fh "\n\n";
printf STDERR $message_set->getMessage('UNPARSED_PHRASES')->getContent($display_language) . "... %0.1f%% \r", (scalar(@{$this->getUnparsed}) / $Unparsed_size) * 100 ;
}
}
print STDERR "\n";
}
}
sub updateRecord
{
my ($this,$phrase,$tag_set) = @_;
my $key;
my $reference;
$key = $phrase->buildKey;
if(exists $this->getPhrases->{$key})
{
delete $this->getPhrases->{$key};
lib/Lingua/YaTeA/Sentence.pm view on Meta::CPAN
my ($class) = @_;
$in_doc_counter = 0;
}
sub resetStartChar
{
my ($class) = @_;
$start_char = 0;
}
sub updateStartChar
{
my ($class,$word) = @_;
$start_char += $word->getLexItem->getLength +1;
}
sub getDocument
{
my ($this) = @_;
return $this->{DOCUMENT};
}
lib/Lingua/YaTeA/Tree.pm view on Meta::CPAN
return $this->{SIMPLIFIED_INDEX_SET};
}
sub getRoot
{
my ($this) = @_;
return $this->getNodeSet->getRoot;
}
sub updateRoot
{
my ($this) = @_;
$this->getNodeSet->updateRoot;
}
sub setNodeSet
lib/Lingua/YaTeA/Tree.pm view on Meta::CPAN
$below = $this->getNodeSet->searchRootNodeForLeaf($pivot);
if (defined $below) { # Added by Thierry 02/03/2007
my $context = {"ABOVE"=>$above, "PLACE"=>$place, "BELOW" => $below, "TREE"=>$this, "INDEX_SET"=>$index_set, "ADDED_NODE_SET"=>$added_node_set, "ADDED_INDEX_SET"=>$added_index_set};
push @contexts, $context;
}
}
}
return \@contexts;
}
sub updateIndexes
{
my ($this,$phrase_index_set,$words_a) = @_;
my $heads_h;
my $index_set = Lingua::YaTeA::IndexSet->new;
my $simplified_index_set = $phrase_index_set->copy;
$this->getNodeSet->fillIndexSet($index_set);
$heads_h = $this->getNodeSet->searchHeads($words_a);
if ($simplified_index_set->simplifyWithSeveralPivots($index_set,$this->getNodeSet,$this,$heads_h) == -1 ) {return -1;}
lib/Lingua/YaTeA/WordFromCorpus.pm view on Meta::CPAN
if ($this->getLexItem->getPOS eq $document_boundary)
{
return 1;
}
return 0;
}
sub updateSentence
{
my ($this,$sentences) = @_;
$this->{SENTENCE} = $sentences->getCurrent;
}
sub updateStartChar
{
my ($this) = @_;
$this->{START_CHAR} = $Lingua::YaTeA::Sentence::start_char;
}
sub isChunkingFrontier
{
my ($this,$chunking_data) = @_;
my @types = ("POS", "LF", "IF");
my $type;