edu.stanford.nlp.ie.pascal
Class AcronymModel
java.lang.Object
edu.stanford.nlp.ie.pascal.AcronymModel
- All Implemented Interfaces:
- RelationalModel
public class AcronymModel
- extends Object
- implements RelationalModel
Scores Pascal challenge workshop information templates.
This score reflects which fields are present/absent, how well acronyms
agree with the names and URLs they correspond to.
- Author:
- Jamie Nicolson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AcronymModel
public AcronymModel()
throws IOException
- Throws:
IOException
- if the acronym statistics/weights can't be read from file.
computeProb
public double computeProb(InfoTemplate temp)
- Scores the partial template containing only the fields relevant to the score.
- Parameters:
temp
- the InfoTemplate
to be scored.
- Returns:
- the model's score
computeProb
public double computeProb(PascalTemplate temp)
- Scores the
PascalTemplate
using the fields it contains which are relevant to the score.
(Ignores location and date fields.)
- Specified by:
computeProb
in interface RelationalModel
- Parameters:
temp
- the full PascalTemplate
to be scored
- Returns:
- the model's score
URLSimilarity
public static double URLSimilarity(String URL,
String acronym)
similarity
public double similarity(String name,
String acronym)
- Returns:
- the "rich similarity" score
naiveSimilarity
public double naiveSimilarity(String name,
String acronym)
- Returns:
- the "naive similarity" score
HearstSimilarity
public double HearstSimilarity(String name,
String acronym)
- Returns:
- the Hearst similarity score
stripAcronym
public static char[] stripAcronym(String acronym)
RichSimilarity
public double RichSimilarity(String name,
String acronym)
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Stanford NLP Group