From 0cd57a9238d889aad05196afd713bc891598df5d Mon Sep 17 00:00:00 2001 From: Erickson Silva Date: Mon, 18 Jan 2016 10:52:54 -0300 Subject: [PATCH] Corrige tratamento de nĂºmeros romanos. --- src/AplicaRegras.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/AplicaRegras.py b/src/AplicaRegras.py index 421a16c..2319fcd 100644 --- a/src/AplicaRegras.py +++ b/src/AplicaRegras.py @@ -402,12 +402,13 @@ class AplicaRegras(object): while(it.has_next()): tag = it.get_ticket() + try: + num_romano = roman_to_int(it.get_word().encode('utf-8')) + lista_simplificada[it.get_count()] = [num_romano.decode('utf-8'), 'NUM-R'] + except: + pass + if tag == "NUM": - try: - num_romano = roman_to_int(it.get_word().encode('utf-8')) - lista_simplificada[it.get_count()] = [num_romano.decode('utf-8'), 'NUM-R'] - except: - pass num = True if tag != "NPR-P" and (tag[-2:] == "-P" or tag[-2:] == "_P") and self.verificar_excecao_plural(it.get_word()): -- libgit2 0.21.2