You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@opennlp.apache.org by Christopher Dellario <sh...@gmail.com> on 2012/07/07 18:22:29 UTC

How to train the Parser (or what's the head_rules file look like?)

Hi, I'm new to the list and tried browsing through the archive to find
an answer to my question but didn't have any luck.  Can someone please
give me details on how to train the Parser?  I'm particularly stuck on
the head_rules file, as it's a required input to the ParserTrainer.  I
don't have any examples of it and the docs only say, "TODO: Add
documentation about the head rules file."

Ultimately what I'm trying to do is reliably identify the object of a
sentence.  If anyone has any pointers for that I'd love to hear them.
Thank you.

Re: How to train the Parser (or what's the head_rules file look like?)

Posted by Chris Dellario <sh...@gmail.com>.
Thanks very much, Jörn.  Btw, I'm open to any suggestions or advice for determining the subject of the sentence if anyone has some to share.  Today I'm using the DocumentCategorizer for categorization of request types, but I have to restrain the input such that the subject of the sentence is put in quotes.  I'm interested in using removing that constraint.  


Thanks,
Chris

Sent from my mobile device.  Please excuse any typos.  

On Aug 6, 2012, at 4:43 AM, Jörn Kottmann <ko...@gmail.com> wrote:

> On 08/05/2012 04:52 PM, Christopher Dellario wrote:
>> I was lucky enough to find a post that had a link to a head_rules file:
>> http://opennlp.sourceforge.net/models/english/parser/head_rules
>> 
>> So I can now train the Parser, but I'd like to understand what the
>> head_rules files does and its syntax.  Anybody know?
> 
> The current one is located in opennlp-tools/lang/en/parser.
> 
> I was told the format is the one used by the collins parser.
> 
> Each line starts with a number, thats the count of item to follow.
> That is some C left over where they wanted to know the size of
> the array in advance.
> 
> Anyway I do not know more about it, because I never really worked
> on the parser.
> Would be nice to investigate this a bit further and then update our
> documentation about it.
> 
> Jörn

Re: How to train the Parser (or what's the head_rules file look like?)

Posted by Jörn Kottmann <ko...@gmail.com>.
Have a look here:
http://www.cs.columbia.edu/~mcollins/papers/heads

Jörn

On 08/06/2012 10:43 AM, Jörn Kottmann wrote:
> On 08/05/2012 04:52 PM, Christopher Dellario wrote:
>> I was lucky enough to find a post that had a link to a head_rules file:
>> http://opennlp.sourceforge.net/models/english/parser/head_rules
>>
>> So I can now train the Parser, but I'd like to understand what the
>> head_rules files does and its syntax.  Anybody know?
>
> The current one is located in opennlp-tools/lang/en/parser.
>
> I was told the format is the one used by the collins parser.
>
> Each line starts with a number, thats the count of item to follow.
> That is some C left over where they wanted to know the size of
> the array in advance.
>
> Anyway I do not know more about it, because I never really worked
> on the parser.
> Would be nice to investigate this a bit further and then update our
> documentation about it.
>
> Jörn


Re: How to train the Parser (or what's the head_rules file look like?)

Posted by Jörn Kottmann <ko...@gmail.com>.
On 08/05/2012 04:52 PM, Christopher Dellario wrote:
> I was lucky enough to find a post that had a link to a head_rules file:
> http://opennlp.sourceforge.net/models/english/parser/head_rules
>
> So I can now train the Parser, but I'd like to understand what the
> head_rules files does and its syntax.  Anybody know?

The current one is located in opennlp-tools/lang/en/parser.

I was told the format is the one used by the collins parser.

Each line starts with a number, thats the count of item to follow.
That is some C left over where they wanted to know the size of
the array in advance.

Anyway I do not know more about it, because I never really worked
on the parser.
Would be nice to investigate this a bit further and then update our
documentation about it.

Jörn

Re: How to train the Parser (or what's the head_rules file look like?)

Posted by Christopher Dellario <sh...@gmail.com>.
I was lucky enough to find a post that had a link to a head_rules file:
http://opennlp.sourceforge.net/models/english/parser/head_rules

So I can now train the Parser, but I'd like to understand what the
head_rules files does and its syntax.  Anybody know?

Re: How to train the Parser (or what's the head_rules file look like?)

Posted by Christopher Dellario <sh...@gmail.com>.
Can anybody point me to a sample head_rules file?  Or some documentation?


On Sat, Jul 7, 2012 at 12:22 PM, Christopher Dellario
<sh...@gmail.com> wrote:
> Hi, I'm new to the list and tried browsing through the archive to find
> an answer to my question but didn't have any luck.  Can someone please
> give me details on how to train the Parser?  I'm particularly stuck on
> the head_rules file, as it's a required input to the ParserTrainer.  I
> don't have any examples of it and the docs only say, "TODO: Add
> documentation about the head rules file."
>
> Ultimately what I'm trying to do is reliably identify the object of a
> sentence.  If anyone has any pointers for that I'd love to hear them.
> Thank you.