Commit 2c86fc6e16b21d96aed3fd5907b18d0b39442efe

Authored by Erickson Silva
1 parent 53093474
Exists in master and in 1 other branch devel

Adiciona sinalização de ponto, exclamação e interrogação

Showing 1 changed file with 7 additions and 0 deletions   Show diff stats
src/alexp.py
... ... @@ -64,6 +64,13 @@ def etiquetaSentenca(s):
64 64 continue
65 65 tupla = [regex.sub('',x[0]).lower(),x[1]]
66 66 if tupla[0] != "": anotada_corrigida.append(tupla)
  67 + else:
  68 + if x[0] == ".":
  69 + anotada_corrigida.append(["[ponto]".decode("utf-8"),x[1]])
  70 + elif x[0] == "?":
  71 + anotada_corrigida.append(["[interrogacao]".decode("utf-8"),x[1]])
  72 + elif x[0] == "!":
  73 + anotada_corrigida.append(["[exclamacao]".decode("utf-8"),x[1]])
67 74 return anotada_corrigida
68 75  
69 76 def geraEntradasLexicais(lista):
... ...