Hello, 1. the first number is the number of elements in the row. 2. 0 means "left to right" and 1 means right to left. When a constituent is found, say, ADJP (adjectival phrase) it will look at the constituents in the parse tree (top down left to right) and will stop whenever the first one is find. In our example, if a plural noun appears as child of a ADJP then that constituent will be marked as head.
The head rules of Noun Phrases (NP) are hardcoded in the opennlp.tools.parser.lang.en package for english and opennlp.tools.parser.lang.es for Spanish. HTH, R On Thu, Apr 14, 2016 at 11:16 PM, Yohanes Gultom <yohanes.gul...@gmail.com> wrote: > I see. Ok, I'll try to figure it out from the dissertation. Thanks for > pointing it out. > On Apr 15, 2016 12:44 AM, "Rich Cooper" < > metasemant...@englishlogickernel.com> wrote: > >> Here is a URL for the Collins dissertation: >> >> http://www.dfki.de/~neumann/dop-seminar/References/collins-thesis.pdf >> >> Sincerely, >> Rich Cooper, >> Rich Cooper, >> >> Chief Technology Officer, >> MetaSemantics Corporation >> MetaSemantics AT EnglishLogicKernel DOT com >> ( 9 4 9 ) 5 2 5-5 7 1 2 >> http://www.EnglishLogicKernel.com >> >> >> -----Original Message----- >> From: David Sanderson [mailto:da...@crowdcare.com] >> Sent: Thursday, April 14, 2016 10:09 AM >> To: users@opennlp.apache.org >> Subject: Re: Training parser & head rules >> >> The theory behind the head_rules file is described in this >> dissertation: >> >> >> *Michael Collins, Head-driven Statistical Models for Natural >> Language Parsing, Ph.D. Dissertation Computer and Information >> Science, University of Pennsylvania, 1999.* >> >> From the research I have done, I believe that the OpenNLP parser >> implementation is based on Collins' work. >> >> This dissertation can be found on the Internet. >> >> >> On Thu, Apr 14, 2016 at 11:39 AM, Joern Kottmann >> <kottm...@gmail.com> wrote: >> >> > I also never really created it myself, but it was once explained >> > to me >> > that the format is very and frequently used in research papers. I >> > think it must be possible to track that down a bit and maybe >> > write some documentation. >> > >> > I would start looking in papers from Tom Morton or Adwait >> > Ratnaparkhi, >> > I am sure they have written about it or referenced it somewhere. >> > >> > HTH, >> > Jörn >> > >> > On Thu, Apr 14, 2016 at 3:55 PM, Yohanes Gultom >> > <yohanes.gul...@gmail.com> >> > wrote: >> > >> > > Thanks for the fast response. >> > > Yes, I have. Unfortunately it doesn't explain how to generate >> > > the >> > > head rules nor explaining the format of given example >> > > http://opennlp.sourceforge.net/models/english/parser/head_rules >> > > >> > > >> > > Have a great day, >> > > >> > > Yohanes Gultom >> > > Enterprise Software Developer >> > > LinkedIn <http://www.linkedin.com/profile/view?id=41941925> | >> > > Blog >> > > <http://www.yohanesgultom.co.cc> | Facebook >> > > <http://www.facebook.com/yohanes.gultom> | Twitter >> > > <http://twitter.com/yohanesgultom> >> > > >> > > On Thu, Apr 14, 2016 at 8:51 PM, Russ, Daniel (NIH/CIT) [E] < >> > > dr...@mail.nih.gov> wrote: >> > > >> > > > I have never done this, but have you seen: >> > > > http://stackoverflow.com/questions/6359050/opennlp-headrules >> > > > >> > > > Daniel Russ, Ph.D. >> > > > Staff Scientist, Office of Intramural Research Center for >> > > > Information Technology National Institutes of Health U.S. >> > > > Department of Health and Human Services >> > > > 12 South Drive >> > > > Bethesda, MD 20892-5624 >> > > > >> > > > On Apr 14, 2016, at 9:30 AM, Yohanes Gultom >> > > > <yohanes.gul...@gmail.com <mailto:yohanes.gul...@gmail.com>> >> > > > wrote: >> > > > >> > > > Hi all, >> > > > >> > > > I'm trying to do a constituency parsing on Non-English >> > > > sentence >> > > > (Indonesian) >> > > > >> > > > >> > > > using OpenNLP?. I >> > > > >> > > > already have a training data (attached) but I don't know how >> > > > to >> > > > create >> > a >> > > > head rules. As far as I can understand, head rules is a set >> > > > of CFG >> > > > production rules but I can't understand the format. Could >> > > > anyone >> > > > help >> > to >> > > > explain how to create a head rules from a training data? >> > > > >> > > > >> > > > >> > > > I also notice that in documentation ( >> > > > >> > > >> > https://opennlp.apache.org/documentation/1.6.0/manual/opennlp.html#too >> > ls.parser.training >> > > ), >> > > > there is no example yet on using API to train a parser. Could >> > > > anyone provide a brief example on this? >> > > > >> > > > >> > > > ?Many t >> > > > hanks. >> > > > >> > > > >> > > > ?Yohanes Gultom >> > > > >> > > > >> > > > >> > > > >> > > > >> > > >> > >> >> >> >> -- >> David Sanderson >> Natural Language Processing Developer >> CrowdCare Corporation >> wysdom.com >> >> >>