org.languagetool.resource.gl.freeling2lt.pl Maven / Gradle / Ivy
#!/usr/bin/perl
# Convert the Freeling dictionary into LanguageTools format
# [email protected]
# Usage: cat dicc.src | ./freeling2lt.pl > language.dict
while(<>)
{
chomp;
@tokens = split;
if( $#tokens > 2 )
{
my $wordform = shift(@tokens);
for(my $i=0; $i<$#tokens; $i+=2)
{
print "$wordform\t$tokens[$i]\t$tokens[$i+1]\n";
}
}
else
{
$" = "\t";
print "@tokens\n";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy