You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jo...@apache.org on 2014/02/21 16:20:18 UTC

svn commit: r1570604 - /opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/entitylinker/EntityLinker.java

Author: joern
Date: Fri Feb 21 15:20:17 2014
New Revision: 1570604

URL: http://svn.apache.org/r1570604
Log:
OPENNLP-579 Removed uneccessary type parameter I, all sub types of EntityLinkerProptery can be passed to the init method anyway. Renamed the text parameter to doctext

Modified:
    opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/entitylinker/EntityLinker.java

Modified: opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/entitylinker/EntityLinker.java
URL: http://svn.apache.org/viewvc/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/entitylinker/EntityLinker.java?rev=1570604&r1=1570603&r2=1570604&view=diff
==============================================================================
--- opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/entitylinker/EntityLinker.java (original)
+++ opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/entitylinker/EntityLinker.java Fri Feb 21 15:20:17 2014
@@ -30,10 +30,8 @@ import opennlp.tools.util.Span;
  * @param <T> A type that extends Span. LinkedSpan and BaseLink are provided to
  *            provide this signature: EntityLinker<LinkedSpan<BaseLink>> as a
  *            default
- * * @param <I> A type that extends EntityLinkerProperties. This enables
- *               passing external resources into an EntityLinker via the @link EtityLinkerFactory
  */
-public interface EntityLinker<T extends Span, I extends EntityLinkerProperties> {
+public interface EntityLinker<T extends Span> {
 
   /**
    * allows for passing properties through the EntityLinkerFactory into all
@@ -45,7 +43,7 @@ public interface EntityLinker<T extends 
    *                           properties needed by the impl, as well as any
    *                           other objects required for the impl
    */
-  void init(I initializationData) throws Exception;
+  void init(EntityLinkerProperties initializationData) throws Exception;
 
   /**
    * Links an entire document of named entities to an external source
@@ -69,21 +67,21 @@ public interface EntityLinker<T extends 
 
   /**
    *
-   * @param text      the document text to be used as additional context, and to
+   * @param doctext      the document text to be used as additional context, and to
    *                  derive sentences and tokens String[]
    * @param sentences the list of sentences spans that correspond to the text.
    * @param tokens    the spans that correspond to one of the sentences.
    * @param nameSpans the named entity spans that correspond to the tokens
    * @return
    */
-  List<T> find(String text, Span sentences[], Span tokens[], Span nameSpans[]);
+  List<T> find(String doctext, Span sentences[], Span tokens[], Span nameSpans[]);
 
   /**
    * Links the names that correspond to the tokens[] spans. The sentenceindex
    * can be used to get the sentence text and tokens from the text based on the
    * sentence and token spans. The text is available for additional context.
    *
-   * @param text          the document text to be used as additional context,
+   * @param doctext          the document text to be used as additional context,
    *                      and to derive sentences and tokens String[]
    * @param sentences     the list of sentences spans that correspond to the
    *                      text.
@@ -93,13 +91,13 @@ public interface EntityLinker<T extends 
    *                      Span[] corresponds to
    * @return
    */
-  List<T> find(String text, Span sentences[], Span tokens[], Span nameSpans[], int sentenceIndex);
+  List<T> find(String doctext, Span sentences[], Span tokens[], Span nameSpans[], int sentenceIndex);
 
   /**
    * Links the names that correspond to the tokens[]. The Sentences and text are
    * available for additional context.
    *
-   * @param text      the document text to be used as additional context, and to
+   * @param doctext      the document text to be used as additional context, and to
    *                  derive sentences and tokens String[]
    * @param sentences the list of sentences spans that correspond to the text.
    * @param tokens    the actual String[] of tokens that correspond to one of
@@ -107,5 +105,5 @@ public interface EntityLinker<T extends 
    * @param nameSpans the named entity spans that correspond to the tokens
    * @return
    */
-  List<T> find(String text, Span sentences[], String tokens[], Span nameSpans[]);
+  List<T> find(String doctext, Span sentences[], String tokens[], Span nameSpans[]);
 }