|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsem.graphreader.RaspGraphReader
public class RaspGraphReader
Graph reader for the default RASP format.
The RASP toolkit: http://ilexir.co.uk/2011/open-source-rasp-release/
The small files were parsed with:
./rasp.sh -m -p'-ogi -n10'
The large file was parsed with:
./rasp.sh -m -p'-og'
Field Summary | |
---|---|
static java.util.List<java.lang.String> |
grsWithInitialGr
|
static java.util.List<java.lang.String> |
grsWithSubtype
|
Constructor Summary | |
---|---|
RaspGraphReader(java.lang.String inputPath,
boolean getAllParses)
|
Method Summary | |
---|---|
void |
close()
Close the reader. |
boolean |
hasNext()
Check whether there are more graphs available. |
static void |
main(java.lang.String[] args)
|
Graph |
next()
Get the next graph from the corpus. |
java.util.ArrayList<Graph> |
nextSentence()
Read a sentence from the corpus. |
static java.util.LinkedHashMap<java.lang.String,java.lang.String> |
parseGr(java.lang.String line,
boolean simpleEdgeFormat)
Parses a line that represents a GR and return a LinkedHashMap with the arguments. |
static java.util.LinkedHashMap<java.lang.String,java.lang.String> |
parseLabel(java.lang.String label)
Parses a string that represents a token/lemma. |
void |
reset()
Reset the whole reading process to the beginning. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.util.List<java.lang.String> grsWithSubtype
public static java.util.List<java.lang.String> grsWithInitialGr
Constructor Detail |
---|
public RaspGraphReader(java.lang.String inputPath, boolean getAllParses) throws GraphFormatException
GraphFormatException
Method Detail |
---|
public static java.util.LinkedHashMap<java.lang.String,java.lang.String> parseLabel(java.lang.String label) throws GraphFormatException
label
-
GraphFormatException
public static java.util.LinkedHashMap<java.lang.String,java.lang.String> parseGr(java.lang.String line, boolean simpleEdgeFormat) throws GraphFormatException
line
-
GraphFormatException
public boolean hasNext()
hasNext
in interface GraphReader
public Graph next() throws GraphFormatException
next
in interface GraphReader
GraphFormatException
public java.util.ArrayList<Graph> nextSentence() throws GraphFormatException
nextSentence
in interface GraphReader
GraphFormatException
public void reset() throws GraphFormatException
reset
in interface GraphReader
GraphFormatException
public void close()
close
in interface GraphReader
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |