|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.mit.jwi.data.parse.DataLineParser
public class DataLineParser
Parser for Wordnet data files (e.g., data.adv
or
adv.dat
). This parser produces an ISynset
object.
This class follows a singleton design pattern, and is not intended to be
instantiated directly; rather, call the getInstance()
method to get
the singleton instance.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface edu.mit.jwi.data.parse.ILineParser |
---|
ILineParser.MisformattedLineException |
Constructor Summary | |
---|---|
protected |
DataLineParser()
This constructor is marked protected so that the class may be sub-classed, but not directly instantiated. |
Method Summary | |
---|---|
static DataLineParser |
getInstance()
Returns the singleton instance of this class, instantiating it if necessary. |
ISynset |
parseLine(java.lang.String line)
Given the line of data, this method produces an object of class T . |
protected ILexFile |
resolveLexicalFile(int lexFileNum)
Retrieves the lexical file objects for the parseLine(String)
method. |
protected IPointer |
resolvePointer(java.lang.String symbol,
POS pos)
Retrieves the pointer objects for the parseLine(String) method. |
protected IVerbFrame |
resolveVerbFrame(int frameNum)
Retrieves the verb frames for the parseLine(String) method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DataLineParser()
getInstance()
method.
Method Detail |
---|
public static DataLineParser getInstance()
null
.
null
singleton instance of this class,
instantiating it if necessary.public ISynset parseLine(java.lang.String line)
ILineParser
T
.
parseLine
in interface ILineParser<ISynset>
line
- the line to be parsed
protected IVerbFrame resolveVerbFrame(int frameNum)
Retrieves the verb frames for the parseLine(String)
method.
This is implemented in its own method for ease of subclassing.
frameNum
- the number of the frame to return
null
if there is noneprotected ILexFile resolveLexicalFile(int lexFileNum)
Retrieves the lexical file objects for the parseLine(String)
method. If the lexical file number does correspond to a known lexical
file, the method returns a singleton placeholder 'unknown' lexical file
object.
This is implemented in its own method for ease of subclassing.
lexFileNum
- the number of the lexical file to return
protected IPointer resolvePointer(java.lang.String symbol, POS pos)
Retrieves the pointer objects for the parseLine(String)
method.
This is implemented in its own method for ease of subclassing.
symbol
- the symbol of the pointer to returnpos
- the part of speech of the pointer to return, can be
null
unless the pointer symbol is ambiguous
java.lang.NullPointerException
- if the symbol is null
java.lang.IllegalArgumentException
- if the symbol and part of speech combination does not
correspond to a known pointer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |