Hello,

You need to create a new head rules file for German manually.

If you treat German NPs differently too, you can create a new
HeadRules.java for German the way it was built for English changing
the constituent tags according to the tagset and then using those
HeadRules to train the model. Otherwise take a look at the HeadRules
interface and implement a simple version of it to read from the head
rules file and implement the getHead() and getPunctuationTags
functions.

Cheers,

Rodrigo

On Thu, Jun 13, 2013 at 11:53 AM, Tabea Schröder
<[email protected]> wrote:
> Thanks for that quick help. Now it works for englisch texts.
>
> But actually i need it for german texts.
> Do you know what i have to change  that it works for another
> language\german?
>
> Am 13.06.2013 10:24, schrieb Rodrigo Agerri:
>
>> Hello,
>>
>> For which language?
>>
>> The head rules are based on Michael Collins's thesis. Check Annex A
>> for explanation:
>>
>>
>> https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&ved=0CD0QFjAC&url=http%3A%2F%2Fwww.dfki.de%2F~neumann%2Fdop-seminar%2FReferences%2Fcollins-thesis.pdf&ei=Zn65Ufm1O8OChQeaw4HgDA&usg=AFQjCNEItDe95bYHgAVCvnBWq8Abmlq_PA&sig2=EnSnLqOK0gSVY-PIoZgFcw&bvm=bv.47883778,d.d2k
>>
>> English head rules for NP are harcoded in
>> opennlp.tools.parser.lang.en.HeadRules.java. In this class also you
>> will see that HeadRules is read from a rules file into a
>> HashMap<String,HeadRule>.
>>
>> HTH,
>>
>> Rodrigo
>>
>>
>> On Thu, Jun 13, 2013 at 9:21 AM, Tabea Schröder
>> <[email protected]> wrote:
>>>
>>> Hallo,
>>>
>>> im trying to train a Parser with the following Method:
>>> /    opennlp.tools.parser.chunking.Parser.train/(String <*2>
>>> languageCode,
>>> ObjectStream <*3><Parse <*4>> parseSamples, HeadRules <*5> rules,
>>> TrainingParameters <*6> mlParams)
>>>
>>> But i don't now how to create the *Headrules *Objekt.
>>> I know how the Data head-rules.headrules has to look like, but I can't
>>> make
>>> an Objekt with this Data.
>>>
>>> Thanks in advance
>>>
>>> Tabea
>
>

Reply via email to