Get an error while running rule_system_build.py or data_build.py
Traceback (most recent call last):
File "src/rule_system_build.py", line 118, in
n = readFile(filepath,update_freq=True,use_template = True)
File "src/rule_system_build.py", line 102, in readFile
handle_sentence(data,n,update_freq,use_template,jamr=False)
File "src/rule_system_build.py", line 72, in handle_sentence
amr = AMRGraph(amr_t,aligns=aligns)
File "/scratch/cluster/tanya/AMR_AS_GRAPH_PREDICTION/utility/AMRGraph.py", line 45, in init
d, d_v = self.var_get_uni(d)
File "/scratch/cluster/tanya/AMR_AS_GRAPH_PREDICTION/utility/AMRGraph.py", line 159, in var_get_uni
return Var(a), AMRUniversal(concept=self._index[a])
KeyError: (Num(2002), '0.0')
The error seems to be because the self._index (amr object) is always empty. I tried adding the AmsConstant objects to the index dictionary, but that didn't solve the issue.
I am running the code on the output files obtained after python srcpreprocessing.py
Could you help debug this! Thanks!
Get an error while running rule_system_build.py or data_build.py
Traceback (most recent call last): File "src/rule_system_build.py", line 118, in
n = readFile(filepath,update_freq=True,use_template = True)
File "src/rule_system_build.py", line 102, in readFile
handle_sentence(data,n,update_freq,use_template,jamr=False)
File "src/rule_system_build.py", line 72, in handle_sentence
amr = AMRGraph(amr_t,aligns=aligns)
File "/scratch/cluster/tanya/AMR_AS_GRAPH_PREDICTION/utility/AMRGraph.py", line 45, in init
d, d_v = self.var_get_uni(d)
File "/scratch/cluster/tanya/AMR_AS_GRAPH_PREDICTION/utility/AMRGraph.py", line 159, in var_get_uni
return Var(a), AMRUniversal(concept=self._index[a])
KeyError: (Num(2002), '0.0')
The error seems to be because the self._index (amr object) is always empty. I tried adding the AmsConstant objects to the index dictionary, but that didn't solve the issue.
I am running the code on the output files obtained after python srcpreprocessing.py Could you help debug this! Thanks!