public class OnePairPerLinePrimingTest extends AbstractWordPrimingTest
WordPrimingTest that extracts priming pairs from a text
file. This text file should have one line for each priming pair where the
first the two words are separated by white space. The first word is the
priming cue. The second word is the priming target. This class computes
priming strength by using the cosine similarity between semantic vectors.AbstractWordPrimingTestAbstractWordPrimingTest.SimpleWordPrimingReportprimeTargetPairs| Constructor and Description |
|---|
OnePairPerLinePrimingTest(File testPairFile)
Creates a new
OnePairPerLinePrimingTest from a File. |
OnePairPerLinePrimingTest(String testPairFileName)
Creates a new
OnePairPerLinePrimingTest from a string containing
a file name. |
| Modifier and Type | Method and Description |
|---|---|
protected Double |
computePriming(SemanticSpace sspace,
String word1,
String word2)
Returns the association of the two words on a scale of 0 to 1.
|
static Set<Pair<String>> |
prepareRelationMap(File testPairFile)
Returns a set of prime, target word pairs that are extracted from a text
file.
|
String |
toString() |
evaluatepublic OnePairPerLinePrimingTest(String testPairFileName)
OnePairPerLinePrimingTest from a string containing
a file name.public OnePairPerLinePrimingTest(File testPairFile)
OnePairPerLinePrimingTest from a File.public static Set<Pair<String>> prepareRelationMap(File testPairFile)
protected Double computePriming(SemanticSpace sspace, String word1, String word2)
computePriming in class AbstractWordPrimingTestword1 and word2Copyright © 2012. All Rights Reserved.