annotation
Class MatchingStrategy
java.lang.Object
annotation.MatchingStrategy
public class MatchingStrategy
- extends java.lang.Object
Responsible for computing similarity of context and gloss
- Author:
- Mateusz Kopec
|
Constructor Summary |
MatchingStrategy(java.util.Map<java.lang.String,Gloss> preprocessedGlosses,
java.lang.String params)
|
|
Method Summary |
double |
computeSimilarity(java.util.Map<java.lang.String,java.lang.Double> contextVector,
java.lang.String senseId)
Computes the similarity between context vector and chosen sense |
java.util.Map<java.lang.String,java.lang.Double> |
prepareContextVector(Context preprocessedContext)
Creates vector of context |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MatchingStrategy
public MatchingStrategy(java.util.Map<java.lang.String,Gloss> preprocessedGlosses,
java.lang.String params)
throws java.lang.Exception
- Throws:
java.lang.Exception
prepareContextVector
public java.util.Map<java.lang.String,java.lang.Double> prepareContextVector(Context preprocessedContext)
- Creates vector of context
- Parameters:
preprocessedContext - context to create vector from
- Returns:
- vector: word -> value
computeSimilarity
public double computeSimilarity(java.util.Map<java.lang.String,java.lang.Double> contextVector,
java.lang.String senseId)
- Computes the similarity between context vector and chosen sense
- Parameters:
contextVector - vectorsenseId - id of chosen sense
- Returns:
- similarity value