Hello!
I was trying to run your converter and ran into the following error:
Traceback (most recent call last):
File "DEPtoPHRA.py", line 45, in <module>
main()
File "DEPtoPHRA.py", line 33, in main
ret = c.convert()
File "/home/cogniton/research/code/baal/baal/nlp/grammars/converter.py", line 35, in convert
self._convert_subtree(deps, head, self.dep_graph.root)
File "/home/cogniton/research/code/baal/baal/nlp/grammars/converter.py", line 45, in _convert_subtree
while len(nodelist) > 0 and nodelist[0] < supnode['address']:
TypeError: unorderable types: list() < int()
In tracing through your program:
deps = parse.DependencyGraph.load(args.data)
deps = self.dep_graph.root['deps']
self._convert_subtree(deps, head, self.dep_graph.root)
def _convert_subtree(self, nodelist, suptree, supnode):
print(nodelist, '\n', supnode)
if len(nodelist) == 0:
return
left = list()
while len(nodelist) > 0 and nodelist[0] < supnode['address']:
So, your comparison between nodelist[0] and supnode['address'] is broken because nodelist now looks like this at execution time:
defaultdict(<class 'list'>, {'MOD': [2, 5, 6, 11], 'ARG': [1]})
I will take a look at more in depth to see if I can fix it tomorrow. I was just trying to run quickly today.
Also, I have copied Xia's projection, modification, and argument tables out of her dissertation. would you like them?
Hello!
I was trying to run your converter and ran into the following error:
In tracing through your program:
deps = parse.DependencyGraph.load(args.data)So, your comparison between nodelist[0] and supnode['address'] is broken because nodelist now looks like this at execution time:
defaultdict(<class 'list'>, {'MOD': [2, 5, 6, 11], 'ARG': [1]})I will take a look at more in depth to see if I can fix it tomorrow. I was just trying to run quickly today.
Also, I have copied Xia's projection, modification, and argument tables out of her dissertation. would you like them?