Author: rwesten
Date: Tue Oct 22 08:53:36 2013
New Revision: 1534542
URL: http://svn.apache.org/r1534542
Log:
STANBOL-1094: re-added remaining STANBOL-1132 related changes to the trunk
Added:
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/SpanTypeEnum.java
(with props)
Modified:
stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/AnalyzedTextParser.java
stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/AnalyzedTextSerializer.java
stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/valuetype/impl/CorefTagSupport.java
stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/valuetype/impl/DependencyFeaturesSupport.java
stanbol/trunk/enhancer/generic/nlp-json/src/main/resources/META-INF/services/org.apache.stanbol.enhancer.nlp.json.valuetype.ValueTypeParser
stanbol/trunk/enhancer/generic/nlp-json/src/main/resources/META-INF/services/org.apache.stanbol.enhancer.nlp.json.valuetype.ValueTypeSerializer
stanbol/trunk/enhancer/generic/nlp-json/src/test/java/org/apache/stanbol/enhancer/nlp/json/AnalyzedTextSerializerAndParserTest.java
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/NlpAnnotations.java
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/dependency/GrammaticalRelation.java
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/AnalysedTextUtils.java
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/Span.java
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/AnalysedTextImpl.java
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/ChunkImpl.java
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/SectionImpl.java
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/SentenceImpl.java
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/SpanImpl.java
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/TokenImpl.java
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/utils/NIFHelper.java
stanbol/trunk/enhancer/generic/nlp/src/test/java/org/apache/stanbol/enhancer/nlp/model/AnalysedTextTest.java
Modified:
stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/AnalyzedTextParser.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/AnalyzedTextParser.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/AnalyzedTextParser.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/AnalyzedTextParser.java
Tue Oct 22 08:53:36 2013
@@ -26,9 +26,6 @@ import java.util.EnumSet;
import java.util.Iterator;
import java.util.Map.Entry;
-import javax.swing.JPanel;
-
-import org.apache.commons.io.IOUtils;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.ConfigurationPolicy;
import org.apache.felix.scr.annotations.Reference;
@@ -38,10 +35,8 @@ import org.apache.stanbol.enhancer.nlp.j
import org.apache.stanbol.enhancer.nlp.model.AnalysedText;
import org.apache.stanbol.enhancer.nlp.model.AnalysedTextFactory;
import org.apache.stanbol.enhancer.nlp.model.Span;
-import org.apache.stanbol.enhancer.nlp.model.Span.SpanTypeEnum;
+import org.apache.stanbol.enhancer.nlp.model.SpanTypeEnum;
import org.apache.stanbol.enhancer.nlp.model.annotation.Value;
-import org.apache.stanbol.enhancer.servicesapi.Blob;
-import org.codehaus.jackson.JsonFactory;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.JsonParser;
@@ -301,7 +296,7 @@ public class AnalyzedTextParser {
ValueTypeParser<?> parser =
this.valueTypeParserRegistry.getParser(clazz);
Object value;
if(parser != null){
- value = parser.parse(jValue);
+ value = parser.parse(jValue, span.getContext());
} else {
JsonNode valueNode = jValue.path("value");
if(valueNode.isMissingNode()){
Modified:
stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/AnalyzedTextSerializer.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/AnalyzedTextSerializer.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/AnalyzedTextSerializer.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/AnalyzedTextSerializer.java
Tue Oct 22 08:53:36 2013
@@ -33,7 +33,7 @@ import org.apache.stanbol.enhancer.nlp.j
import
org.apache.stanbol.enhancer.nlp.json.valuetype.ValueTypeSerializerRegistry;
import org.apache.stanbol.enhancer.nlp.model.AnalysedText;
import org.apache.stanbol.enhancer.nlp.model.Span;
-import org.apache.stanbol.enhancer.nlp.model.Span.SpanTypeEnum;
+import org.apache.stanbol.enhancer.nlp.model.SpanTypeEnum;
import org.apache.stanbol.enhancer.nlp.model.annotation.Value;
import org.codehaus.jackson.JsonFactory;
import org.codehaus.jackson.JsonGenerator;
Modified:
stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/valuetype/impl/CorefTagSupport.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/valuetype/impl/CorefTagSupport.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/valuetype/impl/CorefTagSupport.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/valuetype/impl/CorefTagSupport.java
Tue Oct 22 08:53:36 2013
@@ -26,7 +26,7 @@ import org.apache.stanbol.enhancer.nlp.j
import org.apache.stanbol.enhancer.nlp.json.valuetype.ValueTypeSerializer;
import org.apache.stanbol.enhancer.nlp.model.AnalysedText;
import org.apache.stanbol.enhancer.nlp.model.Span;
-import org.apache.stanbol.enhancer.nlp.model.Span.SpanTypeEnum;
+import org.apache.stanbol.enhancer.nlp.model.SpanTypeEnum;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.node.ArrayNode;
Modified:
stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/valuetype/impl/DependencyFeaturesSupport.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/valuetype/impl/DependencyFeaturesSupport.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/valuetype/impl/DependencyFeaturesSupport.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp-json/src/main/java/org/apache/stanbol/enhancer/nlp/json/valuetype/impl/DependencyFeaturesSupport.java
Tue Oct 22 08:53:36 2013
@@ -29,7 +29,7 @@ import org.apache.stanbol.enhancer.nlp.j
import org.apache.stanbol.enhancer.nlp.json.valuetype.ValueTypeSerializer;
import org.apache.stanbol.enhancer.nlp.model.AnalysedText;
import org.apache.stanbol.enhancer.nlp.model.Span;
-import org.apache.stanbol.enhancer.nlp.model.Span.SpanTypeEnum;
+import org.apache.stanbol.enhancer.nlp.model.SpanTypeEnum;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.node.ArrayNode;
Modified:
stanbol/trunk/enhancer/generic/nlp-json/src/main/resources/META-INF/services/org.apache.stanbol.enhancer.nlp.json.valuetype.ValueTypeParser
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp-json/src/main/resources/META-INF/services/org.apache.stanbol.enhancer.nlp.json.valuetype.ValueTypeParser?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp-json/src/main/resources/META-INF/services/org.apache.stanbol.enhancer.nlp.json.valuetype.ValueTypeParser
(original)
+++
stanbol/trunk/enhancer/generic/nlp-json/src/main/resources/META-INF/services/org.apache.stanbol.enhancer.nlp.json.valuetype.ValueTypeParser
Tue Oct 22 08:53:36 2013
@@ -1,4 +1,5 @@
org.apache.stanbol.enhancer.nlp.json.valuetype.impl.PosTagSupport
org.apache.stanbol.enhancer.nlp.json.valuetype.impl.NerTagSupport
org.apache.stanbol.enhancer.nlp.json.valuetype.impl.MorphoFeaturesSupport
-org.apache.stanbol.enhancer.nlp.json.valuetype.impl.PhraseTagSupport
\ No newline at end of file
+org.apache.stanbol.enhancer.nlp.json.valuetype.impl.PhraseTagSupport
+org.apache.stanbol.enhancer.nlp.json.valuetype.impl.DependencyFeaturesSupport
\ No newline at end of file
Modified:
stanbol/trunk/enhancer/generic/nlp-json/src/main/resources/META-INF/services/org.apache.stanbol.enhancer.nlp.json.valuetype.ValueTypeSerializer
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp-json/src/main/resources/META-INF/services/org.apache.stanbol.enhancer.nlp.json.valuetype.ValueTypeSerializer?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp-json/src/main/resources/META-INF/services/org.apache.stanbol.enhancer.nlp.json.valuetype.ValueTypeSerializer
(original)
+++
stanbol/trunk/enhancer/generic/nlp-json/src/main/resources/META-INF/services/org.apache.stanbol.enhancer.nlp.json.valuetype.ValueTypeSerializer
Tue Oct 22 08:53:36 2013
@@ -1,4 +1,5 @@
org.apache.stanbol.enhancer.nlp.json.valuetype.impl.PosTagSupport
org.apache.stanbol.enhancer.nlp.json.valuetype.impl.NerTagSupport
org.apache.stanbol.enhancer.nlp.json.valuetype.impl.MorphoFeaturesSupport
-org.apache.stanbol.enhancer.nlp.json.valuetype.impl.PhraseTagSupport
\ No newline at end of file
+org.apache.stanbol.enhancer.nlp.json.valuetype.impl.PhraseTagSupport
+org.apache.stanbol.enhancer.nlp.json.valuetype.impl.DependencyFeaturesSupport
\ No newline at end of file
Modified:
stanbol/trunk/enhancer/generic/nlp-json/src/test/java/org/apache/stanbol/enhancer/nlp/json/AnalyzedTextSerializerAndParserTest.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp-json/src/test/java/org/apache/stanbol/enhancer/nlp/json/AnalyzedTextSerializerAndParserTest.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp-json/src/test/java/org/apache/stanbol/enhancer/nlp/json/AnalyzedTextSerializerAndParserTest.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp-json/src/test/java/org/apache/stanbol/enhancer/nlp/json/AnalyzedTextSerializerAndParserTest.java
Tue Oct 22 08:53:36 2013
@@ -38,8 +38,8 @@ import org.apache.stanbol.enhancer.nlp.m
import org.apache.stanbol.enhancer.nlp.model.Chunk;
import org.apache.stanbol.enhancer.nlp.model.Sentence;
import org.apache.stanbol.enhancer.nlp.model.Span;
+import org.apache.stanbol.enhancer.nlp.model.SpanTypeEnum;
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.Annotation;
import org.apache.stanbol.enhancer.nlp.model.annotation.Value;
import org.apache.stanbol.enhancer.nlp.morpho.Case;
Modified:
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/NlpAnnotations.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/NlpAnnotations.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/NlpAnnotations.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/NlpAnnotations.java
Tue Oct 22 08:53:36 2013
@@ -1,21 +1,23 @@
/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements. See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.stanbol.enhancer.nlp;
+import org.apache.stanbol.enhancer.nlp.coref.CorefTag;
+import org.apache.stanbol.enhancer.nlp.dependency.DependencyFeatures;
import org.apache.stanbol.enhancer.nlp.model.AnalysedText;
import org.apache.stanbol.enhancer.nlp.model.Chunk;
import org.apache.stanbol.enhancer.nlp.model.Token;
@@ -29,64 +31,83 @@ import org.apache.stanbol.enhancer.nlp.p
* Defines the {@link Annotation} constants typically used by NLP components
*/
public interface NlpAnnotations {
-
- /**
- * The POS {@link Annotation} added by POS taggers to {@link Token}s of
- * an {@link AnalysedText}.
- */
- Annotation<PosTag> POS_ANNOTATION = new Annotation<PosTag>(
- "stanbol.enhancer.nlp.pos", PosTag.class);
- /**
+
+ /**
+ * The POS {@link Annotation} added by POS taggers to {@link Token}s of
an
+ * {@link AnalysedText}.
+ */
+ Annotation<PosTag> POS_ANNOTATION = new Annotation<PosTag>(
+ "stanbol.enhancer.nlp.pos", PosTag.class);
+ /**
*
*/
- Annotation<NerTag> NER_ANNOTATION = new Annotation<NerTag>(
- "stanbol.enhancer.nlp.ner", NerTag.class);
-
- /**
- * The Phrase {@link Annotation} added by chunker to a group of
- * [1..*] {@link Token}s.<p>
- * This annotation is typically found on {@link Chunk}s.
- */
- Annotation<PhraseTag> PHRASE_ANNOTATION = new Annotation<PhraseTag>(
- "stanbol.enhancer.nlp.phrase", PhraseTag.class);
-
- /**
- * The Sentiment {@link Annotation} added by a sentiment tagger typically
- * to single {@link Token}s that do carry a positive or negative sentiment.
- */
- Annotation<Double> SENTIMENT_ANNOTATION = new Annotation<Double>(
- "stanbol.enhancer.nlp.sentiment", Double.class);
- /**
- * {@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<MorphoFeatures> MORPHO_ANNOTATION = new
Annotation<MorphoFeatures>(
- "stanbol.enhancer.nlp.morpho",MorphoFeatures.class);
+ Annotation<NerTag> NER_ANNOTATION = new Annotation<NerTag>(
+ "stanbol.enhancer.nlp.ner", NerTag.class);
- /*
- * Currently only used as part of MorphoFeatures
- */
-// Annotation<CaseTag> CASE_ANNOTATION = new Annotation<CaseTag>(
-// "stanbol.enhancer.nlp.morpho.case",CaseTag.class);
-//
-// Annotation<GenderTag> GENDER_ANNOTATION = new Annotation<GenderTag>(
-// "stanbol.enhancer.nlp.morpho.gender",GenderTag.class);
-//
-// Annotation<NumberTag> NUMBER_ANNOTATION = new Annotation<NumberTag>(
-// "stanbol.enhancer.nlp.morpho.number",NumberTag.class);
-//
-// Annotation<PersonTag> PERSON_ANNOTATION = new Annotation<PersonTag>(
-// "stanbol.enhancer.nlp.morpho.person",PersonTag.class);
-//
-// Annotation<TenseTag> TENSE_ANNOTATION = new Annotation<TenseTag>(
-// "stanbol.enhancer.nlp.morpho.tense",TenseTag.class);
-//
-// Annotation<VerbMoodTag> VERB_MOOD_ANNOTATION = new
Annotation<VerbMoodTag>(
-// "stanbol.enhancer.nlp.morpho.verb-mood",VerbMoodTag.class);
+ /**
+ * The Phrase {@link Annotation} added by chunker to a group of [1..*]
+ * {@link Token}s.
+ * <p>
+ * This annotation is typically found on {@link Chunk}s.
+ */
+ Annotation<PhraseTag> PHRASE_ANNOTATION = new Annotation<PhraseTag>(
+ "stanbol.enhancer.nlp.phrase", PhraseTag.class);
+
+ /**
+ * The Sentiment {@link Annotation} added by a sentiment tagger
typically to
+ * single {@link Token}s that do carry a positive or negative sentiment.
+ */
+ Annotation<Double> SENTIMENT_ANNOTATION = new Annotation<Double>(
+ "stanbol.enhancer.nlp.sentiment", Double.class);
+ /**
+ * {@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<MorphoFeatures> MORPHO_ANNOTATION = new
Annotation<MorphoFeatures>(
+ "stanbol.enhancer.nlp.morpho", MorphoFeatures.class);
+
+ /**
+ * {@link Annotation} representing the grammatical relations a word has
with
+ * other words in the sentence. Typically used on {@link Token}s.
+ * <p>
+ */
+ Annotation<DependencyFeatures> DEPENDENCY_ANNOTATION = new
Annotation<DependencyFeatures>(
+ "stanbol.enhancer.nlp.dependency",
DependencyFeatures.class);
+
+ /**
+ * {@link Annotation} representing all the words which are a
+ * mention/reference of a given word. Typically used on {@link Token}s.
+ * <p>
+ */
+ Annotation<CorefTag> COREF_ANNOTATION = new Annotation<CorefTag>(
+ "stanbol.enhancer.nlp.coref", CorefTag.class);
+
+ /*
+ * Currently only used as part of MorphoFeatures
+ */
+ // Annotation<CaseTag> CASE_ANNOTATION = new Annotation<CaseTag>(
+ // "stanbol.enhancer.nlp.morpho.case",CaseTag.class);
+ //
+ // Annotation<GenderTag> GENDER_ANNOTATION = new Annotation<GenderTag>(
+ // "stanbol.enhancer.nlp.morpho.gender",GenderTag.class);
+ //
+ // Annotation<NumberTag> NUMBER_ANNOTATION = new Annotation<NumberTag>(
+ // "stanbol.enhancer.nlp.morpho.number",NumberTag.class);
+ //
+ // Annotation<PersonTag> PERSON_ANNOTATION = new Annotation<PersonTag>(
+ // "stanbol.enhancer.nlp.morpho.person",PersonTag.class);
+ //
+ // Annotation<TenseTag> TENSE_ANNOTATION = new Annotation<TenseTag>(
+ // "stanbol.enhancer.nlp.morpho.tense",TenseTag.class);
+ //
+ // Annotation<VerbMoodTag> VERB_MOOD_ANNOTATION = new
+ // Annotation<VerbMoodTag>(
+ // "stanbol.enhancer.nlp.morpho.verb-mood",VerbMoodTag.class);
}
Modified:
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/dependency/GrammaticalRelation.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/dependency/GrammaticalRelation.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/dependency/GrammaticalRelation.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/dependency/GrammaticalRelation.java
Tue Oct 22 08:53:36 2013
@@ -1,3 +1,19 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
package org.apache.stanbol.enhancer.nlp.dependency;
import java.util.Collection;
Modified:
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/AnalysedTextUtils.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/AnalysedTextUtils.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/AnalysedTextUtils.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/AnalysedTextUtils.java
Tue Oct 22 08:53:36 2013
@@ -30,7 +30,6 @@ import java.util.TreeSet;
import java.util.Map.Entry;
import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.stanbol.enhancer.nlp.model.Span.SpanTypeEnum;
import org.apache.stanbol.enhancer.nlp.model.impl.SectionImpl;
import org.apache.stanbol.enhancer.nlp.model.impl.SpanImpl;
import org.apache.stanbol.enhancer.servicesapi.Blob;
Modified:
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/Span.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/Span.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/Span.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/Span.java
Tue Oct 22 08:53:36 2013
@@ -29,35 +29,6 @@ import org.apache.stanbol.enhancer.nlp.m
public interface Span extends Annotated, Comparable<Span>{
/**
- * Enumeration over different types - or roles - spans defined for an
- * {@link AnalysedText} may play.
- */
- public static enum SpanTypeEnum {
- /**
- * The Text as a whole
- */
- Text,
- /**
- * An section of the text (chapter, page, paragraph ...). NOTE: this
- * does NOT define types of sections.
- */
- TextSection,
- /**
- * An Sentence
- */
- Sentence,
- /**
- * A Chunk (e.g. a Noun Phrase) NOTE: this does NOT define types of
- * Chunks
- */
- Chunk,
- /**
- * A Token (e.g. a noun, verb, punctuation) NOTE: this does NOT define
- * types of Tokens
- */
- Token;
- }
- /**
* The type of the Span
* @return
*/
Added:
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/SpanTypeEnum.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/SpanTypeEnum.java?rev=1534542&view=auto
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/SpanTypeEnum.java
(added)
+++
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/SpanTypeEnum.java
Tue Oct 22 08:53:36 2013
@@ -0,0 +1,47 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.stanbol.enhancer.nlp.model;
+
+/**
+ * Enumeration over different types - or roles - spans defined for an
+ * {@link AnalysedText} may play.
+ */
+public enum SpanTypeEnum {
+ /**
+ * The Text as a whole
+ */
+ Text,
+ /**
+ * An section of the text (chapter, page, paragraph ...). NOTE: this
+ * does NOT define types of sections.
+ */
+ TextSection,
+ /**
+ * An Sentence
+ */
+ Sentence,
+ /**
+ * A Chunk (e.g. a Noun Phrase) NOTE: this does NOT define types of
+ * Chunks
+ */
+ Chunk,
+ /**
+ * A Token (e.g. a noun, verb, punctuation) NOTE: this does NOT define
+ * types of Tokens
+ */
+ Token;
+}
\ No newline at end of file
Propchange:
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/SpanTypeEnum.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified:
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/AnalysedTextImpl.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/AnalysedTextImpl.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/AnalysedTextImpl.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/AnalysedTextImpl.java
Tue Oct 22 08:53:36 2013
@@ -24,6 +24,7 @@ import org.apache.stanbol.enhancer.nlp.m
import org.apache.stanbol.enhancer.nlp.model.Chunk;
import org.apache.stanbol.enhancer.nlp.model.Sentence;
import org.apache.stanbol.enhancer.nlp.model.Span;
+import org.apache.stanbol.enhancer.nlp.model.SpanTypeEnum;
import org.apache.stanbol.enhancer.servicesapi.Blob;
/**
Modified:
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/ChunkImpl.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/ChunkImpl.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/ChunkImpl.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/ChunkImpl.java
Tue Oct 22 08:53:36 2013
@@ -18,6 +18,7 @@ package org.apache.stanbol.enhancer.nlp.
import org.apache.stanbol.enhancer.nlp.model.Chunk;
import org.apache.stanbol.enhancer.nlp.model.Span;
+import org.apache.stanbol.enhancer.nlp.model.SpanTypeEnum;
public final class ChunkImpl extends SectionImpl implements Chunk {
Modified:
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/SectionImpl.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/SectionImpl.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/SectionImpl.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/SectionImpl.java
Tue Oct 22 08:53:36 2013
@@ -31,6 +31,7 @@ import org.apache.stanbol.enhancer.nlp.m
import org.apache.stanbol.enhancer.nlp.model.Section;
import org.apache.stanbol.enhancer.nlp.model.Sentence;
import org.apache.stanbol.enhancer.nlp.model.Span;
+import org.apache.stanbol.enhancer.nlp.model.SpanTypeEnum;
import org.apache.stanbol.enhancer.nlp.model.Token;
Modified:
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/SentenceImpl.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/SentenceImpl.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/SentenceImpl.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/SentenceImpl.java
Tue Oct 22 08:53:36 2013
@@ -21,6 +21,7 @@ import java.util.Iterator;
import org.apache.stanbol.enhancer.nlp.model.Chunk;
import org.apache.stanbol.enhancer.nlp.model.Sentence;
import org.apache.stanbol.enhancer.nlp.model.Span;
+import org.apache.stanbol.enhancer.nlp.model.SpanTypeEnum;
public final class SentenceImpl extends SectionImpl implements Sentence {
Modified:
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/SpanImpl.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/SpanImpl.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/SpanImpl.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/SpanImpl.java
Tue Oct 22 08:53:36 2013
@@ -20,6 +20,7 @@ import java.lang.ref.SoftReference;
import java.util.Arrays;
import org.apache.stanbol.enhancer.nlp.model.Span;
+import org.apache.stanbol.enhancer.nlp.model.SpanTypeEnum;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified:
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/TokenImpl.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/TokenImpl.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/TokenImpl.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/model/impl/TokenImpl.java
Tue Oct 22 08:53:36 2013
@@ -19,6 +19,7 @@ package org.apache.stanbol.enhancer.nlp.
import java.util.Arrays;
import org.apache.stanbol.enhancer.nlp.model.Span;
+import org.apache.stanbol.enhancer.nlp.model.SpanTypeEnum;
import org.apache.stanbol.enhancer.nlp.model.Token;
Modified:
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/utils/NIFHelper.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/utils/NIFHelper.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/utils/NIFHelper.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/utils/NIFHelper.java
Tue Oct 22 08:53:36 2013
@@ -40,7 +40,7 @@ import org.apache.stanbol.enhancer.nlp.N
import org.apache.stanbol.enhancer.nlp.model.AnalysedText;
import org.apache.stanbol.enhancer.nlp.model.Chunk;
import org.apache.stanbol.enhancer.nlp.model.Span;
-import org.apache.stanbol.enhancer.nlp.model.Span.SpanTypeEnum;
+import org.apache.stanbol.enhancer.nlp.model.SpanTypeEnum;
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.Annotation;
Modified:
stanbol/trunk/enhancer/generic/nlp/src/test/java/org/apache/stanbol/enhancer/nlp/model/AnalysedTextTest.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/nlp/src/test/java/org/apache/stanbol/enhancer/nlp/model/AnalysedTextTest.java?rev=1534542&r1=1534541&r2=1534542&view=diff
==============================================================================
---
stanbol/trunk/enhancer/generic/nlp/src/test/java/org/apache/stanbol/enhancer/nlp/model/AnalysedTextTest.java
(original)
+++
stanbol/trunk/enhancer/generic/nlp/src/test/java/org/apache/stanbol/enhancer/nlp/model/AnalysedTextTest.java
Tue Oct 22 08:53:36 2013
@@ -31,7 +31,6 @@ import java.util.Set;
import org.apache.clerezza.rdf.core.UriRef;
import
org.apache.stanbol.enhancer.contentitem.inmemory.InMemoryContentItemFactory;
-import org.apache.stanbol.enhancer.nlp.model.Span.SpanTypeEnum;
import org.apache.stanbol.enhancer.nlp.model.annotation.Annotation;
import org.apache.stanbol.enhancer.nlp.model.annotation.Value;
import org.apache.stanbol.enhancer.servicesapi.Blob;