You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by rw...@apache.org on 2012/09/27 15:20:21 UTC

svn commit: r1390997 - in /stanbol/branches/stanbol-nlp-processing/enhancer: engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/ engines/nlp2rdf/src/main/java/org/apache/stanbol/enhancer/engines/nlp2rdf/engine/ engines/opennlp-chunker/...

Author: rwesten
Date: Thu Sep 27 13:20:20 2012
New Revision: 1390997

URL: http://svn.apache.org/viewvc?rev=1390997&view=rev
Log:
STANBOL-734: Tried to simplyfy the packages in the stanbol.enhancer.nlp module; Added morphological annotations (Case, Tense); Added more Java Doc based on the comments of the OLIA ontology;  STANBOL-737: Sentiment now uses a simple double value, remove the Sentiment enumeration as it only contained POSITIVE and NEGATIVE;

Added:
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/tag/
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/tag/Tag.java
      - copied, changed from r1388320, stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/Tag.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/tag/TagSet.java
      - copied, changed from r1388320, stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/TagSet.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Case.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Definitness.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Gender.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/MorphoFeatures.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Number.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Tense.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/nif/
      - copied from r1388320, stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/ontology/
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/LexicalCategory.java
Removed:
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/Tag.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/TagSet.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/ontology/
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/sentiment/
Modified:
    stanbol/branches/stanbol-nlp-processing/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/PosTagSetRegistry.java
    stanbol/branches/stanbol-nlp-processing/enhancer/engines/nlp2rdf/src/main/java/org/apache/stanbol/enhancer/engines/nlp2rdf/engine/Nlp2RdfMetadataEngine.java
    stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-chunker/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/chunker/model/PhraseTagSetRegistry.java
    stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-chunker/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/chunker/services/ChunkingEngine.java
    stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-pos/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/pos/model/PosTagSetRegistry.java
    stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-pos/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/pos/services/POSTaggingEngine.java
    stanbol/branches/stanbol-nlp-processing/enhancer/engines/sentiment-wordclassifier/src/main/java/org/apache/stanbol/enhancer/engines/sentiment/services/SentimentEngine.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/pom.xml
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/NlpAnnotations.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/nif/SsoOntology.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/nif/StringOntology.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/phrase/PhraseTag.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/PosTag.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/olia/English.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/olia/German.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/olia/Spanish.java
    stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/utils/NIFHelper.java

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/PosTagSetRegistry.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/PosTagSetRegistry.java?rev=1390997&r1=1390996&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/PosTagSetRegistry.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/engines/celi/src/main/java/org/apache/stanbol/enhancer/engines/celi/PosTagSetRegistry.java Thu Sep 27 13:20:20 2012
@@ -4,7 +4,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.stanbol.enhancer.engines.celi.lemmatizer.impl.CeliLemmatizerEnhancementEngine;
-import org.apache.stanbol.enhancer.nlp.TagSet;
+import org.apache.stanbol.enhancer.nlp.model.tag.TagSet;
 import org.apache.stanbol.enhancer.nlp.pos.LexicalCategory;
 import org.apache.stanbol.enhancer.nlp.pos.PosTag;
 import org.apache.stanbol.enhancer.nlp.pos.olia.English;

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/engines/nlp2rdf/src/main/java/org/apache/stanbol/enhancer/engines/nlp2rdf/engine/Nlp2RdfMetadataEngine.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/engines/nlp2rdf/src/main/java/org/apache/stanbol/enhancer/engines/nlp2rdf/engine/Nlp2RdfMetadataEngine.java?rev=1390997&r1=1390996&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/engines/nlp2rdf/src/main/java/org/apache/stanbol/enhancer/engines/nlp2rdf/engine/Nlp2RdfMetadataEngine.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/engines/nlp2rdf/src/main/java/org/apache/stanbol/enhancer/engines/nlp2rdf/engine/Nlp2RdfMetadataEngine.java Thu Sep 27 13:20:20 2012
@@ -30,12 +30,11 @@ import org.apache.stanbol.enhancer.nlp.m
 import org.apache.stanbol.enhancer.nlp.model.Token;
 import org.apache.stanbol.enhancer.nlp.model.annotation.Annotated;
 import org.apache.stanbol.enhancer.nlp.model.annotation.Value;
-import org.apache.stanbol.enhancer.nlp.ontology.SsoOntology;
-import org.apache.stanbol.enhancer.nlp.ontology.StringOntology;
+import org.apache.stanbol.enhancer.nlp.nif.SsoOntology;
+import org.apache.stanbol.enhancer.nlp.nif.StringOntology;
 import org.apache.stanbol.enhancer.nlp.phrase.PhraseTag;
 import org.apache.stanbol.enhancer.nlp.pos.LexicalCategory;
 import org.apache.stanbol.enhancer.nlp.pos.PosTag;
-import org.apache.stanbol.enhancer.nlp.sentiment.SentimentTag;
 import org.apache.stanbol.enhancer.nlp.utils.NIFHelper;
 import org.apache.stanbol.enhancer.nlp.utils.NlpEngineHelper;
 import org.apache.stanbol.enhancer.servicesapi.ContentItem;
@@ -162,14 +161,10 @@ public class Nlp2RdfMetadataEngine exten
                 writePhrase(metadata, span, current);
                 //OlIA does not include Sentiments
                 
-                Value<SentimentTag> sentiment = span.getAnnotation(NlpAnnotations.SENTIMENT_ANNOTATION);
-                if(sentiment != null){
-                    double sentimentVal = sentiment.probability();
-                    if(sentiment.value().isNegative()) {
-                        sentimentVal = sentimentVal * -1;
-                    }
+                Value<Double> sentiment = span.getAnnotation(NlpAnnotations.SENTIMENT_ANNOTATION);
+                if(sentiment != null && sentiment.value() != null){
                     metadata.add(new TripleImpl(current, SENTIMENT_PROPERTY, 
-                        lf.createTypedLiteral(sentimentVal)));
+                        lf.createTypedLiteral(sentiment.value())));
                 }
             }
         } finally {

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-chunker/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/chunker/model/PhraseTagSetRegistry.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-chunker/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/chunker/model/PhraseTagSetRegistry.java?rev=1390997&r1=1390996&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-chunker/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/chunker/model/PhraseTagSetRegistry.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-chunker/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/chunker/model/PhraseTagSetRegistry.java Thu Sep 27 13:20:20 2012
@@ -5,7 +5,7 @@ import java.util.Map;
 
 import opennlp.tools.chunker.Chunker;
 
-import org.apache.stanbol.enhancer.nlp.TagSet;
+import org.apache.stanbol.enhancer.nlp.model.tag.TagSet;
 import org.apache.stanbol.enhancer.nlp.phrase.PhraseTag;
 import org.apache.stanbol.enhancer.nlp.pos.LexicalCategory;
 

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-chunker/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/chunker/services/ChunkingEngine.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-chunker/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/chunker/services/ChunkingEngine.java?rev=1390997&r1=1390996&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-chunker/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/chunker/services/ChunkingEngine.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-chunker/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/chunker/services/ChunkingEngine.java Thu Sep 27 13:20:20 2012
@@ -49,7 +49,6 @@ import org.apache.felix.scr.annotations.
 import org.apache.stanbol.commons.opennlp.OpenNLP;
 import org.apache.stanbol.enhancer.engines.opennlp.chunker.model.PhraseTagSetRegistry;
 import org.apache.stanbol.enhancer.nlp.NlpAnnotations;
-import org.apache.stanbol.enhancer.nlp.TagSet;
 import org.apache.stanbol.enhancer.nlp.model.AnalysedText;
 import org.apache.stanbol.enhancer.nlp.model.AnalysedTextUtils;
 import org.apache.stanbol.enhancer.nlp.model.Chunk;
@@ -58,6 +57,7 @@ import org.apache.stanbol.enhancer.nlp.m
 import org.apache.stanbol.enhancer.nlp.model.Token;
 import org.apache.stanbol.enhancer.nlp.model.Span.SpanTypeEnum;
 import org.apache.stanbol.enhancer.nlp.model.annotation.Value;
+import org.apache.stanbol.enhancer.nlp.model.tag.TagSet;
 import org.apache.stanbol.enhancer.nlp.phrase.PhraseTag;
 import org.apache.stanbol.enhancer.nlp.pos.PosTag;
 import org.apache.stanbol.enhancer.nlp.utils.LanguageConfiguration;

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-pos/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/pos/model/PosTagSetRegistry.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-pos/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/pos/model/PosTagSetRegistry.java?rev=1390997&r1=1390996&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-pos/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/pos/model/PosTagSetRegistry.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-pos/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/pos/model/PosTagSetRegistry.java Thu Sep 27 13:20:20 2012
@@ -4,7 +4,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.stanbol.commons.opennlp.PosTagsCollectionEnum;
-import org.apache.stanbol.enhancer.nlp.TagSet;
+import org.apache.stanbol.enhancer.nlp.model.tag.TagSet;
 import org.apache.stanbol.enhancer.nlp.pos.LexicalCategory;
 import org.apache.stanbol.enhancer.nlp.pos.PosTag;
 import org.apache.stanbol.enhancer.nlp.pos.olia.English;

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-pos/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/pos/services/POSTaggingEngine.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-pos/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/pos/services/POSTaggingEngine.java?rev=1390997&r1=1390996&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-pos/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/pos/services/POSTaggingEngine.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/engines/opennlp-pos/src/main/java/org/apache/stanbol/enhancer/engines/opennlp/pos/services/POSTaggingEngine.java Thu Sep 27 13:20:20 2012
@@ -56,7 +56,6 @@ import org.apache.felix.scr.annotations.
 import org.apache.stanbol.commons.opennlp.OpenNLP;
 import org.apache.stanbol.enhancer.engines.opennlp.pos.model.PosTagSetRegistry;
 import org.apache.stanbol.enhancer.nlp.NlpAnnotations;
-import org.apache.stanbol.enhancer.nlp.TagSet;
 import org.apache.stanbol.enhancer.nlp.model.AnalysedText;
 import org.apache.stanbol.enhancer.nlp.model.AnalysedTextFactory;
 import org.apache.stanbol.enhancer.nlp.model.AnalysedTextUtils;
@@ -66,6 +65,7 @@ import org.apache.stanbol.enhancer.nlp.m
 import org.apache.stanbol.enhancer.nlp.model.Span.SpanTypeEnum;
 import org.apache.stanbol.enhancer.nlp.model.Token;
 import org.apache.stanbol.enhancer.nlp.model.annotation.Value;
+import org.apache.stanbol.enhancer.nlp.model.tag.TagSet;
 import org.apache.stanbol.enhancer.nlp.pos.PosTag;
 import org.apache.stanbol.enhancer.nlp.utils.LanguageConfiguration;
 import org.apache.stanbol.enhancer.nlp.utils.NlpEngineHelper;

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/engines/sentiment-wordclassifier/src/main/java/org/apache/stanbol/enhancer/engines/sentiment/services/SentimentEngine.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/engines/sentiment-wordclassifier/src/main/java/org/apache/stanbol/enhancer/engines/sentiment/services/SentimentEngine.java?rev=1390997&r1=1390996&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/engines/sentiment-wordclassifier/src/main/java/org/apache/stanbol/enhancer/engines/sentiment/services/SentimentEngine.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/engines/sentiment-wordclassifier/src/main/java/org/apache/stanbol/enhancer/engines/sentiment/services/SentimentEngine.java Thu Sep 27 13:20:20 2012
@@ -45,7 +45,6 @@ import org.apache.stanbol.enhancer.nlp.m
 import org.apache.stanbol.enhancer.nlp.model.annotation.Value;
 import org.apache.stanbol.enhancer.nlp.pos.LexicalCategory;
 import org.apache.stanbol.enhancer.nlp.pos.PosTag;
-import org.apache.stanbol.enhancer.nlp.sentiment.SentimentTag;
 import org.apache.stanbol.enhancer.nlp.utils.LanguageConfiguration;
 import org.apache.stanbol.enhancer.nlp.utils.NlpEngineHelper;
 import org.apache.stanbol.enhancer.servicesapi.ContentItem;
@@ -280,10 +279,7 @@ public class SentimentEngine  extends Ab
             if(process){
                 double sentiment = classifier.classifyWord(token.getSpan());
                 if(sentiment != 0.0){
-                    token.addAnnotation(SENTIMENT_ANNOTATION, 
-                        new Value<SentimentTag>(sentiment > 0 ? 
-                                SentimentTag.POSITIVE : SentimentTag.NEGATIVE,
-                                Math.abs(sentiment)));
+                    token.addAnnotation(SENTIMENT_ANNOTATION, new Value<Double>(sentiment));
                 } //else do not set sentiments with 0.0
             }
         }

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/pom.xml
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/pom.xml?rev=1390997&r1=1390996&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/pom.xml (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/pom.xml Thu Sep 27 13:20:20 2012
@@ -54,10 +54,12 @@
               org.apache.stanbol.enhancer.nlp;version=${project.version},
               org.apache.stanbol.enhancer.nlp.model;version=${project.version},
               org.apache.stanbol.enhancer.nlp.model.annotation;version=${project.version},
-              org.apache.stanbol.enhancer.nlp.ontology;version=${project.version},
+              org.apache.stanbol.enhancer.nlp.model.tag;version=${project.version},
+              org.apache.stanbol.enhancer.nlp.nif;version=${project.version},
               org.apache.stanbol.enhancer.nlp.pos;version=${project.version},
               org.apache.stanbol.enhancer.nlp.pos.*;version=${project.version},
               org.apache.stanbol.enhancer.nlp.phrase;version=${project.version},
+              org.apache.stanbol.enhancer.nlp.morpho;version=${project.version},
               org.apache.stanbol.enhancer.nlp.sentiment;version=${project.version},
               org.apache.stanbol.enhancer.nlp.utils;version=${project.version}
             </Export-Package>

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/NlpAnnotations.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/NlpAnnotations.java?rev=1390997&r1=1390996&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/NlpAnnotations.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/NlpAnnotations.java Thu Sep 27 13:20:20 2012
@@ -4,9 +4,9 @@ import org.apache.stanbol.enhancer.nlp.m
 import org.apache.stanbol.enhancer.nlp.model.Chunk;
 import org.apache.stanbol.enhancer.nlp.model.Token;
 import org.apache.stanbol.enhancer.nlp.model.annotation.Annotation;
+import org.apache.stanbol.enhancer.nlp.morpho.MorphoFeatures;
 import org.apache.stanbol.enhancer.nlp.phrase.PhraseTag;
 import org.apache.stanbol.enhancer.nlp.pos.PosTag;
-import org.apache.stanbol.enhancer.nlp.sentiment.SentimentTag;
 
 /**
  * Defines the {@link Annotation} constants typically used by NLP components
@@ -33,14 +33,18 @@ public interface NlpAnnotations {
      * The Sentiment {@link Annotation} added by a sentiment tagger typically
      * to single {@link Token}s that do carry a positive or negative sentiment.
      */
-    Annotation<String,SentimentTag> SENTIMENT_ANNOTATION = new Annotation<String,SentimentTag>(
-            "stanbol.enhancer.nlp.sentiment", SentimentTag.class);
+    Annotation<String,Double> SENTIMENT_ANNOTATION = new Annotation<String,Double>(
+            "stanbol.enhancer.nlp.sentiment", Double.class);
     /**
-     * The Lemma {@link Annotation} for a word. Typically used for
-     * {@link Token}s. The value is the {@link String} representing the
-     * Lemma of the Word
+     * {@link Annotation} representing the Morphological analysis of a word. 
+     * Typically used on {@link Token}s.<p>
+     * The {@link MorphoFeatures} defines at least the Lemma and [1..*] POS tags.
+     * NOTE that the POS tag information does not assign a Tag to the {@link Token},
+     * but rather specifies that if the Token is classified by a {@link #POS_ANNOTATION}
+     * to be of one of the Tags the definitions of this {@link MorphoFeatures} can
+     * be applied.
      */
-    Annotation<String,String> LEMMA_ANNOTATION = new Annotation<String,String>(
-            "stanbol.enhancer.nlp.lemma",String.class);
+    Annotation<String,MorphoFeatures> MORPHO_ANNOTATION = new Annotation<String,MorphoFeatures>(
+            "stanbol.enhancer.nlp.MORPHO",MorphoFeatures.class);
     
 }

Copied: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/tag/Tag.java (from r1388320, stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/Tag.java)
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/tag/Tag.java?p2=stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/tag/Tag.java&p1=stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/Tag.java&r1=1388320&r2=1390997&rev=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/Tag.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/tag/Tag.java Thu Sep 27 13:20:20 2012
@@ -1,4 +1,4 @@
-package org.apache.stanbol.enhancer.nlp;
+package org.apache.stanbol.enhancer.nlp.model.tag;
 
 import org.apache.stanbol.enhancer.nlp.pos.PosTag;
 

Copied: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/tag/TagSet.java (from r1388320, stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/TagSet.java)
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/tag/TagSet.java?p2=stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/tag/TagSet.java&p1=stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/TagSet.java&r1=1388320&r2=1390997&rev=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/TagSet.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/tag/TagSet.java Thu Sep 27 13:20:20 2012
@@ -1,4 +1,4 @@
-package org.apache.stanbol.enhancer.nlp;
+package org.apache.stanbol.enhancer.nlp.model.tag;
 
 import java.util.Arrays;
 import java.util.Collections;

Added: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Case.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Case.java?rev=1390997&view=auto
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Case.java (added)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Case.java Thu Sep 27 13:20:20 2012
@@ -0,0 +1,479 @@
+package org.apache.stanbol.enhancer.nlp.morpho;
+
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.Set;
+
+import org.apache.clerezza.rdf.core.UriRef;
+
+/**
+ * Defines verb tenses as defined by the <a href="">OLIA</a> Ontology.
+ * <p>
+ * The hierarchy is represented by this enumeration. The {@link Set} of parent concepts is accessible via the
+ * {@link #getParent()} and {@link #getTenses()}.
+ */
+public enum Case {
+    /**
+     * AbessiveCase expresses the lack or absence of the referent of the noun it marks. It has the meaning of
+     * the English preposition 'without' (Pei and Gaynor 1954: 3,35; Gove, et al. 1966: 3).
+     * (http://purl.org/linguistics/gold/Abessive)
+     */
+    Abessive,
+    /**
+     * Case used to indicate locative or instrumental function. (http://www.isocat.org/datcat/DC-1224)
+     * 
+     * AblativeCase expresses that the referent of the noun it marks is the location from which another
+     * referent is moving. It has the meaning 'from'. (http://purl.org/linguistics/gold/Ablative)
+     */
+    Ablative,
+    /**
+     * Absolutive case marks the first argument of an intransitive verb and the second argument of a
+     * transitive verb in ergative-absolutive languages.
+     * (http://languagelink.let.uu.nl/tds/onto/LinguisticOntology.owl#absolutiveCase)
+     */
+    Absolutive,
+    /**
+     * In nominative-accusative languages, accusative case marks certain syntactic functions, usually direct
+     * objects. (http://www.sil.org/linguistics/glossaryoflinguisticterms/WhatIsAccusativeCase.htm 17.11.06)
+     */
+    Accusative("Accusative"),
+    /**
+     * AdessiveCase expresses that the referent of the noun it marks is the location near/at which another
+     * referent exists. It has the meaning of 'at' or 'near' (Crystal 1997: 8).
+     * (http://purl.org/linguistics/gold/Adessive)
+     */
+    Adessive,
+    /**
+     * Case expressing "to" in Basque studies. (http://www.isocat.org/datcat/DC-1229)
+     */
+    Aditive,
+    /**
+     * AllativeCase expresses motion to or toward the referent of the noun it marks (Pei and Gaynor 1954:
+     * 6,9,216; Lyons 1968: 299; Crystal 1985: 1213; Gove, et al. 1966: 55,2359).
+     * (http://purl.org/linguistics/gold/Allative)
+     */
+    Allative,
+    /**
+     * BenefactiveCase expresses that the referent of the noun it marks receives the benefit of the situation
+     * expressed by the clause (Crystal 1980: 43; Gove, et al. 1966: 203).
+     * (http://purl.org/linguistics/gold/Benefactive)
+     */
+    Benefactive,
+    /**
+     * Case which expresses that the referent of the noun it marks is the cause of the situation expressed by
+     * the clause. (http://www.isocat.org/datcat/DC-1253)
+     */
+    Causative,
+    /**
+     * ComitativeCase expresses accompaniment. It carries the meaning 'with' or 'accompanied by' (Anderson,
+     * Stephen 1985: 186; Pei and Gaynor 1954: 42;Dixon, R. 1972: 12; Gove, et al. 1966: 455).
+     * (http://purl.org/linguistics/gold/Comitative)
+     */
+    Comitative,
+    /**
+     * ContablativeCase expresses that the referent of the noun it marks is the location from near which
+     * another referent is moving. It has the meaning 'from near'.
+     * (http://purl.org/linguistics/gold/Contablative)
+     */
+    Contablative,
+    /**
+     * ContallativeCase expresses that something is moving toward the vicinity of the referent of the noun it
+     * marks. It has the meaning 'towards the vicinity of'. (http://purl.org/linguistics/gold/Contallative)
+     */
+    Contallative,
+    /**
+     * ConterminativeCase expresses the notion of something moving into the vicinity of the referent of the
+     * noun it marks, but not through that region. It has the meaning 'moving into the vicinity of'.
+     * (http://purl.org/linguistics/gold/Conterminative)
+     */
+    Conterminative,
+    /**
+     * ContlativeCase expresses that the referent of the noun it marks is the location in the vicinity of
+     * which another referent is moving. It has the meaning 'in the vicinity of'.
+     * (http://purl.org/linguistics/gold/Contlative)
+     */
+    Contlative,
+    /**
+     * Dative case marks indirect objects (for languages in which they are held to exist), or nouns having the
+     * role of a recipient (as of things given), a beneficiary of an action, or a possessor of an item.
+     * (http://www.sil.org/linguistics/glossaryoflinguisticterms/WhatIsDativeCase.htm 17.11.06)
+     */
+    Dative,
+    /**
+     * DelativeCase expresses motion downward from the referent of the noun it marks (Pei and Gaynor 1954: 53;
+     * Gove, et al. 1966: 595). (http://purl.org/linguistics/gold/Delative)
+     */
+    Delative,
+    /**
+     * In the Romanian case system the value 'direct' conflates 'nominative' and 'accusative', e.g.,
+     * -acea/acel, -aceasta/acesta, -această/acest (http://purl.org/olia/mte/multext-east.owl#DirectCase)
+     */
+    Direct,
+    /**
+     * The distributive case is used on nouns for the meanings of per or each, e.g., Hungarian egyenként/egy,
+     * hetenként/hét, ilyenként/ily, kéthetenként/kéthét, rekordonként/rekord, tömbönként/tömb,
+     * vércsoportonként/vércsoport
+     * 
+     * In Hungarian it is -nként and expresses the manner when something happens to each member of a set one
+     * by one (e.g., fejenként "per head", esetenként "in some case"), or the frequency in time (hetenként
+     * "once a week", tízpercenként "every ten minutes"). In the Finnish language, this adverb type is rare,
+     * even rarer in the singular. Its ending is -ttain/-ttäin. The basic meaning is "separately for each".
+     * For example, maa ("country") becomes maittain for an expression like Laki ratifioidaan maittain
+     * ("The law is ratified separately in each country"). It can be used to distribute the action to frequent
+     * points in time, e.g., päivä (day) has the plural distributive päivittäin (each day). It can mean also
+     * "in (or with) regard to the (cultural) perspective" when combined with a word referring to an
+     * inhabitant (-lais-). Frequently Finns (suomalaiset) say that suomalaisittain tuntuu oudolta, että, or
+     * "in the Finnish perspective, it feels strange that".
+     * (http://purl.org/olia/mte/multext-east.owl#DistributiveCase,
+     * http://en.wikipedia.org/wiki/Distributive_case)
+     */
+    Distributive,
+    /**
+     * ElativeCase expresses that the referent of the noun it marks is the location out of which another
+     * referent is moving. It has the meaning 'out of' (Lyons 1968: 299; Pei and Gaynor 1954: 64; Crystal
+     * 1985: 106; Gove, et al. 1966: 730). (http://purl.org/linguistics/gold/Elative)
+     */
+    Elative,
+    /**
+     * Case that expresses likeness or identity to the referent of the noun it marks. It can have meaning,
+     * such as: 'as', 'like', or 'in the capacity of'. (http://www.isocat.org/datcat/DC-1279)
+     */
+    Equative,
+    /**
+     * In ergative-absolutive languages, the ergative case identifies the subject of a transitive verb. In
+     * such languages, the ergative case is typically marked (most salient), while the absolutive case is
+     * unmarked. (http://languagelink.let.uu.nl/tds/onto/LinguisticOntology.owl#ergativeCase with reference to
+     * http://en.wikipedia.org/wiki/Ergative_case).
+     */
+    Ergative,
+    /**
+     * EssiveCase expresses that the referent of the noun it marks is the location at which another referent
+     * exists (Lyons 1968: 299,301; Gove, et al. 1966: 778; Crystal 1985: 112; Blake 1994: 154-5).
+     * (http://purl.org/linguistics/gold/Essive)
+     */
+    Essive,
+    /**
+     * The Hungarian
+     * "formativus, or essivus-formalis `-ként' ... usually expresses a position, task and manner of the person or the thing."
+     * (Nose 2003), e.g., Hungarian 'katonaként' -> [serves] as a soldier. (Csaba Oravecz, email 2010/06/15)<br/>
+     * <br/>
+     * 
+     * "Haspelmath & Buchholz (1998:321) explained the function of the essive case as ``role phrases''. Role phrases represent the role of the function in which a participant appears. They regard the role phrases as adverbial."
+     * (Nose 2003, p. 117)<br/>
+     * 
+     * In the Hungarian language this case combines the Essive case and the Formal case, and it can express
+     * the position, task, state (e.g. "as a tourist"), or the manner (e.g. "like a hunted animal"). The
+     * status of the suffix -ként in the declension system is disputed for several reasons. First, in general,
+     * Hungarian case suffixes are absolute word-final, while -ként permits further suffixation by the
+     * locative suffix -i. Second, most Hungarian case endings participate in vowel harmony, while -ként does
+     * not. For these reasons, many modern analyses of the Hungarian case system, starting with László Antal's
+     * "A magyar esetrendszer" (1961) do not consider the essive/formal to be a case.
+     * (http://en.wikipedia.org/wiki/Essive-formal_case)<br/>
+     * 
+     * cf. Masahiko Nose (2003), Adverbial Usage of the Hungarian Essive Case
+     */
+    EssiveFormal,
+    /**
+     * case category of the Hungarian MULTEXT-East scheme, e.g., amilyenné/amilyen, azzá/az, erőddé/erő,
+     * jelmezeivé/jelmez, jelükké/jel, kevéssé/kevés, Kissé/Kiss, legjelentéktelenebbekké/jelentéktelen (hu)
+     * (http://purl.org/olia/mte/multext-east.owl#FactiveCase)
+     */
+    Factive,
+    /**
+     * In Hungarian, `essive-formal' is in some descriptions simply called `formal', with the affix
+     * _-képp(en)_ and meaning (`in the form of ...', they probably meant when they came up with the term). In
+     * the Hungarian MULTEXT-East scheme, essive-formal and formal are distinguished. (Ivan A. Derzhanski,
+     * email 2010/06/15, http://purl.org/olia/mte/multext-east.owl#FormalCase)
+     */
+    Formal,
+    /**
+     * Genitive case signals that the referent of the marked noun is the possessor of the referent of another
+     * noun, e.g. "the man's foot". In some languages, genitive case may express an associative relation
+     * between the marked noun and another noun.
+     * (http://www.sil.org/linguistics/glossaryoflinguisticterms/WhatIsGenitiveCase.htm 17.11.06)
+     */
+    Genitive,
+    /**
+     * IllativeCase expresses that the referent of the noun it marks is the location into which another
+     * referent is moving. It has the meaning 'into' (Lyons 1968: 299; Gove, et al. 1966: 1126; Crystal 1985:
+     * 152). (http://purl.org/linguistics/gold/Illative)
+     */
+    Illative,
+    /**
+     * InablativeCase expresses that the referent of the noun it marks is the location from within which
+     * another referent is moving. It has the meaning 'from within'.
+     * (http://purl.org/linguistics/gold/Inablative)
+     */
+    Inablative,
+    /**
+     * InallativeCase expresses that something is moving toward the region that is inside the referent of the
+     * noun it marks. It has the meaning 'towards in(side)'. (http://purl.org/linguistics/gold/Inallative)
+     */
+    Inallative,
+    /**
+     * InessiveCase expresses that the referent of the noun it marks is the location within which another
+     * referent exists. It has the meaning of 'within' or 'inside' (Lyons 1968: 299; Gove, et al. 1966: 1156;
+     * Crystal 1985: 156). X in Y. (http://purl.org/linguistics/gold/Inessive)
+     */
+    Inessive,
+    /**
+     * InstrumentalCase indicates that the referent of the noun it marks is the means of the accomplishment of
+     * the action expressed by the clause (http://purl.org/linguistics/gold/Instrumental)
+     */
+    nstrumental,
+    /**
+     * InterablativeCase expresses that the referent of the noun it marks is the location from between which
+     * another referent is moving. It has the meaning 'from inbetween'.
+     * (http://purl.org/linguistics/gold/Interablative)
+     */
+    Interablative,
+    /**
+     * InterallativeCase expresses that something is moving toward the region that is in the middle of the
+     * referent of the noun it marks. It has the meaning 'towards the middle of'.
+     * (http://purl.org/linguistics/gold/Interallative)
+     */
+    Interallative,
+    /**
+     * InteressiveCase expresses that the referent of the noun it marks is the location between which another
+     * referent exists. It has the meaning of 'between'. (http://purl.org/linguistics/gold/Interessive)
+     */
+    Interessive,
+    /**
+     * InterlativeCase expresses that the referent of the noun it marks is the location between which another
+     * referent is moving. It has the meaning 'to the middle of'.
+     * (http://purl.org/linguistics/gold/Interlative)
+     */
+    Interlative,
+    /**
+     * 'into in(side of)'. (http://purl.org/linguistics/gold/Interminative)
+     */
+    Interminative,
+    /**
+     * InterterminativeCase expresses the notion of something moving into the middle of the referent of the
+     * noun it marks, but not through it. It has the meaning 'into the middle of'.
+     * (http://purl.org/linguistics/gold/Interminative)
+     */
+    Interterminative,
+    /**
+     * IntertranslativeCase expresses the notion of something moving along a trajectory between the referent
+     * of the noun it marks. It has the meaning 'along the in between.
+     * (http://purl.org/linguistics/gold/Intertranslative)
+     */
+    Intertranslative,
+    /**
+     * IntranslativeCase expresses the notion of something moving through the referent of the noun it marks.
+     * It has the meaning 'along through'. (http://purl.org/linguistics/gold/Intranslative)
+     */
+    Intranslative,
+    /**
+     * LativeCase expresses 'motion up to the location of,' or 'as far as' the referent of the noun it marks
+     * (Pei and Gaynor 1954: 121; Gove, et al. 1966: 1277). (http://purl.org/linguistics/gold/Lative)
+     */
+    Lative,
+    /**
+     * Category of case that denotes that the referent of the noun it marks is a location.
+     * (http://purl.org/linguistics/gold/Locational)
+     */
+    Locational,
+    /**
+     * Case that indicates a final location of action or a time of the action.
+     * (http://www.isocat.org/datcat/DC-1326)
+     */
+    Locative,
+    /**
+     * Opposite of BenefactiveCase; used when the marked noun is negatively affected in the clause.
+     * (http://purl.org/linguistics/gold/Malefactive)
+     */
+    Malefactive,
+    /**
+     * The multiplicative case is a grammatical case used for marking a number of something ("three times").
+     * The case is found in the Hungarian language, for example nyolc (eight), nyolcszor (eight times). The
+     * case appears also in Finnish as an adverbial (adverb-forming) case. Used with a cardinal number it
+     * denotes the number of actions; for example, viisi (five) -> viidesti (five times). Used with adjectives
+     * it refers to the mean of the action, corresponding the English suffix -ly: kaunis (beautiful) ->
+     * kauniisti (beautifully). It is also used with a small number of nouns: leikki (play) -> leikisti (just
+     * kidding, not really). In addition, it acts as an intensifier when used with a swearword: piru ->
+     * pirusti. (http://en.wikipedia.org/wiki/Multiplicative_case)
+     */
+    Multiplicative,
+    /**
+     * In nominative-accusative languages, nominative case marks clausal subjects and is applies to nouns in
+     * isolation. (http://www.sil.org/linguistics/glossaryoflinguisticterms/WhatIsNominativeCase.htm 17.11.06)
+     */
+    Nominative("Nominative"),
+    /**
+     * Case that is used when a noun is the object of a verb or a proposition, except for nominative and
+     * vocative case. (http://www.isocat.org/datcat/DC-1336)
+     */
+    Oblique,
+    /**
+     * The partitive case is a grammatical case which denotes "partialness", "without result", or
+     * "without specific identity".
+     * (http://languagelink.let.uu.nl/tds/onto/LinguisticOntology.owl#partitiveCase with reference to
+     * http://en.wikipedia.org/wiki/Partitive)
+     * 
+     * PartitiveCase expresses the partial nature of the referent of the noun it marks, as opposed to
+     * expressing the whole unit or class of which the referent is a part. This case may be found in items
+     * such as the following: existential clauses, nouns that are accompanied by numerals or units of measure,
+     * or predications of material from which something is made. It often has a meaning similar to the English
+     * word 'some' (Pei and Gaynor 1954: 161; Richards, Platt, and Weber 1985: 208; Quirk, et al. 1985: 249;
+     * Gove, et al. 1966: 1648; Sebeok 1946: 1214). (http://purl.org/linguistics/gold/Partitive)
+     */
+    Partitive,
+    /**
+     * PerlativeCase expresses that something moved 'through','across', or 'along' the referent of the noun
+     * that is marked (Blake 1998: 38, 203). (http://purl.org/linguistics/gold/Perlative)
+     */
+    Perlative,
+    /**
+     * PossessedCase is used to mark the noun whose referent is possessed by the referent of another noun.
+     * (http://purl.org/linguistics/gold/Possessed)
+     */
+    Possessed,
+    /**
+     * In many grammars, the term "prepositional case" is to refer to case marking that only occurs in
+     * combination with prepositions. Normally, this is an oblique case, e.g., the Russian 6th case, also
+     * referred to as "locative". (Ch. Chiarcos)
+     */
+    Prepositional,
+    /**
+     * Case for a noun or a pronoun that expresses motion within a place or a period of time needed for an
+     * event. (http://www.isocat.org/datcat/DC-1368)
+     */
+    Prolative,
+    /**
+     * Proprietive case marks a possessional relation, i.e. 'having' something.
+     * (http://languagelink.let.uu.nl/tds/onto/LinguisticOntology.owl#proprietiveCase-grammatical)
+     */
+    Proprietive,
+    /**
+     * Purposive marks the goal of an activity, e.g., 'going out FOR (i.e. to catch) KANGAROOS'; 'call them
+     * FOR (i.e. to eat) FOOD'. The common purposive suffix -gu is a recurrent suffix on verbs ... The
+     * purposive case suffix is often used on a nominalised clause (and this may possibly be the origin of the
+     * verbal purposive). (Dixon 2002, p.134, on purposive case in [several] Australian languages)
+     * 
+     * R.M.W. Dixon (2002), Australian Languages. CUP, Cambridge
+     */
+    Purposive,
+    /**
+     * Case related to the person in whose company the action is carried out, or to any belongings of people
+     * which take part in the action. (http://www.isocat.org/datcat/DC-1388)
+     */
+    Sociative,
+    /**
+     * SubablativeCase expresses that the referent of the noun it marks is the location from under which
+     * another referent is moving. It has the meaning 'from under'.
+     * (http://purl.org/linguistics/gold/Subablative)
+     */
+    Subablative,
+    /**
+     * SuballativeCase expresses that something is moving toward the region that is under the referent of the
+     * noun it marks. It has the meaning 'towards the region that is under'.
+     * (http://purl.org/linguistics/gold/Suballative)
+     */
+    Suballative,
+    /**
+     * SubessiveCase expresses that the referent of the noun it marks is the location under which another
+     * referent exists. It has the meaning of 'under' or 'beneath'.
+     * (http://purl.org/linguistics/gold/Subessive)
+     */
+    Subessive,
+    /**
+     * SublativeCase expresses that the referent of the noun it marks is the location under which another
+     * referent is moving toward. It has the meaning 'towards the underneath of'.
+     * (http://purl.org/linguistics/gold/Sublative)
+     */
+    Sublative,
+    /**
+     * SubterminativeCase expresses the notion of something moving into the region under the referent of the
+     * noun it marks, but not through that region. It has the meaning 'into the region under'.
+     * (http://purl.org/linguistics/gold/Subterminative)
+     */
+    Subterminative,
+    /**
+     * SubtranslativeCase expresses the notion of something moving along a trajectory underneath the referent
+     * of the noun it marks. It has the meaning 'along the region underneath'. Unfortunate name clash with
+     * 'Superlative' as a feature of adjectives. (http://purl.org/linguistics/gold/Subtranslative)
+     */
+    Subtranslative,
+    /**
+     * Superablative expresses that the referent of the noun it marks is the location from over which another
+     * referent is moving. It has the meaning 'from over'. (http://purl.org/linguistics/gold/Superablative)
+     */
+    Superablative,
+    /**
+     * SuperallativeCase expresses that something is moving toward the region that is above the referent of
+     * the noun it marks. It has the meaning 'towards the region that is over'.
+     * (http://purl.org/linguistics/gold/Superallative)
+     */
+    Superallative,
+    /**
+     * SuperessiveCase expresses that the referent of the noun it marks is the location on which another
+     * referent exists. It has the meaning of 'on' or 'upon'. (Pei and Gaynor 1954: 207, Gove, et al. 1966:
+     * 2293). (http://purl.org/linguistics/gold/Superessive)
+     */
+    Superessive,
+    /**
+     * SuperlativeCase expresses that the referent of the noun it marks is the location onto which another
+     * referent is moving. It has the meaning of 'onto'. Unfortunate name clash with 'Superlative' as a
+     * property of adjectives. (http://purl.org/linguistics/gold/Superlative)
+     */
+    Superlative,
+    /**
+     * SuperterminativeCase expresses the notion of something moving into the region over the referent of the
+     * noun it marks, but not through that region. It has the meaning 'into the region over'.
+     * (http://purl.org/linguistics/gold/Superterminative)
+     */
+    Superterminative,
+    /**
+     * SupertranslativeCase expresses the notion of something moving along a trajectory above the referent of
+     * the noun it marks. It has the meaning 'along the region over'.
+     * (http://purl.org/linguistics/gold/Supertranslative)
+     */
+    Supertranslative,
+    /**
+     * The so-called Temporalis Case is formed in Hungarian with -kor. Expresses a point of time or a period.
+     * (http://member.melbpc.org.au/~tmajlath/form-suffix.html)
+     */
+    Temporalis,
+    /**
+     * Case that indicates to what or where something ends. (http://www.isocat.org/datcat/DC-1401)
+     * 
+     * TerminativeCase expresses the notion of something into but not further than (ie, not through) the
+     * referent of the noun it marks. It has the meaning 'into but not through'.
+     * (http://purl.org/linguistics/gold/TerminativeCase)
+     */
+    Terminative,
+    /**
+     * TranslativeCase expresses that the referent of the noun, or the quality of the adjective, that it marks
+     * is the result of a process of change (Lyons 1968: 299301, Gove, et al. 1966: 813,2429, Sebeok 1946: 17,
+     * Hakulinen 1961: 70). X along, across Y. (http://purl.org/linguistics/gold/Translative)
+     */
+    Translative,
+    /**
+     * Vocative case marks a noun whose referent is being addressed.
+     * (http://www.sil.org/linguistics/glossaryoflinguisticterms/WhatIsVocativeCase.htm 17.11.06)
+     */
+    Vocative,
+
+    ;
+    static final String OLIA_NAMESPACE = "http://purl.org/olia/olia.owl#";
+    UriRef uri;
+
+    Case() {
+        this(null);
+    }
+
+    Case(String name) {
+        uri = new UriRef(OLIA_NAMESPACE + (name == null ? name() : (name + "Case")));
+    }
+
+    public UriRef getUri() {
+        return uri;
+    }
+
+    @Override
+    public String toString() {
+        return uri.getUnicodeString();
+    }
+}

Added: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Definitness.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Definitness.java?rev=1390997&view=auto
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Definitness.java (added)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Definitness.java Thu Sep 27 13:20:20 2012
@@ -0,0 +1,39 @@
+package org.apache.stanbol.enhancer.nlp.morpho;
+
+import org.apache.clerezza.rdf.core.UriRef;
+
+public enum Definitness {
+    /**
+     * Value referring to the capacity of identification of an entity. (http://www.isocat.org/datcat/DC-2004)
+     * <p>
+     * An entity is specified as definite when it refers to a particularized individual of the species denoted
+     * by the noun. (http://languagelink.let.uu.nl/tds/onto/LinguisticOntology.owl#definite)
+     * <p>
+     * Definite noun phrases are used to refer to entities which are specific and identifiable in a given
+     * context. (http://en.wikipedia.org/wiki/Definiteness 20.11.06)
+     */
+    Definite,
+    /**
+     * An entity is specified as indefinite when it refers to a non-particularized individual of the species
+     * denoted by the noun. (http://languagelink.let.uu.nl/tds/onto/LinguisticOntology.owl#indefinite)
+     * <p>
+     * Indefinite noun phrases are used to refer to entities which are not specific and identifiable in a
+     * given context. (http://en.wikipedia.org/wiki/Definiteness 20.11.06)
+     */
+    Indefinite;
+    static final String OLIA_NAMESPACE = "http://purl.org/olia/olia.owl#";
+    UriRef uri;
+
+    Definitness() {
+        uri = new UriRef(OLIA_NAMESPACE + name());
+    }
+
+    public UriRef getUri() {
+        return uri;
+    }
+
+    @Override
+    public String toString() {
+        return uri.getUnicodeString();
+    }
+}

Added: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Gender.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Gender.java?rev=1390997&view=auto
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Gender.java (added)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Gender.java Thu Sep 27 13:20:20 2012
@@ -0,0 +1,66 @@
+package org.apache.stanbol.enhancer.nlp.morpho;
+
+import org.apache.clerezza.rdf.core.UriRef;
+
+/**
+ * Enumeration representing the different genders of words based on the <a
+ * href="http://purl.org/olia/olia.owl">OLIA</a> Ontology
+ * 
+ */
+public enum Gender {
+    /**
+     * One of the two grammatical genders, or classes of nouns, the other being inanimate. Membership in the
+     * animate grammatical class is largely based on meanings, in that living things, including humans,
+     * animals, spirits, trees, and most plants are included in the animate class of nouns
+     */
+    Animate("AnimateGender"),
+    /**
+     * Common is an optional attribute for nouns in EAGLES. The Common gender contrasts with Neuter in a
+     * two-gender system e.g. Danish, Dutch. This value is also used for articles, pronouns and determiners
+     * especially for Danish.
+     */
+    Common("CommonGender"),
+    /**
+     * Feminine gender is a grammatical gender that marks nouns, articles, pronouns, etc. that have human or
+     * animal female referents, and often marks nouns that have referents that do not carry distinctions of
+     * sex.
+     */
+    Feminine,
+    /**
+     * One of the two grammatical genders, or noun classes, of Nishnaabemwin, the other being animate.
+     * Membership in the inanimate grammatical class is largely based on meaning, in that non-living things,
+     * such as objects of manufacture and natural 'non-living' things are included in it
+     */
+    Inanimate("InanimateGender"),
+    /**
+     * Masculine gender is a grammatical gender that marks nouns, articles, pronouns, etc. having human or
+     * animal male referents, and often marks nouns having referents that do not have distinctions of sex.
+     */
+    Masculine,
+    /**
+     * Neuter gender is a grammatical gender that includes those nouns, articles, pronouns, etc. having
+     * referents which do not have distinctions of sex, and often includes some which do have a natural sex
+     * distinction.
+     */
+    Neuter;
+    static final String OLIA_NAMESPACE = "http://purl.org/olia/olia.owl#";
+    UriRef uri;
+
+    Gender() {
+        this(null);
+    }
+
+    Gender(String name) {
+        uri = new UriRef(OLIA_NAMESPACE + (name == null ? name() : name));
+    }
+
+    public UriRef getUri() {
+        return uri;
+    }
+
+    @Override
+    public String toString() {
+        return uri.getUnicodeString();
+    }
+
+}

Added: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/MorphoFeatures.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/MorphoFeatures.java?rev=1390997&view=auto
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/MorphoFeatures.java (added)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/MorphoFeatures.java Thu Sep 27 13:20:20 2012
@@ -0,0 +1,193 @@
+package org.apache.stanbol.enhancer.nlp.morpho;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.stanbol.enhancer.nlp.model.Token;
+import org.apache.stanbol.enhancer.nlp.model.annotation.Annotation;
+import org.apache.stanbol.enhancer.nlp.pos.LexicalCategory;
+import org.apache.stanbol.enhancer.nlp.pos.PosTag;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Represents a morphological interpretation of a {@link Token word}. 
+ * Words might have different interpretations (typically depending on the POS)
+ * so this Tag allows to add information about all possible interpretations
+ * to a single word. 
+ * This is needed if no POS information are present or if POS tags are
+ * ambiguous or of low confidence.<p>
+ * <b>TODO</b>s:<ul>
+ * <li> I would like to have {@link Case}, {@link Tense}, ... 
+ * as own Annotations. However AFAIK those are all grouped to a
+ * single interpretation of the Token (driven by the POS tag).</li>
+ * <li> Maybe add a possibility to add unmapped information as
+ * <code>Map&lt;String,List&lt;String&gt;&gt;</code>
+ * </ul>
+ * @author Rupert Westenthaler
+ *
+ */
+public class MorphoFeatures {
+    
+    private static final Logger log = LoggerFactory.getLogger(MorphoFeatures.class);
+
+    /**
+     * 
+     */
+    private final Collection<PosTag> posTags;
+    private final Set<String> posStrings;
+    private final Set<LexicalCategory> posLc;
+    private final String lemma;
+    
+    private Gender gender;
+    
+    private Number number;
+    
+    private Case caseFeature;
+    
+    private Tense tense;
+    
+    private Definitness definitness;
+
+    public MorphoFeatures(String lemma, PosTag...posTags) {
+        if(lemma == null){
+            throw new IllegalArgumentException("The parsed lemma MUST NOT be NULL!");
+        }
+        if(posTags == null || posTags.length == 0){
+            throw new IllegalArgumentException("The parsed POS tag(s) MUST NOT be NULL nor empty!");
+        }
+        this.lemma = lemma;
+        Set<PosTag> tagSet = new HashSet<PosTag>(Arrays.asList(posTags));
+        if(tagSet.remove(null) && tagSet.isEmpty()){
+            throw new IllegalArgumentException("The parsed POS tag(s) MUST NOT contain only NULL values!");
+        }
+        this.posTags = Collections.unmodifiableSet(tagSet);
+        //init fast lookup for category and string
+        this.posStrings = new HashSet<String>(posTags.length);
+        this.posLc = EnumSet.noneOf(LexicalCategory.class);
+        for(PosTag pos : tagSet){
+            this.posStrings.add(pos.getTag());
+            if(pos.getCategory() != null){
+                this.posLc.add(pos.getCategory());
+            }
+        }
+    }
+    
+    /**
+     * Checks if the parsed {@link LexicalCategory} is present
+     * for this Lemma.<p>
+     * This method will only work if the POS tag set used by
+     * the Lemmatizer is mapped to lexical categories.
+     */
+    public final boolean isLexicalCategory(LexicalCategory lc){
+        return posLc.contains(lc);
+    }
+
+    /**
+     * Checks if the parsed POS tag is present for this Lemma<p>
+     * NOTE that this method will only work if the POS tag set
+     * used by the POS tagger is the same of as of the 
+     * Lemmatizer.
+     * @param tag the tag
+     * @return if the parsed POS tag is valid for this Lemma
+     */
+    public final boolean isPosTag(String tag){
+        return posStrings.contains(tag);
+    }
+    public final Collection<PosTag> getPosTags(){
+        return posTags;
+    }
+    
+    public final Gender getGender() {
+        return gender;
+    }
+    
+    public final void setGender(Gender gender) {
+        this.gender = gender;
+    }
+
+    public final Number getNumber() {
+        return number;
+    }
+    
+    public final void setNumber(Number number) {
+        this.number = number;
+    }
+    
+    public final String getLemma() {
+        return lemma;
+    }
+    public final Definitness getDefinitness() {
+        return definitness;
+    }
+    public final void setDefinitness(Definitness definitness) {
+        this.definitness = definitness;
+    }
+    public void setTense(Tense tense) {
+        this.tense = tense;
+    }
+    public Tense getTense() {
+        return tense;
+    }
+    public final void setCase(Case caseFeature) {
+        this.caseFeature = caseFeature;
+    }
+    public final Case getCase() {
+        return caseFeature;
+    }
+    
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder("MorphoTag(");
+        sb.append(lemma);
+        sb.append("|pos:").append(posStrings);
+        if(gender != null){
+            sb.append("|gender:").append(gender);
+        }
+        if(caseFeature != null){
+            sb.append("|case:").append(caseFeature);
+        }
+        if(tense != null){
+            sb.append("|tense:").append(tense);
+        }
+        if(number != null){
+            sb.append("|number:").append(number);
+        }
+        if(definitness != null){
+            sb.append("|definitness:").append(definitness);
+        }
+        sb.append(')');
+        return sb.toString();
+    }
+    @Override
+    public int hashCode() {
+        return lemma.hashCode()+posStrings.hashCode();
+    }
+    
+    @Override
+    public boolean equals(Object o) {
+        if(o instanceof MorphoFeatures && lemma.equals(((MorphoFeatures)o).lemma) &&
+            posStrings.equals(((MorphoFeatures)o).posStrings)){
+            MorphoFeatures lt = (MorphoFeatures)o;
+            return ((gender != null && gender.equals(lt.gender)) ||
+                    (gender == null && lt.gender == null)) &&
+                   ((caseFeature != null && caseFeature.equals(lt.caseFeature)) ||
+                    (caseFeature == null && lt.caseFeature == null)) &&
+                   ((tense != null && tense.equals(lt.tense)) ||
+                    (tense == null && lt.tense == null)) &&
+                   ((number != null && number.equals(lt.number)) ||
+                    (number == null && lt.number == null)) &&
+                   ((definitness != null && definitness.equals(lt.definitness)) ||
+                    (definitness == null && lt.definitness == null));
+        } else {
+            return false;
+        }
+    }
+}

Added: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Number.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Number.java?rev=1390997&view=auto
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Number.java (added)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Number.java Thu Sep 27 13:20:20 2012
@@ -0,0 +1,57 @@
+package org.apache.stanbol.enhancer.nlp.morpho;
+
+import org.apache.clerezza.rdf.core.UriRef;
+
+public enum Number {
+    /**
+     * MULTEXT-East feature Number="count" (Nouns in Serbian, Macedonian, Bulgarian), e.g., Bulgarian яка/як,
+     * язовира/язовир, яда/яд, юргана/юрган, юбилея/юбилей, ъгъла/ъгъл
+     */
+    CountNumber,
+    /**
+     * Plural is a grammatical number, typically referring to more than one of the referent in the real world.
+     * In English, nouns, pronouns, and demonstratives inflect for plurality. In many other languages, for
+     * example German and the various Romance languages, articles and adjectives also inflect for plurality.
+     */
+    Plural,
+    /**
+     * Singular is a grammatical number denoting a unit quantity (as opposed to the plural and other forms).
+     */
+    Singular,
+    /**
+     * A collective number is a number referring to 'a set of things'. Languages that have this feature can
+     * use it to get a phrase like 'flock of sheeps' by using 'sheep' in collective number.
+     */
+    Collective,
+    /**
+     * Form used in some languages to designate two persons or things.
+     */
+    Dual,
+    /**
+     * Number that specifies 'a few' things.
+     */
+    Paucal,
+    /**
+     * Property related to four elements.
+     */
+    Quadrial,
+    /**
+     * Grammatical number referring to 'three things', as opposed to 'singular' and 'plural'.
+     */
+    Trial;
+    static final String OLIA_NAMESPACE = "http://purl.org/olia/olia.owl#";
+    UriRef uri;
+
+    Number() {
+        uri = new UriRef(OLIA_NAMESPACE + name());
+    }
+
+    public UriRef getUri() {
+        return uri;
+    }
+
+    @Override
+    public String toString() {
+        return uri.getUnicodeString();
+    }
+}

Added: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Tense.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Tense.java?rev=1390997&view=auto
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Tense.java (added)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/morpho/Tense.java Thu Sep 27 13:20:20 2012
@@ -0,0 +1,112 @@
+package org.apache.stanbol.enhancer.nlp.morpho;
+
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.Set;
+
+import org.apache.clerezza.rdf.core.UriRef;
+/**
+ * Defines verb tenses as defined by the
+ * <a href="">OLIA</a> Ontology.<p>
+ * The hierarchy is represented by this enumeration.
+ * The {@link Set} of parent concepts is accessible via
+ * the {@link #getParent()} and {@link #getTenses()}.
+ */
+public enum Tense {
+    NotAnchored("NotTemporallyAnchored"),
+    Absolute("AbsoluteTense"),
+    CloseFuture(Absolute),
+    Future(Absolute),
+    HodiernalFuture(Future),
+    ImmediateFuture(Future),
+    NearFuture(Future),
+    PostHodiernalFuture(Future),
+    RemoteFuture(Future),
+    SimpleFuture(Future),
+    Past(Absolute),
+    HesternalPast(Past),
+    HodiernalPast(Past),
+    ImmediatePast(Past),
+    RecentPast(Past),
+    RemotePast(Past),
+    SimplePast(Past),
+    StillPast(Past),
+    Imperfect(StillPast),
+    Aorist(Past),
+    Perfect(Absolute),
+    PreHodiernalPast(Absolute),
+    Present(Absolute),
+    Transgressive(Present),
+    AbsoluteRelative("AbsoluteRelativeTense"),
+    FutureInFuture(AbsoluteRelative),
+    FutureInPast(AbsoluteRelative),
+    PastPerfect("PastPerfectTense",AbsoluteRelative),
+    PastInFuture(AbsoluteRelative),
+    PluperfectTense(AbsoluteRelative),
+    Relative("RelativeTense"),
+    FuturePerfect(Relative),
+    RelativePast(Relative),
+    RelativePresent(Relative),
+    ;
+    static final String OLIA_NAMESPACE = "http://purl.org/olia/olia.owl#";
+    UriRef uri;
+    Set<Tense> tenses;
+    Tense parent;
+    
+    Tense() {
+        this(null,null);
+    }
+    Tense(Tense parent) {
+        this(null,parent);
+    }
+
+    Tense(String name) {
+        this(name,null);
+    }
+    Tense(String name,Tense parent) {
+        uri = new UriRef(OLIA_NAMESPACE + (name == null ? name() : name));
+        this.parent = parent;
+        EnumSet<Tense> tenses  = EnumSet.of(this);
+        if(parent != null){
+            tenses.addAll(parent.tenses);
+        }
+        this.tenses = Collections.unmodifiableSet(tenses);
+    }
+    /**
+     * Getter for the parent tense (e.g.
+     * {@link Tense#Future} for {@link Tense#NearFuture})
+     * @return the direct parent or <code>null</code> if none
+     */
+    public Tense getParent() {
+        return parent;
+    }
+    
+    /**
+     * Returns the transitive closure over
+     * the {@link #getParent() parent} tenses including
+     * this instance (e.g.
+     * [{@link Tense#Absolute}, {@link Tense#Future}, {@link Tense#NearFuture}] for
+     * {@link Tense#NearFuture}).<p>
+     * Implementation Note: Internally an {@link EnumSet} is used 
+     * to represent the transitive closure. As the iteration order
+     * of an {@link EnumSet} is based on the natural order (the
+     * {@link Enum#ordinal()} values) AND the ordering of the
+     * Tenses in this enumeration is from generic to specific the
+     * ordering of the Tenses in the returned Set is guaranteed
+     * to be from generic to specific.
+     * @return the transitive closure over parent
+     * tenses.
+     */
+    public Set<Tense> getTenses() {
+        return tenses;
+    }
+    
+    public UriRef getUri() {
+        return uri;
+    }
+
+    @Override
+    public String toString() {
+        return uri.getUnicodeString();
+    }
+}

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/nif/SsoOntology.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/nif/SsoOntology.java?rev=1390997&r1=1388320&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/nif/SsoOntology.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/nif/SsoOntology.java Thu Sep 27 13:20:20 2012
@@ -1,4 +1,4 @@
-package org.apache.stanbol.enhancer.nlp.ontology;
+package org.apache.stanbol.enhancer.nlp.nif;
 
 import org.apache.clerezza.rdf.core.UriRef;
 

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/nif/StringOntology.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/nif/StringOntology.java?rev=1390997&r1=1388320&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/nif/StringOntology.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/nif/StringOntology.java Thu Sep 27 13:20:20 2012
@@ -1,4 +1,4 @@
-package org.apache.stanbol.enhancer.nlp.ontology;
+package org.apache.stanbol.enhancer.nlp.nif;
 
 import org.apache.clerezza.rdf.core.UriRef;
 import org.apache.stanbol.enhancer.nlp.utils.NIFHelper;

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/phrase/PhraseTag.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/phrase/PhraseTag.java?rev=1390997&r1=1390996&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/phrase/PhraseTag.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/phrase/PhraseTag.java Thu Sep 27 13:20:20 2012
@@ -1,7 +1,7 @@
 package org.apache.stanbol.enhancer.nlp.phrase;
 
-import org.apache.stanbol.enhancer.nlp.Tag;
-import org.apache.stanbol.enhancer.nlp.TagSet;
+import org.apache.stanbol.enhancer.nlp.model.tag.Tag;
+import org.apache.stanbol.enhancer.nlp.model.tag.TagSet;
 import org.apache.stanbol.enhancer.nlp.pos.LexicalCategory;
 import org.apache.stanbol.enhancer.servicesapi.EnhancementEngine;
 

Added: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/LexicalCategory.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/LexicalCategory.java?rev=1390997&view=auto
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/LexicalCategory.java (added)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/LexicalCategory.java Thu Sep 27 13:20:20 2012
@@ -0,0 +1,108 @@
+package org.apache.stanbol.enhancer.nlp.pos;
+
+import org.apache.clerezza.rdf.core.UriRef;
+
+public enum LexicalCategory {
+    /**
+     * A noun, or noun substantive, is a part of speech (a word or phrase) which can co-occur with
+     * (in)definite articles and attributive adjectives, and function as the head of a noun phrase.
+     * 
+     * The word "noun" derives from the Latin 'nomen' meaning "name", and a traditional definition of nouns is
+     * that they are all and only those expressions that refer to a person, place, thing, event, substance,
+     * quality, idea or an appointment. They serve as the subject or object of a verb, and the object of a
+     * preposition. (http://en.wikipedia.org/wiki/Noun 19.09.06)
+     */
+    Noun,
+    /**
+     * A verb is a part of speech that usually denotes action ("bring", "read"), occurrence ("decompose",
+     * "glitter"), or a state of being ("exist", "stand"). Depending on the language, a verb may vary in form
+     * according to many factors, possibly including its tense, aspect, mood and voice. It may also agree with
+     * the person, gender, and/or number of some of its arguments (subject, object, etc.).
+     * (http://en.wikipedia.org/wiki/Verb 19.09.06)
+     */
+    Verb,
+    /**
+     * An Adjective is a noun-modifying expression that specifies the properties or attributes of the nominal
+     * referent. (http://www.sil.org/linguistics/GlossaryOfLinguisticTerms/WhatIsAnAdjective.htm 18.9.06)
+     */
+    Adjective,
+    /**
+     * An adposition is a cover term for prepositions, postpositions and circumpositions. It expresses a
+     * grammatical and semantic relation to another unit within a clause.
+     * (http://www.sil.org/linguistics/GlossaryOfLinguisticTerms/WhatIsAnAdposition.htm,
+     * http://en.wikipedia.org/wiki/Adposition 19.09.06)
+     * 
+     * The majority of cases of adpositions we have to consider in European languages are prepositions.
+     * (http://www.ilc.cnr.it/EAGLES96/annotate/node17.html#SECTION00062200000000000000 19.09.06)
+     */
+    Adposition,
+    /**
+     * An adverb is a part of speech that serves to modify non-nominal parts of speech, i.e., verbs,
+     * adjectives (including numbers), clauses, sentences and other adverbs. Modifiers of nouns are primarily
+     * determiners and adjectives. (http://en.wikipedia.org/wiki/Adverbs 18.09.06)
+     */
+    Adverb,
+    /**
+     * A conjunction is a word that syntactically links words or larger constituents, and expresses a semantic
+     * relationship between them.
+     * (http://www.sil.org/linguistics/GlossaryOfLinguisticTerms/WhatIsAConjunction.htm 19.09.06)
+     */
+    Conjuction,
+    /**
+     * An interjection is a form, typically brief, such as one syllable or word, which is used most often as
+     * an exclamation or part of an exclamation. It typically expresses an emotional reaction, often with
+     * respect to an accompanying sentence and may include a combination of sounds not otherwise found in the
+     * language, e.g. in English: psst; ugh; well, well
+     * (http://www.sil.org/linguistics/GlossaryOfLinguisticTerms/WhatIsAnInterjection.htm 19.09.06)
+     */
+    Interjection,
+    /**
+     * The parts of speech Pronoun, Determiner and Article heavily overlap in their formal and functional
+     * characteristics, and different analyses for different languages entail separating them out in different
+     * ways. In Eagles, Pronouns and Determiners are placed in one `super-category'. For some descriptions it
+     * may be thought best to treat them as totally different parts of speech.
+     * (http://www.ilc.cnr.it/EAGLES96/annotate/node17.html#recp 19.09.06)
+     */
+    PronounOrDeterminer,
+    /**
+     * Punctuation marks (PU) are treated here as a part of morphosyntactic annotation, as it is very common
+     * for punctuation marks to be tagged and to be treated as equivalent to words for the purposes of
+     * automatic tag assignment. (http://www.ilc.cnr.it/EAGLES96/annotate/node16.html#mp 19.09.06)
+     */
+    Punctuation,
+    /**
+     * A quantifier is a determiner that expresses a referent's definite or indefinite number or amount. A
+     * quantifier functions as a modifier of a noun, or pronoun.
+     * (http://www.sil.org/linguistics/GlossaryOfLinguisticTerms/WhatIsAQuantifier.htm 19.09.06)
+     */
+    Quantifier,
+    /**
+     * From a linguistic point of view, Residuals are a heterogeneous class and so, Residual may overlap with
+     * every linguistically motivate annotation concept. Also between subconcepts, overlap may occur (e.g.
+     * \LaTeX which is a symbol which can be read as an Acronym or acronyms which are related to
+     * Abbreviations, e.g. GNU "Gnu is not Unix")
+     */
+    Residual,
+    /**
+     * Unique approximates the linguistic concept "Particle". It covers categories with unique or very small
+     * membership, such as negative particle, which are `unassigned' to any of the standard part-of-speech
+     * categories. (http://www.ilc.cnr.it/EAGLES96/annotate/node16.html#mp 19.09.06)
+     */
+    Unique, ;
+    static final String OLIA_NAMESPACE = "http://purl.org/olia/olia.owl#";
+
+    UriRef uri;
+
+    LexicalCategory() {
+        this.uri = new UriRef(OLIA_NAMESPACE + name());
+    }
+
+    public UriRef getUri() {
+        return uri;
+    }
+
+    @Override
+    public String toString() {
+        return "olia:" + name();
+    }
+}

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/PosTag.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/PosTag.java?rev=1390997&r1=1390996&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/PosTag.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/PosTag.java Thu Sep 27 13:20:20 2012
@@ -1,8 +1,8 @@
 package org.apache.stanbol.enhancer.nlp.pos;
 
-import org.apache.stanbol.enhancer.nlp.Tag;
-import org.apache.stanbol.enhancer.nlp.TagSet;
 import org.apache.stanbol.enhancer.nlp.model.Token;
+import org.apache.stanbol.enhancer.nlp.model.tag.Tag;
+import org.apache.stanbol.enhancer.nlp.model.tag.TagSet;
 import org.apache.stanbol.enhancer.servicesapi.EnhancementEngine;
 
 /**

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/olia/English.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/olia/English.java?rev=1390997&r1=1390996&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/olia/English.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/olia/English.java Thu Sep 27 13:20:20 2012
@@ -1,7 +1,7 @@
 package org.apache.stanbol.enhancer.nlp.pos.olia;
 
 import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.stanbol.enhancer.nlp.TagSet;
+import org.apache.stanbol.enhancer.nlp.model.tag.TagSet;
 import org.apache.stanbol.enhancer.nlp.pos.LexicalCategory;
 import org.apache.stanbol.enhancer.nlp.pos.PosTag;
 

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/olia/German.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/olia/German.java?rev=1390997&r1=1390996&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/olia/German.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/olia/German.java Thu Sep 27 13:20:20 2012
@@ -1,7 +1,7 @@
 package org.apache.stanbol.enhancer.nlp.pos.olia;
 
 import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.stanbol.enhancer.nlp.TagSet;
+import org.apache.stanbol.enhancer.nlp.model.tag.TagSet;
 import org.apache.stanbol.enhancer.nlp.pos.LexicalCategory;
 import org.apache.stanbol.enhancer.nlp.pos.PosTag;
 

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/olia/Spanish.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/olia/Spanish.java?rev=1390997&r1=1390996&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/olia/Spanish.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/pos/olia/Spanish.java Thu Sep 27 13:20:20 2012
@@ -1,7 +1,7 @@
 package org.apache.stanbol.enhancer.nlp.pos.olia;
 
 import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.stanbol.enhancer.nlp.TagSet;
+import org.apache.stanbol.enhancer.nlp.model.tag.TagSet;
 import org.apache.stanbol.enhancer.nlp.pos.LexicalCategory;
 import org.apache.stanbol.enhancer.nlp.pos.PosTag;
 

Modified: stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/utils/NIFHelper.java
URL: http://svn.apache.org/viewvc/stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/utils/NIFHelper.java?rev=1390997&r1=1390996&r2=1390997&view=diff
==============================================================================
--- stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/utils/NIFHelper.java (original)
+++ stanbol/branches/stanbol-nlp-processing/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/utils/NIFHelper.java Thu Sep 27 13:20:20 2012
@@ -28,8 +28,8 @@ import org.apache.stanbol.enhancer.nlp.m
 import org.apache.stanbol.enhancer.nlp.model.annotation.Annotated;
 import org.apache.stanbol.enhancer.nlp.model.annotation.Annotation;
 import org.apache.stanbol.enhancer.nlp.model.annotation.Value;
-import org.apache.stanbol.enhancer.nlp.ontology.SsoOntology;
-import org.apache.stanbol.enhancer.nlp.ontology.StringOntology;
+import org.apache.stanbol.enhancer.nlp.nif.SsoOntology;
+import org.apache.stanbol.enhancer.nlp.nif.StringOntology;
 import org.apache.stanbol.enhancer.nlp.phrase.PhraseTag;
 import org.apache.stanbol.enhancer.nlp.pos.LexicalCategory;
 import org.apache.stanbol.enhancer.nlp.pos.PosTag;