opennlp.tools.namefind
Class NameSample

java.lang.Object
  extended by opennlp.tools.namefind.NameSample

public class NameSample
extends Object

Class for holding names for a single unit of text.


Constructor Summary
NameSample(String[] sentence, Span[] names, boolean clearAdaptiveData)
           
NameSample(String[] sentence, Span[] names, String[][] additionalContext, boolean clearAdaptiveData)
          Initializes the current instance.
 
Method Summary
 boolean equals(Object obj)
           
 String[][] getAdditionalContext()
           
 Span[] getNames()
           
 String[] getSentence()
           
 boolean isClearAdaptiveDataSet()
           
static NameSample parse(String taggedTokens, boolean isClearAdaptiveData)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NameSample

public NameSample(String[] sentence,
                  Span[] names,
                  String[][] additionalContext,
                  boolean clearAdaptiveData)
Initializes the current instance.

Parameters:
sentence - training sentence
names -
additionalContext -
clearAdaptiveData - if true the adaptive data of the feature generators is cleared

NameSample

public NameSample(String[] sentence,
                  Span[] names,
                  boolean clearAdaptiveData)
Method Detail

getSentence

public String[] getSentence()

getNames

public Span[] getNames()

getAdditionalContext

public String[][] getAdditionalContext()

isClearAdaptiveDataSet

public boolean isClearAdaptiveDataSet()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

parse

public static NameSample parse(String taggedTokens,
                               boolean isClearAdaptiveData)
                        throws IOException
Throws:
IOException


Copyright © 2010. All Rights Reserved.