public class Configuration extends Object
Constructor and Description |
---|
Configuration(Configuration config) |
Configuration(CoreMap sentence) |
Modifier and Type | Method and Description |
---|---|
void |
addArc(int h,
int t,
String l) |
int |
getBuffer(int k)
Get the sentence index of the kth word on the buffer.
|
int |
getBufferSize() |
List<CoreLabel> |
getCoreLabels() |
int |
getHead(int k) |
String |
getLabel(int k) |
int |
getLeftChild(int k) |
int |
getLeftChild(int k,
int cnt) |
String |
getLeftLabelSet(int k) |
int |
getLeftValency(int k) |
String |
getPOS(int k) |
int |
getRightChild(int k) |
int |
getRightChild(int k,
int cnt) |
String |
getRightLabelSet(int k) |
int |
getRightValency(int k) |
int |
getSentenceSize() |
int |
getStack(int k)
Get the sentence index of the kth word on the stack.
|
int |
getStackSize() |
String |
getStr() |
String |
getWord(int k) |
boolean |
hasOtherChild(int k,
edu.stanford.nlp.parser.nndep.DependencyTree goldTree) |
boolean |
removeSecondTopStack() |
boolean |
removeTopStack() |
boolean |
shift() |
public Configuration(Configuration config)
public Configuration(CoreMap sentence)
public boolean shift()
public boolean removeSecondTopStack()
public boolean removeTopStack()
public int getStackSize()
public int getBufferSize()
public int getSentenceSize()
public int getHead(int k)
k
- Word index (zero = root node; actual word indexing
begins at 1)public String getLabel(int k)
k
- Word index (zero = root node; actual word indexing
begins at 1)public int getStack(int k)
Config.NONEXIST
if stack doesn't
have an element at this indexpublic int getBuffer(int k)
Config.NONEXIST
if stack doesn't
have an element at this indexpublic String getWord(int k)
k
- Word index (zero = root node; actual word indexing
begins at 1)public String getPOS(int k)
k
- Word index (zero = root node; actual word indexing
begins at 1)public void addArc(int h, int t, String l)
h
- Word index of governor (zero = root node; actual word
indexing begins at 1)t
- Word index of dependent (zero = root node; actual word
indexing begins at 1)l
- Arc labelpublic int getLeftChild(int k, int cnt)
public int getLeftChild(int k)
public int getRightChild(int k, int cnt)
public int getRightChild(int k)
public boolean hasOtherChild(int k, edu.stanford.nlp.parser.nndep.DependencyTree goldTree)
public int getLeftValency(int k)
public int getRightValency(int k)
public String getLeftLabelSet(int k)
public String getRightLabelSet(int k)
public String getStr()