;;; Hey, emacs(1), this is -*- Mode: Common-Lisp; -*-, got it? ;;; ;;; PAL --- PCFG Approximation and Parsing Library for DELPH-IN ;;; Copyright (c) 2009 -- 2012 Johan Benum Evensberget (johan.benum@gmail.com) ;;; Copyright (c) 2009 -- 2012 Stephan Oepen (oe@ifi.uio.no) ;;; ;;; This program is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU Lesser General Public License as published by ;;; the Free Software Foundation; either version 2.1 of the License, or (at ;;; your option) any later version. ;;; ;;; This program is distributed in the hope that it will be useful, but WITHOUT ;;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ;;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public ;;; License for more details. ;;; (in-package :pcfg) (defparameter *include-tdf-label-paths* nil) (defparameter *include-tdf-lists* nil) (defparameter *pcfg-include-leafs-p* t) (defparameter *pcfg-lexical-mode* :collapse) (defparameter *pcfg-use-preterminal-types-p* t) (defparameter *pcfg-laplace-smoothing-p* 1e-4) (defparameter *pcfg-geometric-mean-p* nil) (defparameter *pcfg-symbol-table* nil) (defparameter *tt-table* nil) (defun maptree (fn tree) (if (atom tree) (funcall fn tree) (cons (funcall fn (car tree)) (mapcar (lambda (x) (maptree fn x)) (cdr tree)))))