You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ctakes.apache.org by Pei Chen <ch...@apache.org> on 2014/12/13 04:47:05 UTC

Re: Question about running cTakes, urgent!

Yu,
There should be an attribute within any of the IdentifiedAnnotation(or
Subclasses) called polarity.  It's -1 if it's negated.  For example:

   - *polarity* = -1
   - [image: Inline image 1]


On Fri, Dec 12, 2014 at 4:17 PM, Liang, Yu <Yu...@nyumc.org> wrote:

>  Last Question, thanks for your patience.
>
>  Here is the result I run the AggregatePlaintextFastUMLSProcessor.xml by
> using the real medical note. But I cannot find the negation result.
>
>
>  Yu Liang
>
>  CHIBI
>
>
>
>
>
>  On Dec 12, 2014, at 3:59 PM, Pei Chen <ch...@apache.org> wrote:
>
>  Yes, Negation is handled by the new
> <node>PolarityCleartkAnalysisEngine</node>
> Within IdentifiedAnnotation, there should be a polarity() attribute that
> should be populated.
>
> On Fri, Dec 12, 2014 at 3:55 PM, Liang, Yu <Yu...@nyumc.org> wrote:
>
>> Thanks soooooooooo much!! Very Awesome ! I am not like a java person, so
>> kind of totally lost. So I also see there includes NegationAnnotator,
>> right? So don’t have to run NEcontext component?!
>>  Yu Liang
>>
>>  CHIBI
>>
>>
>>
>>
>>
>>   On Dec 12, 2014, at 3:51 PM, Pei Chen <ch...@apache.org> wrote:
>>
>>    Hi Yu,
>> That is correct.  If you take a look at any of the  'Aggregate'
>> examples,
>> it should already have something like this defined in the xml flow:
>> <fixedFlow>
>>  <node>SimpleSegmentAnnotator</node>
>>  <node>SentenceDetectorAnnotator</node>
>>  <node>TokenizerAnnotator</node>
>>  <node>LvgAnnotator</node>
>>  <node>ContextDependentTokenizerAnnotator</node>
>>  <node>POSTagger</node>
>>  <!-- <node>ClearPOSTagger</node> -->
>>  <node>Chunker</node>
>>  <node>AdjustNounPhraseToIncludeFollowingNP</node>
>>  <node>AdjustNounPhraseToIncludeFollowingPPNP</node>
>>  <!-- <node>LookupWindowAnnotator</node> -->
>>  <node>DictionaryLookupAnnotatorDB</node>
>>  <node>DependencyParser</node>
>>  <node>SemanticRoleLabeler</node>
>>  <node>ConstituencyParser</node>
>>  <!-- <node>AssertionAnnotator</node> -->
>>  <!-- <node>StatusAnnotator</node> -->
>>  <!-- <node>NegationAnnotator</node> -->
>>  <node>GenericCleartkAnalysisEngine</node>
>>  <node>HistoryCleartkAnalysisEngine</node>
>>  <node>PolarityCleartkAnalysisEngine</node>
>>  <node>SubjectCleartkAnalysisEngine</node>
>>  <node>UncertaintyCleartkAnalysisEngine</node>
>>  <node>ExtractionPrepAnnotator</node>
>>  </fixedFlow>
>>
>>  You should see the results in your CVD, look for
>> **.IdentifiedAnnotation (Those are the Named Entities + Attributes that
>> have been extracted and normalized to an UMLS CUI.)
>>
>> On Fri, Dec 12, 2014 at 3:45 PM, Liang, Yu <Yu...@nyumc.org> wrote:
>>
>>> Thanks for your quick reply. So I am not quite sure if I understand
>>> correctly, that is , if I ONLY run AggregatePlaintextFastUMLSProcessor.xml,
>>> I don’t need to run the  Segment, Sentence, Tokenizer, Chunker, dictionary
>>> lookup in sequency?
>>> Yu Liang
>>>
>>>  CHIBI
>>>
>>>
>>>
>>>
>>>
>>>  On Dec 12, 2014, at 3:40 PM, Pei Chen <ch...@apache.org> wrote:
>>>
>>>   [+Dev]
>>> Yu,
>>> It's great that you have the AggregatePlaintextFastUMLSProcessor.xml
>>> running.  I presume it's returning IdentifiedAnnotations for you.
>>>
>>>  Long answer:
>>> The error "JCas type xyz is used in Java Code but not declared in XML"
>>> is caused by the fact that the type system is not imported.  Normally, this
>>> could be fixed by adding in your primitive xml descriptor:
>>>  <typeSystemDescription>
>>>   <imports>
>>>  <import name="org.apache.ctakes.typesystem.types.TypeSystem"/>
>>>  </imports>
>>>   </typeSystemDescription>
>>>  But it should be already added in the SimpleSegmentAnnotator which is
>>> part of the Aggregate examples.
>>> The Dictionary lookup annotatorUMLS.xml was not intended to be used by
>>> itself because it requires the other components such as Segment, Sentence,
>>> Tokenizer, Chunker, etc. to work properly[1].
>>>
>>>  [1]
>>> https://cwiki.apache.org/confluence/display/CTAKES/cTAKES+3.2+Component+Use+Guide#cTAKES3.2ComponentUseGuide-ComponentDependencies
>>>
>>>
>>> On Fri, Dec 12, 2014 at 3:26 PM, Liang, Yu <Yu...@nyumc.org> wrote:
>>>
>>>> I do have them, and I add  them into the code where need the
>>>> substitution. Loading is good, no error, and run
>>>> AggregatePlaintextFastUMLSProcessor.xml with no error message.
>>>> But when try to run other AE, like "dictionarylookupannotatorUMS.xml “
>>>> , the error is as in the previous email. Do you have any idea?
>>>> Also, I tried to find the log file to check the detailed error info.
>>>>  it is weird that I click the “view log” from the pull-down menu, it says:
>>>> “no   /Users/yu/uima.log”.
>>>>
>>>>  Yu Liang
>>>>
>>>>  CHIBI
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>  On Dec 12, 2014, at 2:52 PM, Pei Chen <ch...@apache.org> wrote:
>>>>
>>>>  Yu,
>>>> Do you have an UMLS username and password so you can use the UMLS
>>>> resources/dictionaries? (you can request a free one here:
>>>> https://uts.nlm.nih.gov//license.html)
>>>>
>>>>  I would suggest you use the AggregatePlaintextFastUMLSProcessor.xml
>>>>
>>>>
>>>> On Fri, Dec 12, 2014 at 2:48 PM, Liang, Yu <Yu...@nyumc.org> wrote:
>>>>
>>>>>  Hi,
>>>>>
>>>>>  I have a problem when using cTakes, our purpose is to annotate
>>>>> medical notes using cTakes with build in UMLS dictionary. And It is fine to
>>>>> run the AggregatePlaintextProcessor.xml.
>>>>> But when I try to run other analysis engine, always get this similar
>>>>> error messages below. Could you help me out? Appreciate! This is one error
>>>>> message after load and run AE called Dictionary lookup annotatorUMLS.xml.
>>>>> Loading AE is good though.
>>>>> Thanks again! Hope to hearing from you soon. Because I am in urgent to
>>>>> use this and present my results.
>>>>>
>>>>>
>>>>> <Screen Shot 2014-12-12 at 2.45.38 PM.png>
>>>>>  Yu Liang
>>>>>
>>>>>  CHIBI
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>