public class NEWord extends Word
Modifier and Type | Class and Description |
---|---|
static class |
NEWord.DiscreteFeature |
static class |
NEWord.LabelToLookAt |
static class |
NEWord.RealFeature |
Modifier and Type | Field and Description |
---|---|
String |
form |
ArrayList<String> |
gazetteers |
NamedEntity |
goldEntity |
boolean |
isCaseNormalized |
ArrayList<NEWord.RealFeature> |
level1AggregationFeatures |
String |
neLabel
This field stores the named entity type tag found in labeled data.
|
String |
neTypeLevel1
This field is used to store a computed named entity type tag.
|
String |
neTypeLevel2 |
NEWord |
nextIgnoreSentenceBoundary
these are referencence to previous and next words, ignoring sentence boundries.
|
String |
normalizedForm |
String |
normalizedMostLinkableExpression
used by wikipedia linkability.
|
String |
originalForm |
String[] |
parts
contains the parts of this word if DualTokenization is enabled, otherwise a waste of space.
|
NamedEntity |
predictedEntity |
CharacteristicWords |
predictionConfidencesLevel1Classifier |
CharacteristicWords |
predictionConfidencesLevel2Classifier |
NEWord |
previousIgnoreSentenceBoundary |
String[] |
wikifierFeatures |
capitalized, lemma, partOfSpeech, wordSense
Constructor and Description |
---|
NEWord(Word w,
NEWord p,
String type)
An
NEWord can be constructed from a Word object representing the
same word, an NEWord representing the previous word in the sentence, and the
named entity type label found in the data. |
Modifier and Type | Method and Description |
---|---|
static void |
addTokenToSentence(edu.illinois.cs.cogcomp.lbjava.parse.LinkedVector sentence,
NEWord word) |
static void |
addTokenToSentence(edu.illinois.cs.cogcomp.lbjava.parse.LinkedVector sentence,
String token,
String tag)
Add the provided token to the sentence, for also do any additional word spliting.
|
String[] |
getAllNonlocalFeatures() |
ArrayList<NEWord.RealFeature> |
getLevel1AggregationFeatures() |
HashMap<String,Integer> |
getNonLocalFeatures() |
int |
getNonLocFeatCount(String nonLocFeat) |
String |
getPrediction(NEWord.LabelToLookAt labelType) |
ArrayList<NEWord.RealFeature> |
resetLevel1AggregationFeatures() |
void |
setPrediction(String label,
NEWord.LabelToLookAt labelType) |
String |
toString()
Produces a simple
String representation of this word in which the
neLabel field appears followed by the word's part of speech and finally the form
(i.e., spelling) of the word all surrounded by parentheses. |
public String neTypeLevel1
public String neTypeLevel2
public NamedEntity predictedEntity
public CharacteristicWords predictionConfidencesLevel1Classifier
public CharacteristicWords predictionConfidencesLevel2Classifier
public NamedEntity goldEntity
public String neLabel
public String[] parts
public String normalizedMostLinkableExpression
public String[] wikifierFeatures
public NEWord nextIgnoreSentenceBoundary
public NEWord previousIgnoreSentenceBoundary
public ArrayList<NEWord.RealFeature> level1AggregationFeatures
public String form
public String originalForm
public String normalizedForm
public boolean isCaseNormalized
public NEWord(Word w, NEWord p, String type)
NEWord
can be constructed from a Word
object representing the
same word, an NEWord
representing the previous word in the sentence, and the
named entity type label found in the data.w
- Represents the same word as the NEWord
being constructed.p
- The previous word in the sentence.type
- The named entity type label for this word from the data.public static void addTokenToSentence(edu.illinois.cs.cogcomp.lbjava.parse.LinkedVector sentence, String token, String tag)
sentence
- the sentence to add the word to.token
- the individual token.tag
- the tag to annotate the word with.public static void addTokenToSentence(edu.illinois.cs.cogcomp.lbjava.parse.LinkedVector sentence, NEWord word)
public ArrayList<NEWord.RealFeature> getLevel1AggregationFeatures()
public ArrayList<NEWord.RealFeature> resetLevel1AggregationFeatures()
public String toString()
String
representation of this word in which the
neLabel
field appears followed by the word's part of speech and finally the form
(i.e., spelling) of the word all surrounded by parentheses.public String[] getAllNonlocalFeatures()
public int getNonLocFeatCount(String nonLocFeat)
public String getPrediction(NEWord.LabelToLookAt labelType)
public void setPrediction(String label, NEWord.LabelToLookAt labelType)
Copyright © 2017. All rights reserved.