You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by "Tommaso Teofili (JIRA)" <ji...@apache.org> on 2010/12/29 18:13:45 UTC

[jira] Resolved: (CLEREZZA-379) Node enhancing should create different node instances for Annotations and Features

     [ https://issues.apache.org/jira/browse/CLEREZZA-379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tommaso Teofili resolved CLEREZZA-379.
--------------------------------------

    Resolution: Fixed

FIxed, though a better instance generation method coubd be thought in the future

> Node enhancing should create different node instances for Annotations and Features
> ----------------------------------------------------------------------------------
>
>                 Key: CLEREZZA-379
>                 URL: https://issues.apache.org/jira/browse/CLEREZZA-379
>             Project: Clerezza
>          Issue Type: Bug
>            Reporter: Tommaso Teofili
>            Assignee: Tommaso Teofili
>
> GraphNodes generated by UIMAUtils.enhanceNode() method don't belong to different instances since their subject is always ENTITY.Annotation and ENTITY.Feautre, this should be changed to permit creation of one node for each annotation and feature extracted by UIMA.
> See wrong serialized output for an example:
> {code}
> <rdf:RDF
>     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>     xmlns:j.0="http://clerezza.apache.org/2010/22/uima-entities#"
>     xmlns:dc="http://purl.org/dc/elements/1.1/"
>     xmlns:j.1="http://purl.org/dc/terms/" > 
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature">
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">champions</j.0:featureValue>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">http://s.opencalais.com/1/type/sys/InstanceInfo</j.0:featureValue>
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.calais.BaseType:calaisType</j.0:featureName>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">5</j.0:featureValue>
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">uima.tcas.Annotation:end</j.0:featureName>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0</j.0:featureValue>
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">uima.tcas.Annotation:begin</j.0:featureName>
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">uima.cas.AnnotationBase:sofa</j.0:featureName>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">99</j.0:featureValue>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">107</j.0:featureValue>
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.alchemy.ts.keywords.KeywordFS:text</j.0:featureName>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">World Cup</j.0:featureValue>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">four-time world cup</j.0:featureValue>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">shock world cup</j.0:featureValue>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">remarkable game</j.0:featureValue>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Slovakia</j.0:featureValue>
>   </rdf:Description>
>   <rdf:Description rdf:about="test">
>     <dc:subject rdf:datatype="http://www.w3.org/2001/XMLSchema#string">gaming</dc:subject>
>     <j.1:language rdf:datatype="http://www.w3.org/2001/XMLSchema#string">english</j.1:language>
>     <j.0:contains rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Annotation"/>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Annotation">
>     <j.0:hasFeature rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Feature"/>
>     <j.0:uimaType rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.calais.Country</j.0:uimaType>
>     <j.0:end rdf:datatype="http://www.w3.org/2001/XMLSchema#int">5</j.0:end>
>     <j.0:begin rdf:datatype="http://www.w3.org/2001/XMLSchema#int">0</j.0:begin>
>     <j.0:begin rdf:datatype="http://www.w3.org/2001/XMLSchema#int">99</j.0:begin>
>     <j.0:end rdf:datatype="http://www.w3.org/2001/XMLSchema#int">107</j.0:end>
>     <j.0:uimaType rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.alchemy.ts.keywords.KeywordFS</j.0:uimaType>
>   </rdf:Description>
> </rdf:RDF>
> {code}
> and see instead a good output:
> {code}
> <rdf:RDF
>     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>     xmlns:j.0="http://clerezza.apache.org/2010/22/uima-entities#"
>     xmlns:dc="http://purl.org/dc/elements/1.1/"
>     xmlns:j.1="http://purl.org/dc/terms/" > 
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature82058324">
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">uima.tcas.Annotation:end</j.0:featureName>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">107</j.0:featureValue>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature76601860">
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">uima.tcas.Annotation:begin</j.0:featureName>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0</j.0:featureValue>
>   </rdf:Description>
>   <rdf:Description rdf:about="test">
>     <j.0:contains rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Annotation23"/>
>     <j.0:contains rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Annotation21"/>
>     <j.0:contains rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Annotation19"/>
>     <j.0:contains rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Annotation17"/>
>     <j.0:contains rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Annotation13"/>
>     <j.1:language rdf:datatype="http://www.w3.org/2001/XMLSchema#string">english</j.1:language>
>     <dc:subject rdf:datatype="http://www.w3.org/2001/XMLSchema#string">gaming</dc:subject>
>     <j.0:contains rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Annotation18"/>
>     <j.0:contains rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Annotation15"/>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Annotation21">
>     <j.0:hasFeature rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Feature79178493"/>
>     <j.0:uimaType rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.alchemy.ts.keywords.KeywordFS</j.0:uimaType>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature115627361">
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">uima.cas.AnnotationBase:sofa</j.0:featureName>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature26072239">
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">coveredText</j.0:featureName>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Italy</j.0:featureValue>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Annotation15">
>     <j.0:uimaType rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.alchemy.ts.keywords.KeywordFS</j.0:uimaType>
>     <j.0:hasFeature rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Feature110849890"/>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Annotation23">
>     <j.0:hasFeature rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Feature72293406"/>
>     <j.0:uimaType rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.alchemy.ts.keywords.KeywordFS</j.0:uimaType>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature110849890">
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.alchemy.ts.keywords.KeywordFS:text</j.0:featureName>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">four-time world cup</j.0:featureValue>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Annotation17">
>     <j.0:uimaType rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.alchemy.ts.keywords.KeywordFS</j.0:uimaType>
>     <j.0:hasFeature rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Feature97808727"/>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature97808727">
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.alchemy.ts.keywords.KeywordFS:text</j.0:featureName>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">shock world cup</j.0:featureValue>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature111841755">
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.calais.BaseType:calaisType</j.0:featureName>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">http://s.opencalais.com/1/type/sys/InstanceInfo</j.0:featureValue>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature55323565">
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">uima.tcas.Annotation:begin</j.0:featureName>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">99</j.0:featureValue>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Annotation13">
>     <j.0:hasFeature rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Feature154857814"/>
>     <j.0:hasFeature rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Feature113619218"/>
>     <j.0:begin rdf:datatype="http://www.w3.org/2001/XMLSchema#int">0</j.0:begin>
>     <j.0:end rdf:datatype="http://www.w3.org/2001/XMLSchema#int">5</j.0:end>
>     <j.0:uimaType rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.calais.Country</j.0:uimaType>
>     <j.0:hasFeature rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Feature115627361"/>
>     <j.0:hasFeature rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Feature76601860"/>
>     <j.0:uimaType rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.alchemy.ts.keywords.KeywordFS</j.0:uimaType>
>     <j.0:hasFeature rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Feature127903719"/>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature18829950">
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Slovakia</j.0:featureValue>
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">coveredText</j.0:featureName>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature113619218">
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">5</j.0:featureValue>
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">uima.tcas.Annotation:end</j.0:featureName>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature87513071">
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">remarkable game</j.0:featureValue>
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.alchemy.ts.keywords.KeywordFS:text</j.0:featureName>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Annotation18">
>     <j.0:uimaType rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.calais.Country</j.0:uimaType>
>     <j.0:end rdf:datatype="http://www.w3.org/2001/XMLSchema#int">107</j.0:end>
>     <j.0:begin rdf:datatype="http://www.w3.org/2001/XMLSchema#int">99</j.0:begin>
>     <j.0:hasFeature rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Feature83508649"/>
>     <j.0:hasFeature rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Feature55323565"/>
>     <j.0:hasFeature rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Feature82058324"/>
>     <j.0:hasFeature rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Feature111841755"/>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature154857814">
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">http://s.opencalais.com/1/type/sys/InstanceInfo</j.0:featureValue>
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.calais.BaseType:calaisType</j.0:featureName>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature79178493">
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Slovakia</j.0:featureValue>
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.alchemy.ts.keywords.KeywordFS:text</j.0:featureName>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature72293406">
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">champions</j.0:featureValue>
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.alchemy.ts.keywords.KeywordFS:text</j.0:featureName>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Annotation19">
>     <j.0:hasFeature rdf:resource="http://clerezza.apache.org/2010/22/uima-entities#Feature87513071"/>
>     <j.0:uimaType rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.alchemy.ts.keywords.KeywordFS</j.0:uimaType>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature127903719">
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">org.apache.uima.alchemy.ts.keywords.KeywordFS:text</j.0:featureName>
>     <j.0:featureValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">World Cup</j.0:featureValue>
>   </rdf:Description>
>   <rdf:Description rdf:about="http://clerezza.apache.org/2010/22/uima-entities#Feature83508649">
>     <j.0:featureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">uima.cas.AnnotationBase:sofa</j.0:featureName>
>   </rdf:Description>
> </rdf:RDF>
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.