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

Rupert Westenthaler reopened STANBOL-1417:
------------------------------------------

Looks like the EnhancementEngineHelper#getLanguageAnnotations(...) has problems 
with Float values as written by the implementation of this issue.

{code}
org.apache.clerezza.rdf.core.InvalidLiteralTypeException: Cannot create a class 
java.lang.Double from a literal of type 
<http://www.w3.org/2001/XMLSchema#float>
        
org.apache.clerezza.rdf.core.impl.SimpleLiteralFactory$DoubleConverter.createObject(SimpleLiteralFactory.java:239)
        
org.apache.clerezza.rdf.core.impl.SimpleLiteralFactory$DoubleConverter.createObject(SimpleLiteralFactory.java:227)
        
org.apache.clerezza.rdf.core.impl.SimpleLiteralFactory.createObject(SimpleLiteralFactory.java:295)
        
org.apache.stanbol.enhancer.servicesapi.helper.EnhancementEngineHelper.get(EnhancementEngineHelper.java:468)
        
org.apache.stanbol.enhancer.servicesapi.helper.EnhancementEngineHelper.getLanguageAnnotations(EnhancementEngineHelper.java:731)
        
org.apache.stanbol.enhancer.servicesapi.helper.EnhancementEngineHelper.getLanguage(EnhancementEngineHelper.java:775)
        
org.apache.stanbol.enhancer.nlp.utils.NlpEngineHelper.getLanguage(NlpEngineHelper.java:103)

{code}

> Create Language Annotation for parsed "Content-Language" header
> ---------------------------------------------------------------
>
>                 Key: STANBOL-1417
>                 URL: https://issues.apache.org/jira/browse/STANBOL-1417
>             Project: Stanbol
>          Issue Type: Improvement
>          Components: Enhancement Engines
>    Affects Versions: 0.12.0
>            Reporter: Rupert Westenthaler
>            Assignee: Rupert Westenthaler
>            Priority: Minor
>             Fix For: 1.0.0, 0.12.1
>
>
> Stanbol supports parsing the language of the content by using the 
> "Content-Language" header since STANBOL-660. However currently only the 
> `dc:language` property is set for the ContentItem.
> However based on the specification of STANBOL-613 this information is only 
> used as fallback if no language annotation is present in the ContentItem. So 
> as soon as any Language Identification Engine is present in the Chain the 
> "Content-Language" as parsed by the User will get ignored. This is not the 
> intention of a user explicitly parsing the language.
> To force Stanbol to use the parsed language a Language Annotation with the 
> confidence 1.0 needs to be added to the metadata of the ContentItem instead. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to