public class Instance extends Object
| Modifier and Type | Field and Description |
|---|---|
protected HashMap<Integer,Edge> |
goldDependencies
dependent -> head
|
protected HashMap<Integer,HashSet<Integer>> |
reversedDependencies
head -> dependents
|
protected Sentence |
sentence |
| Constructor and Description |
|---|
Instance(Sentence sentence,
HashMap<Integer,Edge> goldDependencies) |
| Modifier and Type | Method and Description |
|---|---|
int |
actionCost(Action action,
int dependency,
State state)
For the cost of an action given the gold dependencies
For more information see:
Yoav Goldberg and Joakim Nivre.
|
HashMap<Integer,Edge> |
getGoldDependencies() |
HashMap<Integer,HashSet<Integer>> |
getReversedDependencies() |
Sentence |
getSentence() |
int |
head(int dependent) |
boolean |
isNonprojective()
Shows whether the tree to train is projective or not
|
boolean |
isPartial(boolean rootFirst) |
String |
relation(int dependent) |
protected HashMap<Integer,HashSet<Integer>> reversedDependencies
protected Sentence sentence
public Sentence getSentence()
public int head(int dependent)
public String relation(int dependent)
public boolean isNonprojective()
public boolean isPartial(boolean rootFirst)
public int actionCost(Action action, int dependency, State state)
action - dependency - state - ExceptionCopyright © 2014–2021 码农场. All rights reserved.