AnnotatedTree.Layer.EnglishPropbankLayer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of AnnotatedTree Show documentation
Show all versions of AnnotatedTree Show documentation
Annotated constituency treebank library
package AnnotatedTree.Layer;
import PropBank.Argument;
import java.util.ArrayList;
public class EnglishPropbankLayer extends SingleWordMultiItemLayer{
/**
* Constructor for the propbank layer for English language.
* @param layerValue Value for the English propbank layer.
*/
public EnglishPropbankLayer(String layerValue) {
layerName = "englishPropbank";
setLayerValue(layerValue);
}
/**
* Sets the value for the propbank layer in a node. Value may consist of multiple propbank information separated via
* '#' character. Each propbank value consists of argumentType and id info separated via '$' character.
* @param layerValue New layer info
*/
public void setLayerValue(String layerValue){
items = new ArrayList<>();
this.layerValue = layerValue;
if (layerValue != null){
String[] splitWords = layerValue.split("#");
for (String word:splitWords){
items.add(new Argument(word));
}
}
}
}