Hi Armin, sorry I mis-read that.
If the descriptor is in the classpath, try AnalysisEngineFactory.createAnalysisEngineDescription(String, Object...) The string is the "package" and the name of the descriptor without ".xml" e.g. AnalysisEngineFactory.createAnalysisEngineDescription("WhitespaceTokenizer") AnalysisEngineFactory.createAnalysisEngineDescription("my.nice.package.WhitespaceTokenizer") if the descriptor is on the file-system, try AnalysisEngineFactory.createAnalysisEngineFromPath(String, Object…) The additional parameters (Object…) are usually left empty, unless you need to override parameters in the descriptor. Regarding mixing TextMarker with your own pipelines, you may want to have a look at the DKPro TextMarker stuff, if only for some inspiration how to do it. [1] -- Richard [1] https://dkpro-core-asl.googlecode.com/svn/de.tudarmstadt.ukp.dkpro.core-asl/trunk/de.tudarmstadt.ukp.dkpro.core.textmarker-asl Am 30.04.2013 um 10:48 schrieb <armin.weg...@bka.bund.de>: > Hi Richard, > > I'm not talking about type system descriptors, but of analysis engine > descriptors. I would like to create an AnalysisEngineDescription from an > analysis engine descriptor file, e. g. like one the Textmarker Workbench > created in a Textmarker Eclipse project. I'd like to add this > AnalysisEngineDescription to AggregateBuilder and run the aggregate with > SimplePipeline.run(). So I can mix Textmarker ae with my own. > > Cheers, > Armin > > > -----Ursprüngliche Nachricht----- > Von: Richard Eckart de Castilho [mailto:richard.eck...@gmail.com] > Gesendet: Montag, 29. April 2013 18:18 > An: user@uima.apache.org > Betreff: Re: uimaFit way of creating an analysis description from an XML > descriptor file > > Hi Armin, > > the equivalent to your code would be something like > > TypeSystemDescriptionFactory.createTypeSystemDescriptionFromPath("/some/path/AnalysisEngineDescriptorFile.xml") > > However, I'd usually prefer to store my type system descriptors as a resource > in my projects, so that they end up in JARs and on the classpath. To import > one type system in another, I use "import by name" instead of "import by > location". > > Type systems accessible via the classpath can be made known to uimaFIT, so > that you don't actually have to load them manually. Many of the uimaFIT > factory methods, like AEF.createPrimitive() exist in a variant that doesn't > take a type system. In these variants, the type system is loaded > automatically by uimaFIT. For details see [1]. > > Hope this helps. > > Cheers, > > -- Richard > > [1] https://code.google.com/p/uimafit/wiki/TypeDescriptorDetection > > > > Am 29.04.2013 um 17:04 schrieb <armin.weg...@bka.bund.de>: > >> Hi! >> >> In classical UIMA you use following code to create an >> AnalysisEngineDescription from an XML descriptor file. >> >> final Path descriptorFilePath = Paths.get("/some/path/", >> "AnalysisEngineDescriptorFile.xml"); >> final XMLInputSource xmlInputSource = new >> XMLInputSource(descriptorFilePath.toFile()); >> final AnalysisEngineDescription analysisEngineDescription = >> UIMAFramework.getXMLParser().parseAnalysisEngineDescription(xmlInputSo >> urce); >> >> Now you can use analysisEngineDescription with >> org.uimafit.factory.AggregateBuilder to create an aggregate analysis engine >> and run the pipeline with SimpePipeline.run(). >> >> How is the uimaFit way to do this? >> >> Cheers, >> >> Armin >> >> > >