;; gorilla-repl.fileformat = 1 ;; ** ;;; # Loading a lexparser ;; ** ;; @@ (ns fuscia-sunset (:import (edu.stanford.nlp.parser.lexparser LexicalizedParser Options))) ;; @@ ;; => ;;; {"type":"html","content":"nil","value":"nil"} ;; <= ;; @@ (def parser (LexicalizedParser/loadModelFromZip "stanford-parser-3.4.1-models.jar" "edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz")) ;; @@ ;; => ;;; {"type":"html","content":"#'fuscia-sunset/parser","value":"#'fuscia-sunset/parser"} ;; <= ;; @@ (.parse parser "Hello, world!") ;; @@ ;; => ;;; {"type":"html","content":"#<LabeledScoredTreeNode (ROOT (FRAG (INTJ (UH Hello)) (, ,) (NP (NN world)) (. !)))>","value":"#"} ;; <= ;; @@ ;; @@