public class POSBracketToVector
extends edu.illinois.cs.cogcomp.lbjava.parse.LineByLine
LinkedVector
objects representing
sentences given file names of POS bracket form files to parse. These
files are expected to have one sentence per line, and the format of each
line is as follows: (pos1 spelling1) (pos2 spelling2) ... (posN spellingN)
Constructor and Description |
---|
POSBracketToVector(String file)
Creates the parser.
|
Modifier and Type | Method and Description |
---|---|
Object |
next()
Retrieves the next
LinkedVector from the files being
parsed. |
static edu.illinois.cs.cogcomp.lbjava.parse.LinkedVector |
parsePOSBracketForm(String line)
Given a single line of textual input (containing all and only the words
in a single sentence) in the format shown above, this method parses and
returns a
LinkedVector . |
static Word |
parsePOSBracketForm(String text,
Word previous)
Given textual input in the format shown below, this method parses and
returns the
Word that the text represents. |
public POSBracketToVector(String file)
file
- The file to parse.public Object next()
LinkedVector
from the files being
parsed.public static edu.illinois.cs.cogcomp.lbjava.parse.LinkedVector parsePOSBracketForm(String line)
LinkedVector
.line
- A single line of text.LinkedVector
representing the input text.public static Word parsePOSBracketForm(String text, Word previous)
Word
that the text represents. Expected
format: (pos spelling)
text
- Text representing a word in POS bracket form.previous
- The word that came before this word in the sentence.Word
represented by the input text or
null
if the input does not represent a
Word
.Copyright © 2017. All rights reserved.