I loaded the ERG trunk in LKB and parsed the default sentence “Abrams hired two competent programmers.” The trees were good but I can’t get the rules to show in the parse chart. Other than some lexical entries, the chart is only filled with basic_ctype[xxx]. This was done with the script file that was already present in ERG. What should be done to make sure the rules show?
I think I can guess what’s going on here. I’ll take a proper look in the next couple of days and suggest a solution.
@SiewYeng, thanks for reporting this issue. It’s only apparent when local ambiguity packing is turned on, which it is by default in LKB-FOS. When packing is on, the ERG is trying to do conflicting things with the feature RNAME: it is asking for RNAME to be removed from chart edges (to improve the compactness of packing), but is then expecting RNAME to be present in edges for LUI chart display. It can’t have both!
Here are 3 possible fixes (I don’t recommend the first 2):
- Turn packing off.
- Remove RNAME from the packing restrictor (the variable
- Redefine the function lui-chart-edge-name in lkb/user-fns.lsp to pick up RNAME from the original rule not the chart edge:
(defun lui-chart-edge-name (edge) (let* ((rule (edge-rule edge)) (rname (when (rule-p rule) (existing-dag-at-end-of (tdfs-indef (rule-full-fs rule)) '(RNAME))))) (format nil "~a[~a]" (cond ((not (edge-children edge)) (let ((le (get-lex-entry-from-id (first (edge-lex-ids edge))))) (dag-type (tdfs-indef (lex-entry-full-fs le))))) (rname (dag-type rname)) (t (tree-node-text-string (find-category-abb (edge-dag edge))))) (edge-id edge))))
@Dan, do you approve of fix 3? If so, would you like to integrate it?
@johnca, thank you so much for the solution! It works very well
Great! I’ve filed the issue and fix in the ERG issue tracker at https://github.com/delph-in/erg/issues/26