Hi Peter, Thanks a lot for the reply.

Let me elaborate more on the changes I have done so far. I have added
KuRuleBasedClassifierAnnotator to the pipeline inorder to fetch Smoking
related keywords from the document. I have
modified KuRuleBasedClassifierAnnotator in such a way that it will iterate
through the identified tokens and if the token matches any smoking related
word which are configured inside a keyword.txt file. The identified tokens
will be then set to SmokerNamedEntityAnnotation and thus can be read from
the output XMI.
Here in my scenario, the sentence I am passing to cTAKES is "Smoking
status: N". As Smoking is configured inside keywords.txt, it will be coming
as the output node in SmokerNamedEntityAnnotation. Its polarity only I am
parsing in my parser logic. Here polarity of SmokerNamedEntityAnnotation
- "Smoking" token is coming as 1 instead of expected -1
(NB: I have removed ":" from the NamedEntityContextAnalizer.java - boundary
words set)

Thanks and Regards,
Sreejith


On Thu, Jul 23, 2020 at 11:20 PM Peter Abramowitsch <pabramowit...@gmail.com>
wrote:

> Check and see if the identified annotation you get for "Smoking status: N"
> without your change is actually "Non Smoker" with polarity 1.
> Nonsmoker is a separate concept, from a Smoker with polarity -1.  Instead
> of looking at range text, check the canonical text for the concept you
> have.
> Having said that, there are many issues with negation in all of the
> negation annotators.  Some are too eager, others are too cautious.
>
> Peter
>
> On Thu, Jul 23, 2020 at 10:17 AM Sreejith Pk <sreji...@gmail.com> wrote:
>
> > Hi Team,
> >
> > We are using cTAKES 4.0.0 as the NLP engine in our application. I have
> > added ContextAnnotator to the pipeline to achieve correct Polarity to the
> > tokens.
> > After analysing the ContextAnnotator code, I understand that negation
> > determining condition is written in NegationFSM class.
> > In my requirement, I have a sentence "Smoking status: N"  and I want to
> set
> > polarity -1 to the token "Smoking" because of the occurrence of "N". To
> > achieve the same, I have tried adding "N" to the existing HashSet
> > in NegationFSM constructor like iv_negVerbsSet.add("N"); But it seems,
> > polarity of the word token "Smoking" is still  coming as 1.
> > With the same configuration set if I pass "Smoking status: denies", I am
> > getting the polarity of token "Smoking" as -1. Kindly help.
> >
> > Thanks & Regards
> > Sreejith
> >
>

Reply via email to