Tong,

I am using the DescriptorPath parameter in the web.xml file:

    <servlet>
        <servlet-name>simple-server-test</servlet-name>
        <servlet-class>
            org.apache.uima.simpleserver.servlet.SimpleServerServlet
        </servlet-class>
        <!-- Define the path to the tokenizer pear file -->
        <init-param>
            <param-name>DescriptorPath</param-name>
            <param-value>
                WEB-INF/resources/descriptors/test.xml
            </param-value>
        </init-param>
    </servlet>

Where test.xml is an aggregate

<?xml version="1.0" encoding="UTF-8"?>
<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier ">
<frameworkImplementation>org.apache.uima.java</frameworkImplementation>
<primitive>false</primitive>
<delegateAnalysisEngineSpecifiers>
<delegateAnalysisEngine key="WhitespaceTokenizer">
<import location="WhitespaceTokenizer.xml"/>
</delegateAnalysisEngine>
<delegateAnalysisEngine key="HmmTagger">
<import location="HmmTagger.xml"/>
</delegateAnalysisEngine>
</delegateAnalysisEngineSpecifiers>
<analysisEngineMetaData>
<name>test</name>
<description></description>
<version>1.0</version>
<vendor></vendor>
<configurationParameters/>
<configurationParameterSettings/>
<flowConstraints>
<fixedFlow>
<node>WhitespaceTokenizer</node>
<node>HmmTagger</node>
</fixedFlow>
</flowConstraints>
<typePriorities/>
<fsIndexCollection/>
<capabilities>
<capability>
<inputs/>
<outputs/>
<languagesSupported/>
</capability>
</capabilities>
<operationalProperties>
<modifiesCas>true</modifiesCas>
<multipleDeploymentAllowed>true</multipleDeploymentAllowed>
<outputsNewCASes>false</outputsNewCASes>
</operationalProperties>
</analysisEngineMetaData>
<resourceManagerConfiguration/>
</analysisEngineDescription>


Loren Cahlander



On Mar 2, 2009, at 07:47 PM, Tong Fin wrote:

Loren,
In the UIMA Simple Server User Guide
documentation<http://incubator.apache.org/uima/downloads/sandbox/simple-server/simpleServerUserGuide.html#d0e134 >, there is a description on how to use the "WhitespaceTokenizer" (also in the
sandbox) as a simple service.

You can find the example of web.inf and ResultSpecFile for
"WhitespaceTokenizer" in the following directory of the Simple Server
project:
  SimpleServer/src/main/resources/samples

-- Tong

On Mon, Mar 2, 2009 at 8:15 PM, Loren Cahlander
<[email protected]>wrote:

I am looking for an example of a ResultSpecFile entry for the SimpleServer
in the Sandbox?  Does anyone have an example?

org.apache.uima.simpleserver.servlet.SimpleServerServlet.initServer()

  String resultSpecParamValue = getInitParameter("ResultSpecFile");
  if (resultSpecParamValue != null) {
    resultSpec = new File(this.baseWebappDirectory.getAbsoluteFile(),
resultSpecParamValue);
  }


Thank you,

Loren Cahlander




--
Tong

Reply via email to