Commits

Lars Yencken committed a6b8214

Improves display of {c,x,nc}mod and {c,x,nc}subj relations.

Comments (0)

Files changed (1)

                 del parts[0]
             elif parts[-1] == '_':
                 del parts[-1]
-            elif label == 'ncsubj' and parts[-1] == 'obj':
-                label = 'ncsubj+obj'
-                del parts[-1]
-            elif label in ('cmod', 'ccomp'):
+            elif label in ('csubj', 'xsubj', 'ncsubj') \
+                    and parts[-1] in ('obj', 'inv'):
+                label = '%s[%s]' % (label, parts.pop())
+            elif label in ('cmod', 'ncmod', 'xmod', 'ccomp'):
                 label = "%s['%s']" % (label, parts.pop(0))
             else:
+                print >> sys.stderr, "unsure how to display this relation:"
+                print >> sys.stderr, '\t' + line
+                print >> sys.stderr, "entering debugger..."
                 import pdb; pdb.set_trace()
 
         if len(parts) == 2: