I too support Richard Eckart de Castilho idea for solving that problem.

Regards,
Rakesh.P

> On 11-Jul-2016, at 8:29 PM, Richard Eckart de Castilho <r...@apache.org> 
> wrote:
> 
> I don't think that the OpenNLP named entity recognizer itself is able to 
> generate more than one label. A solution for you would be to train separate 
> classifiers, one for "person" and one for "director" and add two 
> OpenNlpNamedEntityRecognizer components to the pipeline, each using of of 
> your trained models.
> 
> See also: https://github.com/dkpro/dkpro-core/issues/901
> 
> Cheers,
> 
> -- Richard
> 
>> On 11.07.2016, at 16:53, John Bower <j...@zode64.com> wrote:
>> 
>> I'm currently using OpenNLP with UIMA to label words in a sentence. It's
>> important that a single word can be labelled more than once. For example 
>> David
>> Cronenberg should be labelled as director and person.
>> 
>> I know the training process is implemented correctly because I have a
>> custom model file and when all sentences with one of the labels is removed
>> from the model file the other label is detected.
>> 
>> I would preferably be able to continue to use OpenNLP to double label
>> words. Is there a way to do this? If not is this possible with another
>> library such as Stanford CoreNLP.
>> 
>> The code that gets the labels is below:
>> 
>> List<NamedEntity> entities = JCasUtil.selectCovered(
>> NamedEntity.class, aConstituent );
>>   if ( !entities.isEmpty() ) {
>>       // is never more than 1
>>   }
>> 
>> And some sample training data is below (there are hundreds of lines similar
>> to this.)
>> 
>> <START:person> David Cronenberg <END> directed <START:film> Crash
>> <END> .<START:director> David Cronenberg <END> directed <START:film>
>> Scanners <END> .
> 

Reply via email to