Commit 792af4f204f04554105359a53ce36648afa06d2f
1 parent
525fe3e7
Exists in
master
and in
1 other branch
Corrige separação de orações no TraduzSentencas
Showing
1 changed file
with
6 additions
and
1 deletions
Show diff stats
src/new/TraduzSentencas.py
... | ... | @@ -16,9 +16,14 @@ aplicaRegras = AplicaRegras() |
16 | 16 | |
17 | 17 | def iniciarTraducao(texto): |
18 | 18 | textoDividido = texto.split(".") |
19 | + textoTraduzido = [] | |
19 | 20 | for w in textoDividido: |
20 | 21 | if len(w) > 0 and w != " ": |
21 | - return gerarAnalise(w) | |
22 | + textoTraduzido.append(gerarAnalise(w)) | |
23 | + try: | |
24 | + return " ".join(textoTraduzido) | |
25 | + except: | |
26 | + return "" | |
22 | 27 | |
23 | 28 | |
24 | 29 | def gerarAnalise(sentenca): | ... | ... |