edu.stanford.nlp.ie.pascal
Class AcronymModel

java.lang.Object
  extended by 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

Nested Class Summary
static class AcronymModel.AfterAligned
          Percent of letters aligned immediately after another aligned letter.
static class AcronymModel.AlignedPerWord
          Average number of aligned letters per word.
static class AcronymModel.BegWord
           
static class AcronymModel.EndWord
           
static interface AcronymModel.Feature
           
static class AcronymModel.LettersAligned
           
static class AcronymModel.SyllableBoundary
           
static class AcronymModel.WordsSkipped
           
 
Constructor Summary
AcronymModel()
           
 
Method Summary
 double computeProb(InfoTemplate temp)
          Scores the partial template containing only the fields relevant to the score.
 double computeProb(PascalTemplate temp)
          Scores the PascalTemplate using the fields it contains which are relevant to the score.
 double HearstSimilarity(String name, String acronym)
           
static void main(String[] args)
           
 double naiveSimilarity(String name, String acronym)
           
 double RichSimilarity(String name, String acronym)
           
 double similarity(String name, String acronym)
           
static char[] stripAcronym(String acronym)
           
static double URLSimilarity(String URL, String acronym)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AcronymModel

public AcronymModel()
             throws IOException
Throws:
IOException - if the acronym statistics/weights can't be read from file.
Method Detail

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