Skip to content

Commit

Permalink
splitter-gl updated
Browse files Browse the repository at this point in the history
  • Loading branch information
gamallo committed Jul 23, 2020
1 parent e09dd4f commit 706a7bd
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tagger/gl/splitter-gl_exe.perl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ package Splitter;
###########################################################
my $w = "[A-ZÁÉÍÓÚÀÈÌÒÙÂÊÎÔÛÑÇÜa-záéíóúàèìòùâêîôûñçü]";#<string>

my $excep = "|podemos|este|";#<string>
my $excep = "|podemos|este|crechas|vellas|vella|alfama|área|rías|ría|torrente|apóstolo|";#<string>

my @Loc;#<list><string>
while(<$LOC>){#<string>
Expand Down Expand Up @@ -95,7 +95,7 @@ sub splitter {
my ($raiz, $sufixo) = $token =~ /\b([^\W]+ei)n([oa](s)?)\b/;#<string>
my $raiz_lower = lowercase ($raiz);#<string>

if ($Verb->{$raiz_lower}) {
if ($Verb->{$raiz_lower} && $excep !~ /\|$token\|/i) {
$token = $raiz . " " . $sufixo;
}
}
Expand All @@ -105,7 +105,7 @@ sub splitter {
#print STDERR "COMEUNO: #$raiz# - #$sufixo#\n";
my $raiz_lower = lowercase ($raiz);#<string>

if ($Verb->{$raiz_lower}) {
if ($Verb->{$raiz_lower} && $excep !~ /\|$token\|/i) {
$token = $raiz . " " . $sufixo;
}
}
Expand All @@ -114,7 +114,7 @@ sub splitter {
my ($raiz, $sufixo) = $token =~ /\b([^\W]+iu)n([oa](s)?)\b/;#<string>
my $raiz_lower = lowercase ($raiz);#<string>

if ($Verb->{$raiz_lower}) {
if ($Verb->{$raiz_lower} && $excep !~ /\|$token\|/i) {
$token = $raiz . " " . $sufixo;
}
}
Expand All @@ -123,7 +123,7 @@ sub splitter {
my ($raiz, $sufixo) = $token =~ /\b([^\W]+ai)n([oa](s)?)\b/;#<string>
my $raiz_lower = lowercase ($raiz);#<string>

if ($Verb->{$raiz_lower}) {
if ($Verb->{$raiz_lower} && $excep !~ /\|$token\|/i) {
$token = $raiz . " " . $sufixo;
}
}
Expand All @@ -132,7 +132,7 @@ sub splitter {
my ($raiz, $sufixo) = $token =~ /\b([^\W]+[uü]íu)n([oa](s)?)\b/;#<string>
my $raiz_lower = lowercase ($raiz);#<string>

if ($Verb->{$raiz_lower}) {
if ($Verb->{$raiz_lower} && $excep !~ /\|$token\|/i) {
$token = $raiz . " " . $sufixo;
}
}
Expand All @@ -144,7 +144,7 @@ sub splitter {
my $raiz_lower_semtil = tirar_acentos ($raiz_lower);#<string>
my $raiz_semtil = tirar_acentos ($raiz);#<string>
my $forma = $raiz_lower_semtil . "s";#<string>
if ($Verb->{$forma}) {
if ($Verb->{$forma} && $excep !~ /\|$token\|/i) {
$token = $raiz_semtil . "s " . $sufixo;
}
}
Expand All @@ -153,7 +153,7 @@ sub splitter {
my ($raiz, $sufixo) = $token =~ /\b([^\W]+[aei])l([oa](s)?)\b/;#<string>
my $raiz_lower = lowercase ($raiz);#<string>
my $inf = $raiz_lower . "r";#<string>
if ($Verb->{$inf}) {
if ($Verb->{$inf} && $excep !~ /\|$token\|/i) {
$token = $raiz . "r " . $sufixo;
}
}
Expand All @@ -168,15 +168,15 @@ sub splitter {
if ($Verb->{$forma}) {
$token = $raiz . "s " . $sufixo;
}
elsif ($Verb->{$forma_semtil}) {
elsif ($Verb->{$forma_semtil} && $excep !~ /\|$token\|/i) {
$token = $raiz_semtil . "s " . $sufixo;
}
}
##comíao, comeríao
elsif ($token =~ /\b([^\W]+)ía[oa](s)?\b/) {
my ($raiz, $sufixo) = $token =~ /\b([^\W]+ía)([oa](s)?)\b/;#<string>
my $raiz_lower = lowercase ($raiz);#<string>
if ($Verb->{$raiz_lower}) {
if ($Verb->{$raiz_lower} && $excep !~ /\|$token\|/i) {
$token = $raiz . " " . $sufixo;
}
}
Expand All @@ -186,7 +186,7 @@ sub splitter {
my $raiz_lower = lowercase ($raiz);#<string>
my $raiz_lower_semtil = tirar_acentos ($raiz_lower);#<string>
my $raiz_semtil = tirar_acentos ($raiz);#<string>
if ($Verb->{$raiz_lower_semtil}) {
if ($Verb->{$raiz_lower_semtil} && $excep !~ /\|$token\|/i ) {
$token = $raiz_semtil . " " . $sufixo;
}
}
Expand Down Expand Up @@ -220,7 +220,7 @@ sub splitter {
if ($sufixo =~ /^monol[ao](s)?$/) {
$raiz_semtil =~ s/s$/mos/;
}
#print STDERR "---#$token# - $raiz\n";
# print STDERR "---#$token# - $raiz\n";

if ($sufixo =~ /^$pron3$/) {
##separar cliticos compostos: mo, mos, to, tos, lho, lhos..
Expand Down

0 comments on commit 706a7bd

Please sign in to comment.