|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.nlp.tagger.maxent.TestSentence
Field Summary | |
static int[] |
hPos
|
static boolean[] |
isTag
|
int |
mikeKnown
|
int |
numRight
|
int |
numWrong
|
static LambdaSolve |
prob
|
Constructor Summary | |
TestSentence()
|
|
TestSentence(LambdaSolve prob,
String s)
|
|
TestSentence(LambdaSolve prob,
String[] s,
String[] correctTags,
PrintFile pf,
Dictionary wrongWords)
|
|
TestSentence(LambdaSolve prob,
String[] s,
String[] tags,
String[] correctTags,
PrintFile pf,
Dictionary wrongWords)
|
|
TestSentence(LambdaSolve prob,
String s,
boolean one)
|
|
TestSentence(LambdaSolve prob,
String s,
PrintFile pf)
|
Method Summary | |
void |
addUnknown(Dictionary uDict)
This method should be called after the sentence has been tagged. |
String[] |
append(String[] tags)
|
double[] |
getHistories(History h)
|
double[][][] |
getProbs()
|
double[] |
getScores(History h)
this scores the current assignment in PairsHolder current position h.current |
String |
getTaggedNice()
|
void |
init()
|
void |
init1()
|
static int[] |
intersect(int[] arr1,
int[] arr2)
|
boolean |
known(String w)
|
int |
leftWindow()
|
int |
length()
Implementation of the TagScorer interface follows |
static void |
main(String[] args)
Tags a test sentence. |
void |
printProbs()
|
void |
printTop(PrintFile pfu)
This method should be called after the sentence has been tagged. |
void |
printUnknown(int numSent,
PrintFile pfu)
This method should be called after the sentence has been tagged. |
boolean |
reliable(int current)
|
void |
revert(int prevSize,
int afterSize)
|
int |
rightWindow()
|
double |
scoreOf(int[] tags,
int pos)
|
double[] |
scoresOf(int[] tags,
int pos)
|
String[] |
stringTagsAt(int pos)
|
int[] |
tagsAt(int pos)
|
Sentence |
tagSentence(LambdaSolve prob,
Sentence s)
|
static void |
tagSentenceTagScorer(String[] sent)
tag a sentence using dan's TagScorer interface |
String[] |
test(String outFile)
|
void |
test1(PrintFile pf,
Dictionary wrongWords)
|
void |
testTagInference(PrintFile pf,
Dictionary wrongWords)
test using TagInference |
static String |
toNice(String s)
|
static String |
toSt(String s,
boolean isWord)
|
static int[] |
unite(int[] arr1,
int[] arr2)
|
void |
writeProbs()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static LambdaSolve prob
public static int[] hPos
public static boolean[] isTag
public int numRight
public int numWrong
public int mikeKnown
Constructor Detail |
public TestSentence()
public TestSentence(LambdaSolve prob, String s, PrintFile pf)
public TestSentence(LambdaSolve prob, String s, boolean one)
public TestSentence(LambdaSolve prob, String s)
public TestSentence(LambdaSolve prob, String[] s, String[] correctTags, PrintFile pf, Dictionary wrongWords)
public TestSentence(LambdaSolve prob, String[] s, String[] tags, String[] correctTags, PrintFile pf, Dictionary wrongWords)
Method Detail |
public Sentence tagSentence(LambdaSolve prob, Sentence s)
public void revert(int prevSize, int afterSize)
public void init()
public String getTaggedNice()
public static String toNice(String s)
public static void tagSentenceTagScorer(String[] sent)
public void init1()
public void writeProbs()
public static String toSt(String s, boolean isWord)
public String[] test(String outFile)
public void test1(PrintFile pf, Dictionary wrongWords)
public void testTagInference(PrintFile pf, Dictionary wrongWords)
public boolean known(String w)
public boolean reliable(int current)
public String[] append(String[] tags)
public double[] getScores(History h)
public double[] getHistories(History h)
public static int[] intersect(int[] arr1, int[] arr2)
public static int[] unite(int[] arr1, int[] arr2)
public double[][][] getProbs()
public void printProbs()
public void addUnknown(Dictionary uDict)
public void printUnknown(int numSent, PrintFile pfu)
public void printTop(PrintFile pfu)
public int length()
length
in interface edu.stanford.nlp.tagger.maxent.TagScorer
public int leftWindow()
leftWindow
in interface edu.stanford.nlp.tagger.maxent.TagScorer
public int rightWindow()
rightWindow
in interface edu.stanford.nlp.tagger.maxent.TagScorer
public int[] tagsAt(int pos)
tagsAt
in interface edu.stanford.nlp.tagger.maxent.TagScorer
public String[] stringTagsAt(int pos)
public double scoreOf(int[] tags, int pos)
public double[] scoresOf(int[] tags, int pos)
scoresOf
in interface edu.stanford.nlp.tagger.maxent.TagScorer
public static void main(String[] args)
args
- A single argument giving the filename of the parameter files.
This should be a complete filename for holder file, for example,
~/mine/wsj0-20.holder
, but the program will also use
other files by adding a second extension onto this filename. If
none is provided, a default tagger in /u/nlp/data
is used.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |