Hola, me han encomendado una tarea de la cual no tengo ni remota idea,
como siempre, jajajajaja.
Me piden que elimine de un conjunto de registros que están en un txt o
en mysql las stopwords en inglés.
Buscando y navegando por la red encontré el paquete
Lingua::EN::StopWords, me puse a ello y si meto un registro funciona
perfecto, pero cuando le agrego el archivo completo no hace nada,
imprime todo sin eliminar las stopwords y he probado de muchas
maneras.
Este es el ejemplo del modulo, solo le agregue el open para cargar el archivo
use Lingua::EN::StopWords qw(%StopWords);
open(TEXTO,"contenido.txt");
#my @words = qw(There will be a poster presentation of all the
shortlisted nominees taking place at the PV Group Tech Arena in hall
A3 for the duration of the Intersolar exhibition.);
#imprime: "There poster presentation shortlisted nominees taking place
PV Group Tech Arena hall A3 duration Intersolar exhibition."
my @words = <TEXTO>;
print join " ", grep { !$StopWords{$_} } @words;
_______________________________________________
Madrid-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/madrid-pm