public class ExtractPhraseFromPattern
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.List<java.lang.String> |
cutoffRelations |
static java.util.ArrayList<java.lang.String> |
cutoffTags |
static java.util.List<java.lang.String> |
ignoreTags |
int |
maxDepth |
int |
maxPhraseLength |
Constructor and Description |
---|
ExtractPhraseFromPattern() |
ExtractPhraseFromPattern(boolean ignoreCommonTags,
int maxPhraseLength) |
Modifier and Type | Method and Description |
---|---|
static java.util.Set<IndexedWord> |
descendants(SemanticGraph g,
IndexedWord vertex,
java.util.List<java.lang.String> allCutOffRels,
java.util.List<IndexedWord> doNotAddThese,
boolean ignoreCommonTags,
java.util.function.Predicate<CoreLabel> acceptWord,
CollectionValuedMap<java.lang.Integer,java.lang.String> feat) |
java.util.Set<IndexedWord> |
getSemGrexPatternNodes(SemanticGraph g,
java.util.List<java.lang.String> tokens,
java.util.Collection<java.lang.String> outputNodes,
java.util.Collection<IntPair> outputIndices,
SemgrexPattern pattern,
boolean findSubTrees,
java.util.Collection<ExtractedPhrase> extractedPhrases,
boolean lowercase,
java.util.function.Predicate<CoreLabel> acceptWord) |
void |
printMatchedGraphsForPattern(java.lang.String filename,
int maxGraphsPerPattern) |
void |
printSubGraph(SemanticGraph g,
IndexedWord w,
java.util.List<java.lang.String> additionalCutOffRels,
java.util.List<java.lang.String> textTokens,
java.util.Collection<java.lang.String> listOfOutput,
java.util.Collection<IntPair> listOfOutputIndices,
java.util.List<IndexedWord> seenNodes,
java.util.List<IndexedWord> doNotAddThese,
boolean findSubTrees,
java.util.Collection<ExtractedPhrase> extractedPhrases,
SemgrexPattern pattern,
java.util.function.Predicate<CoreLabel> acceptWord) |
void |
processSentenceForType(SemanticGraph g,
java.util.List<SemgrexPattern> typePatterns,
java.util.List<java.lang.String> textTokens,
java.util.Collection<java.lang.String> typePhrases,
java.util.Collection<IntPair> typeIndices,
java.util.Collection<IndexedWord> typeTriggerWords,
boolean findSubTrees,
java.util.Collection<ExtractedPhrase> extractedPhrases,
boolean lowercase) |
void |
setMaxPhraseLength(int maxPhraseLength) |
public java.util.List<java.lang.String> cutoffRelations
public int maxDepth
public static java.util.List<java.lang.String> ignoreTags
public static java.util.ArrayList<java.lang.String> cutoffTags
public int maxPhraseLength
public ExtractPhraseFromPattern()
public ExtractPhraseFromPattern(boolean ignoreCommonTags, int maxPhraseLength)
public void setMaxPhraseLength(int maxPhraseLength)
public void processSentenceForType(SemanticGraph g, java.util.List<SemgrexPattern> typePatterns, java.util.List<java.lang.String> textTokens, java.util.Collection<java.lang.String> typePhrases, java.util.Collection<IntPair> typeIndices, java.util.Collection<IndexedWord> typeTriggerWords, boolean findSubTrees, java.util.Collection<ExtractedPhrase> extractedPhrases, boolean lowercase)
public java.util.Set<IndexedWord> getSemGrexPatternNodes(SemanticGraph g, java.util.List<java.lang.String> tokens, java.util.Collection<java.lang.String> outputNodes, java.util.Collection<IntPair> outputIndices, SemgrexPattern pattern, boolean findSubTrees, java.util.Collection<ExtractedPhrase> extractedPhrases, boolean lowercase, java.util.function.Predicate<CoreLabel> acceptWord)
public void printSubGraph(SemanticGraph g, IndexedWord w, java.util.List<java.lang.String> additionalCutOffRels, java.util.List<java.lang.String> textTokens, java.util.Collection<java.lang.String> listOfOutput, java.util.Collection<IntPair> listOfOutputIndices, java.util.List<IndexedWord> seenNodes, java.util.List<IndexedWord> doNotAddThese, boolean findSubTrees, java.util.Collection<ExtractedPhrase> extractedPhrases, SemgrexPattern pattern, java.util.function.Predicate<CoreLabel> acceptWord)
public static java.util.Set<IndexedWord> descendants(SemanticGraph g, IndexedWord vertex, java.util.List<java.lang.String> allCutOffRels, java.util.List<IndexedWord> doNotAddThese, boolean ignoreCommonTags, java.util.function.Predicate<CoreLabel> acceptWord, CollectionValuedMap<java.lang.Integer,java.lang.String> feat) throws java.lang.Exception
java.lang.Exception
public void printMatchedGraphsForPattern(java.lang.String filename, int maxGraphsPerPattern) throws java.lang.Exception
java.lang.Exception