Closed john-a-carroll closed 1 year ago
Siew Yeng Chow reported an issue where after parsing with the LKB, the LUI parse chart shows BASIC_CTYPE instead of rule names: https://delphinqa.ling.washington.edu/t/getting-parse-chart-in-lkb/686
The issue is caused by a faulty definition of lui-chart-edge-name in lkb/user-fns.lsp . As I explained, the function should pick up RNAME from the original rule not the chart edge. Here's a fix:
lui-chart-edge-name
(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))))
This should work in all versions of the ERG and all versions of the LKB.
I have now added this patch to the 2020 release, and will propagate it in the trunk version of the ERG. Thanks.
Now also in the 2023 release.
Siew Yeng Chow reported an issue where after parsing with the LKB, the LUI parse chart shows BASIC_CTYPE instead of rule names: https://delphinqa.ling.washington.edu/t/getting-parse-chart-in-lkb/686
The issue is caused by a faulty definition of
lui-chart-edge-name
in lkb/user-fns.lsp . As I explained, the function should pick up RNAME from the original rule not the chart edge. Here's a fix:This should work in all versions of the ERG and all versions of the LKB.