uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tong Fin <tong....@gmail.com>
Subject Re: Is there an example of a ResultSpecFile in the SimpleServer?
Date Tue, 03 Mar 2009 16:53:50 GMT
Loren,
If I correctly understand, the main goal of the "Simple" Server is to
provide a RESTful mechanism to "easily consume" the output of UIMA analysis
engines. RDF might not be a "simple" format (in my opinion).

It is a good contribution to have a mapping from UIMA types to RDF and it
will be useful not just for Simple Server.

-- Tong

On Tue, Mar 3, 2009 at 11:19 AM, Loren Cahlander
<loren.cahlander@gmail.com>wrote:

> Tong,
>
> That is correct.  The SimpleServer right now just returns the XML in the
> following form:
>
>
>
>
>
> Does anyone have a ResultSpecFile and classes for returning the results in
> RDF?
>
> Thank you,
>
> Loren Cahlander
>
>
> On Mar 2, 2009, at 10:36 PM, Tong Fin wrote:
>
>  Loren,
>> I am not sure if I understand your problem.
>> Let me try.
>>
>> In your web.xml, you define the DescriptorPath parameter. The value of
>> this
>> parameter will tell the Simple Server how to find the Analysis Engine (in
>> your case, it is an aggregate) to be used as a service.
>> BUT, it is not enough since you need to tell Simple Server how to return
>> the
>> "results" (that is a "mapping" from UIMA types to "your defined types").
>> This returned results are specified in an XML file (conforming to the XML
>> schema defined by Simple Server). In the web.xml, you will need to define
>> the ResultSpecFile parameter. For example:
>>
>>   <init-param>
>>     <param-name>ResultSpecFile</param-name>
>>
>>
>> <param-value>path_to_your_ResultSpec_XML_File_relative_to_your_web_app</param-value>
>>   </init-param>
>>
>> -- Tong
>>
>> On Mon, Mar 2, 2009 at 9:10 PM, Loren Cahlander
>> <loren.cahlander@gmail.com>wrote:
>>
>>  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
>>>> <loren.cahlander@gmail.com>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
>>>>
>>>>
>>>
>>>
>>
>> --
>> Tong
>>
>
>
>


-- 
 Tong

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message