I understand the manual hasn't been updated in a while (as noted in release notes). Still, I'm trying to use it. The description of normalize-fd doesn't work as expected:
(normalize-fd '((a ((a1 1)))
(a ((alt (((a1 2))
((a2 2))))))
(a nil)
({a a3} 3)))
; Debugger entered on #<TYPE-ERROR expected-type: LIST datum: :I>
After poking around a bit, it seems like the following is closer to what was meant (for that example fd):
(filter-flags (u-disjunctions '((a ((a1 1)))
(a ((alt (((a1 2))
((a2 2))))))
(a nil)
({a a3} 3)) nil))
((A ((A1 1) (A2 2) (A3 3))))
I was unable to find any usages of normalize-fd (in the code base) with which to better understand its meaning. It seems one may need different normalization functions for input and grammar fd's:
(filter-flags (u-disjunctions (get-test 'ir01) nil))
((CAT S) (PROT ((N ===))) (VERB ((V ===))) (GOAL ((N ===))))
So the previous method doesn't work so well on that input fd. But prep-input2 does:
(prep-input2 (get-test 'ir01))
((CAT S) (PROT ((N ((LEX "John"))))) (VERB ((V ((LEX "like")))))
(GOAL ((N ((LEX "Mary"))))))
But then prep-input2 doesn't work well on the previous grammar-like fd:
(prep-input2 '((a ((a1 1)))
(a ((alt (((a1 2))
((a2 2))))))
(a nil)
({a a3} 3)))
; Debugger entered on #<TYPE-ERROR expected-type: LIST datum: :I>
I understand the manual hasn't been updated in a while (as noted in release notes). Still, I'm trying to use it. The description of
normalize-fddoesn't work as expected:After poking around a bit, it seems like the following is closer to what was meant (for that example fd):
I was unable to find any usages of
normalize-fd(in the code base) with which to better understand its meaning. It seems one may need different normalization functions for input and grammar fd's:So the previous method doesn't work so well on that input fd. But
prep-input2does:But then
prep-input2doesn't work well on the previous grammar-like fd: