public class NameSample extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_TYPE
The a default type value when there is no type in training data.
|
Constructor and Description |
---|
NameSample(String[] sentence,
Span[] names,
boolean clearAdaptiveData) |
NameSample(String[] sentence,
Span[] names,
String[][] additionalContext,
boolean clearAdaptiveData)
Initializes the current instance.
|
NameSample(String id,
String[] sentence,
Span[] names,
String[][] additionalContext,
boolean clearAdaptiveData) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String[][] |
getAdditionalContext() |
String |
getId() |
Span[] |
getNames() |
String[] |
getSentence() |
int |
hashCode() |
boolean |
isClearAdaptiveDataSet() |
static NameSample |
parse(String taggedTokens,
boolean isClearAdaptiveData) |
static NameSample |
parse(String taggedTokens,
String defaultType,
boolean isClearAdaptiveData) |
String |
toString() |
public static final String DEFAULT_TYPE
public NameSample(String id, String[] sentence, Span[] names, String[][] additionalContext, boolean clearAdaptiveData)
public NameSample(String[] sentence, Span[] names, String[][] additionalContext, boolean clearAdaptiveData)
sentence
- training sentencenames
- additionalContext
- clearAdaptiveData
- if true the adaptive data of the
feature generators is clearedpublic String getId()
public String[] getSentence()
public Span[] getNames()
public String[][] getAdditionalContext()
public boolean isClearAdaptiveDataSet()
public static NameSample parse(String taggedTokens, boolean isClearAdaptiveData) throws IOException
IOException
public static NameSample parse(String taggedTokens, String defaultType, boolean isClearAdaptiveData) throws IOException
IOException
Copyright © 2017 The Apache Software Foundation. All rights reserved.