diff options
Diffstat (limited to 'JLanguageTool/src/resource/es/freeling2lt.pl')
-rw-r--r-- | JLanguageTool/src/resource/es/freeling2lt.pl | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/JLanguageTool/src/resource/es/freeling2lt.pl b/JLanguageTool/src/resource/es/freeling2lt.pl new file mode 100644 index 0000000..a0fd7c2 --- /dev/null +++ b/JLanguageTool/src/resource/es/freeling2lt.pl @@ -0,0 +1,26 @@ +#!/usr/bin/perl + +# Convert the Freeling dictionary into LanguageTools format +# sdocio@gmail.com +# 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"; + } +} |