public class XNameTagger extends Object
| Modifier and Type | Field and Description |
|---|---|
HMMannotator |
annotator |
HMM |
nameHMM |
| Constructor and Description |
|---|
XNameTagger(Class emitterClass)
creates a new XNameTagger (with an empty HMM).
|
| Modifier and Type | Method and Description |
|---|---|
void |
load(String fileName)
load an HMM from file
fileName. |
static void |
main(String[] args)
procedures for training and testing the named entity tagger with rescoring.
|
void |
NbestTrainCollection(String testCollection,
String keyCollection)
generate reranking model training data from documents in 'testCollection',
where corresponding NE keys are in 'keyCollection'.
|
void |
scoreCollection(String testCollection,
String keyCollection)
computes the recall/precision of 'testCollection' with respect to
'keyCollection' (which should have the same documents) with respect
to the name annotations in 'tagsToScore'.
|
void |
scoreCollectionWithOracle(String testCollection,
String keyCollection)
computes the recall/precision of 'testCollection' with respect to
'keyCollection' (which should have the same documents) with respect
to the name annotations in 'tagsToScore'.
|
ArrayList |
tag(Document doc,
Span span,
String sentno)
tag span 'span' of Document 'doc' with N-best Named Entity annotations.
|
public HMM nameHMM
public HMMannotator annotator
public XNameTagger(Class emitterClass)
emitterClass - the class of the emitter associated with each state of
the HMM; must be a subclass of HMMemitter.public void load(String fileName) throws IOException
fileName.IOExceptionpublic ArrayList tag(Document doc, Span span, String sentno)
public void scoreCollection(String testCollection, String keyCollection)
public void scoreCollectionWithOracle(String testCollection, String keyCollection)
public static void main(String[] args) throws IOException
IOExceptionpublic void NbestTrainCollection(String testCollection, String keyCollection) throws IOException
IOExceptionCopyright © 2016 New York University. All rights reserved.