On Wed, Feb 27, 2008 at 12:32 AM, Steven Bethard <[EMAIL PROTECTED]> wrote: > Steven Bethard wrote: > > Is it possible to create ResourceSpecifier objects without an XML > > descriptor file? > > > On Sun, Feb 24, 2008 at 9:17 PM, Marshall Schor <[EMAIL PROTECTED]> wrote: > > I think so. > > > > Here's a good sources to "mine" for code that does this: > > > > 1) In the source code for Apache UIMA, in the project uimaj-core, there > > is a section under src/test/java containing test cases. Many of these > > test cases do what you're wanting to do. If you are using Eclipse, you > > can highlight/select the src/test/java folder, and then use the menu > > Search -> File and put in ResourceSpecifier, and search in *.java in > > "selected resources" - I got 145 matches... and see some examples. > > > > Look (for instance) in AnalysisEngineDescription_implTest. > > Worked like a charm. Using the appropriate _impl classes, I was able > to write exactly the kind of utility functions I was hoping for, > e.g.:: > > AnalysisEngine relevanceReader = Util.getAnalysisEngine( > RelevanceReader.class, > Util.getTypeSystem(Document.class, RelevantDomain.class), > RelevanceReader.PARAM_ANNOTATIONS_PATH, annotationsPath); > > Thanks! >
MAy you post this useful (at least for me) factory method? I'm going to do the same thing in the next few days. Thanks in advance, Roberto -- Roberto Franchini CELI s.r.l. (http://www.celi.it) - C.so Moncalieri 21 - 10131 Torino - ITALY Tel +39-011-6600814 - Fax +39-011-6600687 jabber:[EMAIL PROTECTED] skype:ro.franchini
