public class PrepSRLDataReader extends DataReader
ViewNames.SRL_PREP
view using the
preposition roles instead of the original senses (uses the sense2role.csv
map).CANDIDATE, corpusName, dataset, file, logger, viewName
Constructor and Description |
---|
PrepSRLDataReader(String dataDir,
String corpusName) |
Modifier and Type | Method and Description |
---|---|
List<Constituent> |
candidateGenerator(TextAnnotation ta) |
static Set<String> |
getLegalRoles(Constituent predicate) |
static Constituent |
isBigramPrep(TextAnnotation ta,
int tokenId,
String viewName) |
static boolean |
isPrep(TextAnnotation ta,
int tokenId) |
static Constituent |
isTrigramPrep(TextAnnotation ta,
int tokenId,
String viewName) |
void |
preprocess(TextAnnotation ta) |
List<TextAnnotation> |
readData() |
close, getFinalCandidates, next, reset
public void preprocess(TextAnnotation ta) throws AnnotatorException
preprocess
in class DataReader
AnnotatorException
public List<TextAnnotation> readData()
readData
in class DataReader
public List<Constituent> candidateGenerator(TextAnnotation ta)
candidateGenerator
in class DataReader
public static boolean isPrep(TextAnnotation ta, int tokenId)
public static Constituent isBigramPrep(TextAnnotation ta, int tokenId, String viewName)
public static Constituent isTrigramPrep(TextAnnotation ta, int tokenId, String viewName)
public static Set<String> getLegalRoles(Constituent predicate)
Copyright © 2017. All rights reserved.