From 43e20a6745c719f6e85e2bd46bac30609865526c Mon Sep 17 00:00:00 2001 From: bozsahin Date: Thu, 19 Mar 2020 17:50:09 +0300 Subject: [PATCH] added exp-ccg --- bin/ccg.lisp | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/bin/ccg.lisp b/bin/ccg.lisp index 924f133..a6b8387 100644 --- a/bin/ccg.lisp +++ b/bin/ccg.lisp @@ -546,6 +546,48 @@ *fx3-comp* nil *bx3-comp* nil)) +(defun exp-ccg (&key (nf-parse t) (lf t) (beam nil) (oov nil) (type-raise nil)) + "experimental rules are turned on too" + (nf-parse nf-parse) + (lf lf) + (beam beam) + (oov oov) + (type-raise type-raise) + (setf + *f-apply* t ;application + *b-apply* t + *f-comp* t ;composition + *b-comp* t + *fx-comp* t + *bx-comp* t + *f-sub* t ;substitution + *b-sub* t + *fx-sub* t + *bx-sub* t + *f-subbar* t ;substitution bar (aka lost combinator) + *b-subbar* t + *fx-subbar* t + *bx-subbar* t + *f-subcomp* t ;subcomposition (i.e. D) + *f2-subcomp* t ; D^2 + *b-subcomp* t + *fx-subcomp* t + *bx-subcomp* t + *f2-comp* t ;B^2 + *b2-comp* t + *fx2-comp* t + *bx2-comp* t + *f2-sub* t ;S'' (not S^2 of Curry) + *b2-sub* t + *fx2-sub* t + *bx2-sub* t + *f3-comp* t ;B^3 + *b3-comp* t + *fx3-comp* t + *bx3-comp* t)) +; +; ----------------- + (defun rules () (format t "To change a switch, use (setf ) where is T (on) or NIL (off) @@ -1238,7 +1280,7 @@ (and (> *singletons* 0) (format t "~%=============================================================================~%*** CCGlab warning *** There are ~A string-constant categories in your grammar~% make sure NONE are void" *singletons*)) (format t "~2%======================= c o m p i l i n g ===================================~%") - (format t "~%Project name: ~A~% Input : (~A, ~A)~% Output: ~A ~%** Check ~A for THE FIRST ERROR in ~A if load fails." pname sfilename infilename ofilename ofilename sfilename))) + (format t "~%Project name: ~A~% Input : (~A, ~A)~% Output: ~A ~%** Check ~A for THE FIRST ERROR in ~A IF load fails." pname sfilename infilename ofilename ofilename sfilename))) (defun lispify-supervision (pname ofilename sourcefile infilename maker) (case maker ;; one of these will generate .suptokens