@@ -177,21 +177,24 @@ load PbjStarter
177177
178178add PythonRunner Command="-m pip install resources/org/apache/ctakes/timelines/timelines_py" Wait=yes
179179
180- set TimelinesSecondStep=timelines.timelines_pipeline
180+ set TimelinesSecondStep=timelines.timelines_python_pipeline
181181
182182add PythonRunner Command="-m $TimelinesSecondStep -rq JavaToPy -o $OutputDirectory"
183183
184184set minimumSpan=2
185185set exclusionTags=“”
186186
187187// Just the components we need from DefaultFastPipeline
188+
189+ // Write nice big banners when ctakes starts and finishes.
188190set WriteBanner=yes
189191
190192// Load a simple token processing pipeline from another pipeline file
191193load DefaultTokenizerPipeline
192194
193195// Add non-core annotators
194196add ContextDependentTokenizerAnnotator
197+ // Dictionary module requires tokens so needs to be loaded after the tokenization stack
195198load DictionarySubPipe
196199
197200add BackwardsTimeAnnotator classifierJarPath=/org/apache/ctakes/temporal/models/timeannotator/model.jar
@@ -214,7 +217,7 @@ add PythonRunner Command="-m pip install resources/org/apache/ctakes/timelines/t
214217```
215218This sets up the necessary environment variables and installs the relevant Python code as well as its dependencies to the Python environment.
216219```
217- set TimelinesSecondStep=timelines.timelines_pipeline
220+ set TimelinesSecondStep=timelines.timelines_python_pipeline
218221
219222add PythonRunner Command="-m $TimelinesSecondStep -rq JavaToPy -o $OutputDirectory"
220223```
@@ -251,7 +254,7 @@ Sends the CASes which have been processed by the Java annotators to the Python a
251254
252255The core Python logic is in the file:
253256```
254- timelines/instance-generator/src/user/resources/org/apache/ctakes/timelines/timelines_py/src/timelines/timelines_delegator .py
257+ timelines/instance-generator/src/user/resources/org/apache/ctakes/timelines/timelines_py/src/timelines/timelines_annotator .py
255258```
256259Like the Java annotators the Python annotator implements a ` process ` method which is the core driver of the annotator for processing each note's contents. The raw output for the whole cancer type cohort is collected and written to TSV on disk in the ` collection_process_complete ` method.
257260
0 commit comments