You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ctakes.apache.org by Narayan Bhat <bn...@manuhsolutions.com> on 2017/06/05 12:23:46 UTC

Piper file for Drug mention Annotation

Hi

My piper file had the following analysis engines for drug mention
annotation purpose however on executing the piper file through
builder.run() I do not see any annotations related to drug annotation like
medication strength, frequency, frequency modifier types being added to XMI
output.

Is flow control required here like in Aggregate engines?

PiperFile name: UmlsLookupPipeline.piper

Text file content: Administration of Prilosac ( omeprazole ) 20 mg twice
daily for 4 days

Piper file Content:
===========================================
reader org.apache.ctakes.core.cr.FilesInDirectoryCollectionReader
InputDirectory=D:\xxx\cTAKES_docs\Inbound\Medication
add org.apache.ctakes.core.ae.SimpleSegmentAnnotator
//  Sentence Detector
//  Annotates Sentences based upon an OpenNLP model.
add org.apache.ctakes.core.ae.SentenceDetector
//  PTB Tokenizer
//  Annotates Document Penn TreeBank Tokens.
add org.apache.ctakes.core.ae.TokenizerAnnotatorPTB
//  LVG Annotator
//  Adds cononical form of words.
addDescription LvgAnnotator
//  Context Dependent Annotator
//  Finds tokens based upon context.  Time, Date, Roman numeral, Fraction,
Range, Measurement, Person title.
add org.apache.ctakes.contexttokenizer.ae.ContextDependentTokenizerAnnotator
//  Part of Speech Tagger
//  Annotate Parts of Speech.
add org.apache.ctakes.postagger.POSTagger
//  Chunker
//  Annotator that generates chunks of any kind as specified by the chunker
model and the chunk creator.
addDescription Chunker
addDescription adjuster.ChunkAdjuster NP,NP 1
addDescription adjuster.ChunkAdjuster NP,PP,NP 2
set ctakes.umlsuser=bhatnl ctakes.umlspw=Test1234

//  Dictionary Lookup (Default)
//  Annotates clinically-relevant terms.  Terms must match dictionary
entries exactly.
add org.apache.ctakes.dictionary.lookup2.ae.DefaultJCasTermAnnotator

//  Constituency Parser
addDescription ConstituencyParser
//  Drug Mention Annotator
//  Creates modifier annotations needed to handle the drug mentions.
add org.apache.ctakes.drugner.ae.DrugMentionAnnotator
//  XMI Writer
//  Writes XMI files with full representation of input text and all
extracted information.
#   OutputDirectory  Output directory to write xmi files
add org.apache.ctakes.core.cc.XmiWriterCasConsumerCtakes
OutputDirectory=D:\xxx\cTAKES_docs\Outbound\xmi

===========================================================

-- 
Thanks and Regards
Narayan L Bhat
+91 9740237967