public class ScorePhrases<E extends Pattern>
extends java.lang.Object
Constructor and Description |
---|
ScorePhrases(java.util.Properties props,
ConstantsAndVariables cv) |
Modifier and Type | Method and Description |
---|---|
void |
applyPats(Counter<E> patterns,
java.lang.String label,
TwoDimensionalCounter<CandidatePhrase,E> wordsandLemmaPatExtracted,
CollectionValuedMap<E,Triple<java.lang.String,java.lang.Integer,java.lang.Integer>> matchedTokensByPat,
java.util.Set<CandidatePhrase> alreadyLabeledWords) |
Counter<CandidatePhrase> |
chooseTopWords(Counter<CandidatePhrase> newdt,
TwoDimensionalCounter<CandidatePhrase,E> terms,
Counter<CandidatePhrase> useThresholdNumPatternsForTheseWords,
java.util.Set<CandidatePhrase> ignoreWords,
double thresholdWordExtract) |
protected java.util.Map<E,java.util.Map<java.lang.String,DataInstance>> |
getSentences(java.util.Map<E,java.util.Set<java.lang.String>> sentids) |
Counter<CandidatePhrase> |
learnNewPhrases(java.lang.String label,
PatternsForEachToken patternsForEachToken,
Counter<E> patternsLearnedThisIter,
Counter<E> allSelectedPatterns,
CollectionValuedMap<E,Triple<java.lang.String,java.lang.Integer,java.lang.Integer>> tokensMatchedPatterns,
Counter<CandidatePhrase> scoreForAllWordsThisIteration,
TwoDimensionalCounter<CandidatePhrase,E> terms,
TwoDimensionalCounter<CandidatePhrase,E> wordsPatExtracted,
TwoDimensionalCounter<E,CandidatePhrase> patternsAndWords4Label,
java.lang.String identifier,
java.util.Set<CandidatePhrase> ignoreWords) |
static <E,F> void |
removeKeys(TwoDimensionalCounter<E,F> counter,
java.util.Collection<E> removeKeysCollection) |
public ScorePhrases(java.util.Properties props, ConstantsAndVariables cv)
public Counter<CandidatePhrase> chooseTopWords(Counter<CandidatePhrase> newdt, TwoDimensionalCounter<CandidatePhrase,E> terms, Counter<CandidatePhrase> useThresholdNumPatternsForTheseWords, java.util.Set<CandidatePhrase> ignoreWords, double thresholdWordExtract)
public static <E,F> void removeKeys(TwoDimensionalCounter<E,F> counter, java.util.Collection<E> removeKeysCollection)
public Counter<CandidatePhrase> learnNewPhrases(java.lang.String label, PatternsForEachToken patternsForEachToken, Counter<E> patternsLearnedThisIter, Counter<E> allSelectedPatterns, CollectionValuedMap<E,Triple<java.lang.String,java.lang.Integer,java.lang.Integer>> tokensMatchedPatterns, Counter<CandidatePhrase> scoreForAllWordsThisIteration, TwoDimensionalCounter<CandidatePhrase,E> terms, TwoDimensionalCounter<CandidatePhrase,E> wordsPatExtracted, TwoDimensionalCounter<E,CandidatePhrase> patternsAndWords4Label, java.lang.String identifier, java.util.Set<CandidatePhrase> ignoreWords) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
protected java.util.Map<E,java.util.Map<java.lang.String,DataInstance>> getSentences(java.util.Map<E,java.util.Set<java.lang.String>> sentids)
public void applyPats(Counter<E> patterns, java.lang.String label, TwoDimensionalCounter<CandidatePhrase,E> wordsandLemmaPatExtracted, CollectionValuedMap<E,Triple<java.lang.String,java.lang.Integer,java.lang.Integer>> matchedTokensByPat, java.util.Set<CandidatePhrase> alreadyLabeledWords)