|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object se.lth.cs.nlp.nlputils.deptree.ImportMalt
public class ImportMalt
Factory class that reads a dependency graph encoded in the MALT-XML format.
Method Summary | |
---|---|
static void |
handleGraphs(InputSource is,
Procedure<DepGraph> callback)
Reads dependency graphs from an InputSource and calls a callback for each graph. |
static void |
handleGraphsFromFile(String fn,
Procedure<DepGraph> callback)
Reads dependency graphs from a file and calls a callback for each graph. |
static List<DepGraph> |
importGraphsFromFile(String fn)
Returns a list of dependency graphs read from a file. |
static List<DepGraph> |
importGraphsFromString(String s)
Returns a list of dependency graphs given an XML string. |
static void |
main(String[] argv)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static List<DepGraph> importGraphsFromString(String s) throws SAXException
s
- the XML string.
SAXException
- if the XML is invalid.public static List<DepGraph> importGraphsFromFile(String fn) throws SAXException, IOException
fn
- the file name.
SAXException
- if the XML is invalid.
IOException
- if there was an IO problem.public static void handleGraphs(InputSource is, Procedure<DepGraph> callback) throws SAXException, IOException
is
- the input source.callback
- the callback.
SAXException
- if the XML was invalid.
IOException
- if there was an IO problem.public static void handleGraphsFromFile(String fn, Procedure<DepGraph> callback) throws IOException, SAXException
fn
- the file.callback
- the callback.
SAXException
- if the XML was invalid.
IOException
- if there was an IO problem.public static void main(String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |