|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.illinois.cs.cogcomp.lbj.coref.parsers.EMParser
public class EMParser
Extracts mentions for use in training an LBJ classifier. The mentions are extracted from a corpus of documents specified either by providing a file name containing a list of document filenames. Gets all the mentions in the specified documents,
| Field Summary | |
|---|---|
private java.util.List<Doc> |
m_docs
|
private java.util.List<Mention> |
m_examples
|
private int |
m_iD
|
private int |
m_iX
|
| Constructor Summary | |
|---|---|
EMParser(java.lang.String fileListFN)
Constructs a Parser that extracts mentions for use in training an LBJ classifier. |
|
| Method Summary | |
|---|---|
private void |
advanceDoc()
Prepares to extract mentions from the next document (including resetting the document). |
protected void |
cleanup()
Called immediately before next returns null. |
void |
close()
|
void |
enqueue(java.lang.Object q)
Does nothing |
private java.util.List<Mention> |
getExamples(int iD)
Load all mentions from the current document using Doc.getMentions(). |
private Mention |
getNextExample()
Gets the current mention from the cache and prepares for the next example. |
Mention |
next()
Gets the next mention, or null if no more mentions remain. |
void |
reset()
Resets the parser to the first document in the corpus and resets the position within the (first) document. |
private void |
resetDoc()
Resets the document, including caching the mentions from the current document. |
protected void |
startup(DocLoader loader)
Prepares the parser, by loading documents and resetting. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.List<Doc> m_docs
private java.util.List<Mention> m_examples
private int m_iD
private int m_iX
| Constructor Detail |
|---|
public EMParser(java.lang.String fileListFN)
| Method Detail |
|---|
public Mention next()
next in interface LBJ2.parse.Parserpublic void reset()
reset in interface LBJ2.parse.Parserpublic void close()
close in interface LBJ2.parse.Parserpublic void enqueue(java.lang.Object q)
q - An arbitrary object.private Mention getNextExample()
m_examples is initialized and when m_iX
is less than the size of m_examples
private void advanceDoc()
private void resetDoc()
private java.util.List<Mention> getExamples(int iD)
Doc.getMentions().
Should not be called if the document does not exist.
Doc.getMentions().protected void startup(DocLoader loader)
loader - The loader from which to get the documents.protected void cleanup()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||