modnlp.tc.parser
public class Parser extends java.lang.Object
parse()
method will tipically b overridden.NewsParser
,
LingspamEmailParser
Constructor and Description |
---|
Parser()
Create a new
Parser instance. |
Modifier and Type | Method and Description |
---|---|
ParsedCorpus |
getParsedCorpus()
Get parsed corpus, parsing filename if necessary
|
void |
parse()
Process ('parse') input file
filename and add its
contents literally to parsedCorpus wih ID and category =
filename . |
void |
setFilename(java.lang.String fn)
Set name of file to be parsed
|
public Parser()
Parser
instance. This will usually be
followed by a call to setFilename(). This constructor takes no
parameters so that the class can be loaded and instantiated
dynamically (as a plugin) by MakeProbabilityModel etc.MakeProbabilityModel
public void setFilename(java.lang.String fn)
public ParsedCorpus getParsedCorpus()
public void parse()
filename
and add its
contents literally to parsedCorpus wih ID and category =
filename
. This method isn't likely to be very
useful, so subclasses will tipically override it
(e.g. NewsParser).NewsParser