public class AbbreviationAlignment extends AbstractStatisticalTokenDistance
java com.wcohen.ss.AbbreviationAlignment "DNA" "Deoxyribonucleic acid" M |M |M|M | D |N | |A | Deoxyribo|nucleic| |acid| Probability = 3.674595157620664E-6where, the rows of the alignment contain: (1) the states of the Viterbi path in the Alignment-HMM, (2) the short form characters, and (3) the long form characters. The probability of the Viterbi path is also given.
ExtractAbbreviationscollectionSize, documentFrequency, totalTokenCounttokenizer| Constructor and Description |
|---|
AbbreviationAlignment() |
| Modifier and Type | Method and Description |
|---|---|
String |
explainScore(StringWrapper s,
StringWrapper t)
This method needs to be implemented by subclasses.
|
static String[] |
init(String[] argv) |
protected AlignmentPredictionModel |
loadPredictor() |
static void |
main(String[] argv)
Evaluates the probability of the short-form string (string1) being an abbreviation/acronym
of the long-form string (string2).
Usage: AbbreviationAlignment short_form_string long_form_string [train_data_dir] |
double |
score(StringWrapper s,
StringWrapper t)
This method needs to be implemented by subclasses.
|
void |
setTrainDir(String trainDir) |
checkTrainingHasHappened, getDocumentFrequency, tokenIterator, trainasBagOfTokens, prepare, setStringWrapperPooladdExample, doMain, explainScore, getDistance, hasNextQuery, nextQuery, prepare, prepare, score, setDistanceInstancePoolpublic static void main(String[] argv)
public void setTrainDir(String trainDir)
protected AlignmentPredictionModel loadPredictor()
public double score(StringWrapper s, StringWrapper t)
AbstractStringDistancescore in interface StringDistancescore in class AbstractStringDistancepublic String explainScore(StringWrapper s, StringWrapper t)
AbstractStringDistanceexplainScore in interface StringDistanceexplainScore in class AbstractStringDistanceCopyright © 2016. All rights reserved.