I'm not familiar with the stanford parser, or nlp, but the `no matching ctor error` is easily explained: According to the doc <http://nlp.stanford.edu/nlp/javadoc/javanlp/edu/stanford/nlp/parser/lexparser/LexicalizedParser.html#LexicalizedParser(edu.stanford.nlp.parser.lexparser.Lexicon, edu.stanford.nlp.parser.lexparser.BinaryGrammar, edu.stanford.nlp.parser.lexparser.UnaryGrammar, edu.stanford.nlp.parser.lexparser.DependencyGrammar, edu.stanford.nlp.util.Index, edu.stanford.nlp.util.Index, edu.stanford.nlp.util.Index, edu.stanford.nlp.parser.lexparser.Options)>, the only Constructor to LexicalizedParser takes 8 arguments, whose types I won't bother to repeat.
Assuming you are familiar with the first half of http://clojure.org/java_interop , I recommend that you find a usage example of Stanford Parser and translate it to clojure sytax. That way you only have to bother with one unknown at a time and it will be easier to answer questions. kind regards 2014-09-08 4:50 GMT+02:00 Sam Raker <[email protected]>: > I'm trying to use the Stanford Parser from Clojure, but I don't know > hardly any Java, and this is my first time working with the interop stuff. > All I want to do is play around with the class in the REPL. I added > `[edu.stanford.nlp/stanford-parser "3.4.1"]` to my Lein `project.clj`, and > the download seemed to go fine. The documentation is > http://nlp.stanford.edu/nlp/javadoc/javanlp/edu/stanford/nlp/parser/lexparser/LexicalizedParser.html > for those of you playing at home. > > Basically, my efforts have been a total failure. I can `(import > edu.stanford.nlp.parser.lexparser.LexicalizedParser)`, but after that, it's > just a nightmare of `no matching ctor`, `no matching field`, > `NoSuchFieldException` and `expected static field` errors. I can't even > initialize anything -- `(def parser (new LexicalizedParser))` gives me the > aforementioned `no matching ctor` error. > > Like I said before, this is entirely my fault: I don't know Java, I don't > know interop, and I Google has failed me. So I turn to you, beloved Clojure > community, to correct my ignorance. I'm sure it's not hard, I'm just > missing something. > > > Thanks, > -sam > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
