All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.languagetool.resource.gl.freeling2lt.pl Maven / Gradle / Ivy

There is a newer version: 6.5
Show newest version
#!/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