uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adriano Santos <adriano.n...@gmail.com>
Subject Re: Testing Your Annotator error
Date Wed, 15 Aug 2012 19:19:32 GMT
Tks for your help. But I renamed this class and the error still happen.


On Wed, Aug 15, 2012 at 3:45 PM, Thilo Goetz <twgoetz@gmx.de> wrote:

> On 15.08.2012 18:08, Adriano Santos wrote:
>
>> Hi all,
>>
>> I’m using the getting started page (
>> http://uima.apache.org/d/**uimaj-2.4.0/tutorials_and_**
>> users_guides.html#ugr.tug.aae.**getting_started<http://uima.apache.org/d/uimaj-2.4.0/tutorials_and_users_guides.html#ugr.tug.aae.getting_started>
>> )
>> for create an example.
>>
>> I created type file called “Term”, an annotator file called
>> “TermAnnotator”
>> and a descriptor file called “analyseTermDescriptor”.
>>
>> But when I’m testing my annotator, I receive a ClassNotFoundException -
>> riso.annotator.TermAnnotator.
>>
>
> Maybe because your class is called TermAnnotation, not TermAnnotator?
>
>
>> Thanks
>>
>>
>>
>> P.S: riso is my packet.
>>
>> - I’m using Eclipse.
>>
>>
>> Paths
>>
>>                  *Classes*
>>
>>
>>                                  uimaj-examples / src / riso.annotation
>>
>>                                                 Term_Type.java
>>
>>                                                 Term.java
>>
>>                                                 TermAnnotation.java
>>
>>
>>
>>                  *XML*
>>
>>
>>                                 uimaj-examples / descriptors / riso
>>
>>                                                 analyseTermDescriptor.xml
>>
>>                                                 typeTermDescriptor.xml
>>
>>
>>
>> Values
>>
>> *TermAnnotation*
>>
>>                  *private* Pattern termPattern = Pattern.*compile*(
>> "(^[A-Z]\\s)*"); //*Exemplo* *pra* *pegar* *acronomos* e *nome* *de* *
>> pessoas*
>>
>>
>>
>>         @Override
>>
>>         *public* *void* process(JCas aJCas)
>> *throws***AnalysisEngineProcessException {
>>
>>               // *TODO* Auto-generated method stub
>>
>>
>>
>>               //*Obtem* o *texto* do *documento*
>>
>>               String docText = aJCas.getDocumentText();
>>
>>
>>
>>               //*Obtem* *os* *termos* *marcados*
>>
>>               Matcher matcher = termPattern.matcher(docText);
>>
>>
>>
>>               //*Marca* *os* *termos* *encontrados* no *documento*
>>
>>               *while* (matcher.find()) {
>>
>>
>>                      // found one - create annotation
>>
>>                      RoomNumber annotation = *new* RoomNumber(aJCas);
>>
>>
>>                      annotation.setBegin(matcher.**start());
>>
>>                      annotation.setEnd(matcher.end(**));
>>
>>                      annotation.setBuilding("Term")**;
>>
>>                      annotation.addToIndexes();
>>
>>               }
>>
>>
>>
>>         }
>>
>>
>>
>> analyseTermDescriptor.xml
>>
>>
>>
>>                  <?xml version="1.0" encoding="UTF-8"?>
>>
>> <analysisEngineDescription xmlns="http://uima.apache.org/**
>> resourceSpecifier <http://uima.apache.org/resourceSpecifier>">
>>
>>    <frameworkImplementation>org.**apache.uima.java</**
>> frameworkImplementation>
>>
>>    <primitive>true</primitive>
>>
>>    <annotatorImplementationName>**riso.annotator.TermAnnotator
>> </annotatorImplementationName>
>>
>>    <analysisEngineMetaData>
>>
>>      <name>analyseTermDescriptor</**name>
>>
>>      <description/>
>>
>>      <version>1.0</version>
>>
>>      <vendor>UFCG.RISO</vendor>
>>
>>      <configurationParameters/>
>>
>>      <**configurationParameterSettings**/>
>>
>>      <typeSystemDescription>
>>
>>        <imports>
>>
>>          <import location=
>> "file:/C:/apache-uima/**examples/descriptors/riso/**
>> typeTermDescriptor.xml"/>
>>
>>        </imports>
>>
>>      </typeSystemDescription>
>>
>>      <typePriorities/>
>>
>>      <fsIndexCollection/>
>>
>>      <capabilities>
>>
>>        <capability>
>>
>>          <inputs/>
>>
>>          <outputs>
>>
>>            <type>riso.annotator.Term</**type>
>>
>>            <feature>riso.annotator.Term:**value</feature>
>>
>>          </outputs>
>>
>>          <languagesSupported/>
>>
>>        </capability>
>>
>>      </capabilities>
>>
>>      <operationalProperties>
>>
>>        <modifiesCas>true</**modifiesCas>
>>
>>        <multipleDeploymentAllowed>**true</**multipleDeploymentAllowed>
>>
>>        <outputsNewCASes>false</**outputsNewCASes>
>>
>>      </operationalProperties>
>>
>>    </analysisEngineMetaData>
>>
>>    <resourceManagerConfiguration/**>
>>
>> </analysisEngineDescription>
>>
>>
>>
>> *typeTermDescriptor.xml*
>>
>> <?*xml* version="1.0" encoding="UTF-8"?>
>>
>> <typeSystemDescription *xmlns*="http://uima.apache.**
>> org/resourceSpecifier <http://uima.apache.org/resourceSpecifier>">
>>
>>    <name>typeTermDescriptor</**name>
>>
>>    <description>*Tipo*</**description>
>>
>>
>>    <version>1.0</version>
>>
>>    <vendor>RISO</vendor>
>>
>>    <types>
>>
>>      <typeDescription>
>>
>>        <name>riso.annotator.Term</**name>
>>
>>        <description>Term</**description>
>>
>>        <supertypeName>uima.tcas.**Annotation</supertypeName>
>>
>>        <features>
>>
>>          <featureDescription>
>>
>>            <name>value</name>
>>
>>            <description/>
>>
>>            <rangeTypeName>uima.cas.**String</rangeTypeName>
>>
>>          </featureDescription>
>>
>>        </features>
>>
>>      </typeDescription>
>>
>>    </types>
>>
>> </typeSystemDescription>
>>
>>
>>
>>
>


-- 

Adriano Araújo Santos
***********************************************

*Professor da **Escola Superior de Aviação Civil - ESAC* *
*

*Professor do Curso de Sistemas de Informação - FACISA*
*Professor do Departamento de Computação da UEPB
* *PMI Membership
Mestrando em Ciência da Computação da UFCG*

*Pós-graduando em Gestão Empresarial de Projetos - MBA*

*MSP Lead - Microsoft Student Partner
Lider do Grupo de Usuários.NUG
**Twitter:* @Adriano_Santos

*Site:**https://sites.google.com/site/adrianosantospb*

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