Loren Cahlander | 3 Mar 02:15
Picon
Gravatar

Is there an example of a ResultSpecFile in the SimpleServer?

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 Fin | 3 Mar 02:47
Picon

Re: Is there an example of a ResultSpecFile in the SimpleServer?

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@...>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,
>
(Continue reading)

Loren Cahlander | 3 Mar 03:10
Picon
Gravatar

Re: Is there an example of a ResultSpecFile in the SimpleServer?

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">
(Continue reading)

Tong Fin | 3 Mar 05:36
Picon

Re: Is there an example of a ResultSpecFile in the SimpleServer?

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@...>wrote:

> Tong,
>
> I am using the DescriptorPath parameter in the web.xml file:
>
>    <servlet>
>        <servlet-name>simple-server-test</servlet-name>
(Continue reading)

Thilo Goetz | 3 Mar 11:48
Picon
Picon

Re: analyzing semi- or un-structured documentation

Hi Maciej,

it's possible with UIMA, but I don't know of any off-the-shelf
components for you.  One of the issues is that the documentation
will be different for each product/domain.  So you will often
have to adapt the rules how you associate documentation snippets
with schema elements.  I do not know of any generic solution to
this problem.

--Thilo

Maciej Gawinecki wrote:
> Hello,
> 
> Documentation (for databases and different types of data) very often is
> given in non-structured (PDF, RTF) or semi-structurated form (HTML with
> tables). For instance I've seen HTML documentation about XML schema
> instances, where the table describing element name and its definition is
> given in form of some HTML table.
> 
> I would like to be able to get from the documentation a fragment
> relating to the particular schema element.
> 
> Is it possible with UIMA?
> 
> If so, can you provide me with some off-the-shelf examples?
> 
> Thank you,
> Maciej

(Continue reading)

Tommaso Teofili | 3 Mar 15:40
Picon
Gravatar

Entities

Hello everybody,
I am annotating a document text and I have now a lot of annotations.
Many of that annotations refer to the same "entity", as described in the
UIMA Overview & SDK Setup (
http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/overview_and_setup/overview_and_setup.html#ugr.ovv.conceptual.metadata_in_cas).
I expected to have a predefined Entity type in UIMA but i cannot find it;
moreover also defining it by myself I can't find an appropriate range type
for the "occurencies" feature to store the annotations related to that
entity, as stated in the tutorial.
Any suggestions?
Thanks in advance,
Tommaso
Loren Cahlander | 3 Mar 17:19
Picon
Gravatar

Re: Is there an example of a ResultSpecFile in the SimpleServer?

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").
(Continue reading)

Marshall Schor | 3 Mar 17:31

Re: Entities

There is no predefined Entity type in base UIMA; you will need to define
your own "entity" type.  Suppose it is called "EntityInstance", is a
subtype of Annotation, and includes a field called "id", which is some
unique ID for this entity (perhaps a String type).  Then, you can have
an annotator that runs at the end of your pipeline of annotators which
detects instances of entities (I'm assuming you have multiple annotators
that do this, of course).  This last annotator could get an iteration
index over all things of the "EntityInstance" type, and use a standard
Java hashmap to associate entity unique IDs with Java ArrayLists of
their "instances".  Then, you could make one new Feature Structure, say
of type "Entity", which could have features "uniqueID" and "instances",
and set the "instances" to a FeatureStructure Array of EntityInstances.

HTH. -Marshall

Tommaso Teofili wrote:
> Hello everybody,
> I am annotating a document text and I have now a lot of annotations.
> Many of that annotations refer to the same "entity", as described in the
> UIMA Overview & SDK Setup (
> http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/overview_and_setup/overview_and_setup.html#ugr.ovv.conceptual.metadata_in_cas).
> I expected to have a predefined Entity type in UIMA but i cannot find it;
> moreover also defining it by myself I can't find an appropriate range type
> for the "occurencies" feature to store the annotations related to that
> entity, as stated in the tutorial.
> Any suggestions?
> Thanks in advance,
> Tommaso
>
>   
(Continue reading)

Tong Fin | 3 Mar 17:53
Picon

Re: Is there an example of a ResultSpecFile in the SimpleServer?

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@...>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
>
>
(Continue reading)

Tommaso Teofili | 4 Mar 12:21
Picon
Gravatar

Re: Entities

Ok, thanks. Done, it works now.
I think this could be an interesting predefined feature, as this usage is
mentioned in the documentation too.
What do you think about it?

2009/3/3 Marshall Schor <msa@...>

> There is no predefined Entity type in base UIMA; you will need to define
> your own "entity" type.  Suppose it is called "EntityInstance", is a
> subtype of Annotation, and includes a field called "id", which is some
> unique ID for this entity (perhaps a String type).  Then, you can have
> an annotator that runs at the end of your pipeline of annotators which
> detects instances of entities (I'm assuming you have multiple annotators
> that do this, of course).  This last annotator could get an iteration
> index over all things of the "EntityInstance" type, and use a standard
> Java hashmap to associate entity unique IDs with Java ArrayLists of
> their "instances".  Then, you could make one new Feature Structure, say
> of type "Entity", which could have features "uniqueID" and "instances",
> and set the "instances" to a FeatureStructure Array of EntityInstances.
>
> HTH. -Marshall
>
> Tommaso Teofili wrote:
> > Hello everybody,
> > I am annotating a document text and I have now a lot of annotations.
> > Many of that annotations refer to the same "entity", as described in the
> > UIMA Overview & SDK Setup (
> >
> http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/overview_and_setup/overview_and_setup.html#ugr.ovv.conceptual.metadata_in_cas
> ).
(Continue reading)


Gmane