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!
Steve
--
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
--- Bucky Katt, Get Fuzzy