cnorthwood / ternip

Temporal Expression Recognition and Normalisation in Python
Other
78 stars 17 forks source link

"Malformed rule expression" in gutime-date.ruleblock:102 #10

Closed leondz closed 13 years ago

leondz commented 13 years ago

From TimeBank, wsj_1011.tml

WARNING: Could not determine document creation time, use -c to override TERNIP: WARNING: Malformed rule expression Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/ternip/rule_engine/normalisation_rule.py", line 139, in apply timex.value = eval(self._value_exp) File "/usr/local/lib/python2.6/dist-packages/ternip/rules/normalisation/gutime-date.ruleblock:102:value", line 1, in File "/usr/local/lib/python2.6/dist-packages/ternip/rule_engine/normalisation_functions/relative_date_functions.py", line 203, in compute_offset_base m = date_functions.month_to_num(match.group()) - int(ref_date[4:6]) ValueError: invalid literal for int() with base 10: ''

leondz commented 13 years ago

Dupe issue, behaviour is that described in https://github.com/cnorthwood/ternip/issues/2 and the same fix applies to compute_offset_base()