Commit f97df257daa0f10d7a976b0cd8447c184233fed9
1 parent
4664c2c6
Exists in
master
and in
1 other branch
Remove tokens classfiicados como pontuação da lista morfológica
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
src/alexp.py
... | ... | @@ -58,7 +58,8 @@ def etiquetaSentenca(s): |
58 | 58 | anotada = AnotaCorpus.anota_sentencas([s],etiquetador,"hunpos")[0] |
59 | 59 | #anotada[0] = (anotada[0][0].lower(), anotada[0][1]) |
60 | 60 | #return anotada |
61 | - return [[x[0].lower(),x[1]] for x in anotada] | |
61 | + tag_punctuation = [".",",","QT","("] | |
62 | + return [[x[0].lower(),x[1]] for x in anotada if x[1] not in tag_punctuation] | |
62 | 63 | |
63 | 64 | def geraEntradasLexicais(lista): |
64 | 65 | """Gera entradas lexicais no formato CFG do NLTK a partir de lista de pares constituídos de tokens e suas etiquetas. | ... | ... |