leondz / timen

Automatically exported from code.google.com/p/timen
4 stars 2 forks source link

ArrayIndexOutOfBoundsException when processing whole directory #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When I run:

java -jar TIMEN_CONSUMER/dist/TIMEN_CONSUMER.jar -d -a normalize_tml -ap 
output_folder=/tmp/timen-out ~/tbaq/*.tml

Some of the data processes, but TIMEN aborts at this point:

Validating APW19981205.0374.tml with xsd 
(/var/www/timen/timen/TIMEN_CONSUMER/program-data/default-NLPFiles-descriptions/
tml.xsd)
t2|Saturday|omit|1998-12-05T09:42

timex:Saturday  normtext:saturday  pattern:TWeekday  dct:1998-12-05T09:42  
reftime:1998-12-05T09:42  tense:omit
found rules:
    1 TWeekday rule to apply: DATE_WEEKDAY(DCT,PAT(0))
result: 1998-12-05
Ref_time updated: 1998-12-05
t3|early_this_week|omit|1998-12-05T09:42

timex:early_this_week  normtext:early_this_week  pattern:early_this_TUnit  
dct:1998-12-05T09:42  reftime:1998-12-05  tense:omit
found rules:
    No rules found for: early_this_TUnit
    No rules found for: early_this_TUnit
    No rules found for: early_this_TUnit
    50 this_TUnit rule to apply: ADD(DCT,PAT(1),0)
result: 1998-W49
t4|April|omit|1998-12-05T09:42

timex:April  normtext:april  pattern:TMonth  dct:1998-12-05T09:42  
reftime:1998-12-05  tense:omit
found rules:
    4 TMonth rule to apply: DATE_MONTH(DCT,PAT(0))
result: 1998-04
Ref_time updated: 1998-04
t5|April|omit|1998-12-05T09:42

timex:April  normtext:april  pattern:TMonth  dct:1998-12-05T09:42  
reftime:1998-04  tense:omit
found rules:
    4 TMonth rule to apply: DATE_MONTH(DCT,PAT(0))
result: 1998-04
Ref_time updated: 1998-04
t6|two-day|omit|1998-12-05T09:42

timex:two-day  normtext:2_day  pattern:Num_TUnit  dct:1998-12-05T09:42  
reftime:1998-04  tense:omit
found rules:
    20 Num_TUnit rule to apply: "P";TO_PERIOD(PAT(0),PAT(1))
result: P2D
t7||omit|1998-12-05T09:42
Errors found (TIMEN):
    0

java.lang.ArrayIndexOutOfBoundsException: 0
    at TIMEN.TIMEN.normalize(TIMEN.java:151)
    at timen_example.OptionHandler.contextaware_normalization(OptionHandler.java:349)
    at timen_example.OptionHandler.doAction(OptionHandler.java:149)
    at timen_example.Main.main(Main.java:79)

Original issue reported on code.google.com by leonderczynski on 9 May 2012 at 2:51