-
Notifications
You must be signed in to change notification settings - Fork 22
pbj_examples
This example prints every sentence in a Cas. Also prints the begin, end, and part of speech of each sentence.
First Create the instance of a pbj pipeline
pipeline = PBJPipeline()
Add the file that will receive the cas from the Artemis broker. A running pipeline will wait until the receiver gets a cas.
pipeline.reader(PBJReceiver())
Add the file that will make the modifications to the cas you wish (Ask Sean for a cleaner explanation)
pipeline.add(SentencePrinter())
Add the PbjSender to the pipeline instance once you are done adding all other modification files to a cas
pipeline.add(PBJSender())
Start the pipeline.
pipeline.run()
In this example we are looking for specific words that are part of certain types in the cas.
First Create the instance of a pbj pipeline
pipeline = PBJPipeline()
Add the file that will receive the cas from the Artemis broker. A running pipeline will wait until the receiver gets a cas.
pipeline.reader(PBJReceiver())
Add the file that will make the modifications to the cas you wish (Ask Sean for a cleaner explanation)
pipeline.add(WordFinder())
Add the PbjSender to the pipeline instance once you are done adding all other modification files to a cas
pipeline.add(PBJSender())
Start the pipeline.
pipeline.run()
