UimaFit to UIMA AS PEARs

78 views
Skip to first unread message

chuon...@gmail.com

unread,
May 2, 2013, 10:37:41 PM5/2/13
to uimafi...@googlegroups.com
I followed the tutorial for the dkpro, which is heavily reliant on UimaFit, and got a working pipeline.  I now want to convert that pipeline into a PEAR so that it can be deployed to a UIMA AS cluster.  I've figured out that I can call the toXML() to get the XML descriptors for the analysis engines.  How do I convert the CollectionReader and the runpipeline part of the code?  The code is below for reference, and is very similar to the example code for UimaFit.  Thanks

CollectionReader reader = createCollectionReader(TextReader.class,
   
TextReader.PARAM_PATH, "src/test/resources/text",
   
TextReader.PARAM_PATTERNS, new String[] { "[+]*.txt", "[-]broken.txt" },
   
TextReader.PARAM_LANGUAGE, "en");

AnalysisEngine tokenizer = createPrimitive(BreakIteratorSegmenter.class);

AnalysisEngine nameFinder = createPrimitive(DictionaryAnnotator.class,
   
DictionaryAnnotator.PARAM_PHRASE_FILE, "src/test/resources/dictionaries/names.txt",
   
DictionaryAnnotator.PARAM_ANNOTATION_TYPE, Name.class.getName());

AnalysisEngine writer = createPrimitive(CASDumpWriter.class,
   
CASDumpWriter.PARAM_OUTPUT_FILE, "target/output.txt");

SimplePipeline.runPipeline(reader, tokenizer, nameFinder, writer);

Richard Eckart de Castilho

unread,
May 3, 2013, 4:43:45 AM5/3/13
to uimafi...@googlegroups.com, chuon...@gmail.com
Hi,

I think you are not subscribed to this list, so I set you CC.

It has been quite a while that I experimented with UIMA-AS. I committed what I have done so far to the DKPro Lab project. You can have a look at the SimpleComponentTest class [1].

In that experiment, I only started a local UIMA-AS instance, I didn't talk to remote services. It may still illustrate how to pass as CAS to UIMA-AS.

The initializeClient() method in [2] may also he helpful.

Maybe we can find a more convenient way to support uimaFIT-based PEARs and UIMA-AS. E.g. it could be imagined to beef up the uimaFIT Maven Plugin that will come with uimaFIT 2.0.0 with some support for generating aggregate descriptors and packaging PEARs.

Cheers,

-- Richard

[1] http://code.google.com/p/dkpro-lab/source/browse/de.tudarmstadt.ukp.dkpro.lab/de.tudarmstadt.ukp.dkpro.lab.uima.engine.uimaas/src/test/java/de/tudarmstadt/ukp/dkpro/lab/uima/engine/uimaas/SimpleComponentTest.java?name=14aeba50c8c1&r=14aeba50c8c18ea4d14c0d099f43c049f806d9db

[2] http://code.google.com/p/dkpro-lab/source/browse/de.tudarmstadt.ukp.dkpro.lab/de.tudarmstadt.ukp.dkpro.lab.uima.engine.uimaas/src/main/java/de/tudarmstadt/ukp/dkpro/lab/uima/engine/uimaas/UimaAsExecutionEngine.java?name=14aeba50c8c1&r=14aeba50c8c18ea4d14c0d099f43c049f806d9db
Reply all
Reply to author
Forward
0 new messages