Commit e1cf2b2f43d2c9c96bf77e8c06995e15d0cc0510

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

Correção tratamento de plurais

Showing 1 changed file with 6 additions and 3 deletions   Show diff stats
tradutor/src/py/Simplificador.py
... ... @@ -150,10 +150,13 @@ class Simplificador(object):
150 150 return word[0:-2]
151 151 elif(word[-2:] == "NS"):
152 152 return word[0:-2]+"M"
  153 + elif(word[-3:] == "EIS"):
  154 + return word[0:-3]+"IL"
153 155 elif(word[-2:] == "IS"):
154   - #TODO: Substitui por –L se a palavra no singular terminar por –AL, -EL, -OL, -UL
155   - #Substitui por –IL se a palavra no singular terminar por -IL
156   - return word[0:-2]
  156 + if(word[-3] == "A" or word[-3] == "E" or word[-3] == "O" or word[-3] == "U"):
  157 + return word[0:-2]+"L"
  158 + else:
  159 + return word
157 160 elif(word[-1] == "S"):
158 161 #TODO: Palavras paroxítonas ou proparoxítonas terminadas em S. Ex: lápis, vírus, tênis, ônibus, etc
159 162 return word[0:-1]
... ...