| 1 |
#!/usr/bin/perl |
| 2 |
# Copyright (C) 2009-2011 Antonio Bonafonte |
| 3 |
# Universitat Politècnica de Catalunya, Barcelona, Spain |
| 4 |
# |
| 5 |
# This script is free software; you can redistribute it and/or |
| 6 |
# modify it under the terms of the GNU Lesser General Public |
| 7 |
# License as published by the Free Software Foundation, |
| 8 |
# version 2.1 of the License. |
| 9 |
# |
| 10 |
# This library is distributed in the hope that it will be useful, |
| 11 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
# Lesser General Public License for more details. |
| 14 |
# |
| 15 |
# You should have received a copy of the GNU Lesser General Public |
| 16 |
# License along with this library; if not, write to the Free Software |
| 17 |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 |
|
| 19 |
#my $infile="../data/ngram/corpus-ca"; |
| 20 |
#my $outfile="work/corpus-ca-reduitsTAGS.out"; |
| 21 |
|
| 22 |
BEGIN { |
| 23 |
use Cwd 'abs_path'; |
| 24 |
use File::Basename; |
| 25 |
push @INC, dirname(abs_path($0)) . "/../functions"; |
| 26 |
} |
| 27 |
|
| 28 |
require "functions_perl.pl" or die $!; |
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
while(my $linea=<STDIN>) |
| 33 |
{ |
| 34 |
($word, $lexema, $pos) = split(/\s+/,$linea); |
| 35 |
$pos=&simplificapos($pos); |
| 36 |
print join(' ',$word,$lexema,$pos) . "\n"; |
| 37 |
} |
| 38 |
|