public class TermAssociationFinder extends Object implements Iterable<Map.Entry<Pair<String>,Double>>, Serializable
Constructor and Description |
---|
TermAssociationFinder(SignificanceTest test)
Creates a new
TermAssociationFinder using the specified test,
which will only record associations between all terms that appear
together in the same context. |
TermAssociationFinder(SignificanceTest test,
Set<String> leftTerms,
Set<String> rightTerms)
Creates a new
TermAssociationFinder using the specified test,
which will only record associations between two terms t1 and t2 if leftTerms.contains(t1) and rightTerms.contains(t2) or the
commutative equivalent. |
Modifier and Type | Method and Description |
---|---|
void |
addContext(Set<String> tokens) |
double |
getAssociationScore(String t1,
String t2) |
SignificanceTest |
getTest() |
Iterator<Map.Entry<Pair<String>,Double>> |
iterator()
Returns an iterator over all the bigram pairs with their corresponding
association scores
|
void |
setTest(SignificanceTest test) |
public TermAssociationFinder(SignificanceTest test)
TermAssociationFinder
using the specified test,
which will only record associations between all terms that appear
together in the same context.public TermAssociationFinder(SignificanceTest test, Set<String> leftTerms, Set<String> rightTerms)
TermAssociationFinder
using the specified test,
which will only record associations between two terms t1 and t2 if leftTerms.contains(t1)
and rightTerms.contains(t2)
or the
commutative equivalent.public Iterator<Map.Entry<Pair<String>,Double>> iterator()
public SignificanceTest getTest()
public void setTest(SignificanceTest test)
Copyright © 2012. All Rights Reserved.