|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.illinois.cs.cogcomp.lbj.coref.ir.examples.Example
edu.illinois.cs.cogcomp.lbj.coref.ir.examples.WordExample
public class WordExample
Represents a word in a document, for use in classification or classifier training, along with utility methods for getting information and features pertaining to the word.
| Field Summary | |
|---|---|
protected Doc |
m_doc
The document containing the example word. |
protected int |
m_numWords
The number of words in the document. |
protected int |
m_wordN
The (zero-based) position of the example word in the document. |
| Constructor Summary | |
|---|---|
WordExample()
Constructs an example that does not refer to any word. |
|
WordExample(Doc doc,
int wordNum)
Constructs a word example from a given document and word number. |
|
| Method Summary | |
|---|---|
java.lang.String |
getCasedWord()
Gets the word at the word number plus the offset, without altering original case; Note this does NOT mean that any extra casing is applied here (although it may be applied at the Doc parsing stage). |
java.lang.String |
getCasedWord(int offset)
Gets the word without altering original case; Note this does NOT mean that any extra casing is applied here (although it may be applied at the Doc parsing stage.) |
Doc |
getDoc()
|
java.lang.String |
getPOS()
Gets the part-of-speech (POS) tag of the word represented by this example. |
java.lang.String |
getPOS(int offset)
Gets the part-of-speech (POS) tag of the word at the word number plus the offset. |
java.lang.String |
getWord()
Gets a lowercase version of the word. |
java.lang.String |
getWord(int offset)
Gets a lowercase version of the word at the word number plus the offset, or the empty string if no such word exists. |
java.lang.String |
getWordCase()
Gets a description of the case of the word. |
java.lang.String |
getWordCase(int offset)
Gets a description of the case of the specified word. |
java.lang.String |
getWordCase(java.lang.String word)
Gets a description of the case of the specified word. |
int |
getWordNum()
|
| Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.ir.examples.Example |
|---|
getLabel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Doc m_doc
protected int m_wordN
protected int m_numWords
| Constructor Detail |
|---|
public WordExample()
public WordExample(Doc doc,
int wordNum)
doc - The document containing the example word.wordNum - The (zero-based) position of the word in the document.| Method Detail |
|---|
public Doc getDoc()
public int getWordNum()
public java.lang.String getWord()
public java.lang.String getWord(int offset)
offset - The position relative to the word number
of the desired word.
public java.lang.String getCasedWord()
public java.lang.String getCasedWord(int offset)
offset - The position relative to the word number
of the desired word.
public java.lang.String getPOS()
Doc.getPOS(int)public java.lang.String getPOS(int offset)
offset - The position relative to the word number
of the desired word's POS tag.
Doc.getPOS(int)public java.lang.String getWordCase()
public java.lang.String getWordCase(int offset)
offset - The position relative to the word number
of the specified word.
public java.lang.String getWordCase(java.lang.String word)
word - The specified word.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||