gov.llnl.ontology.text.parse
Interface Parser

All Known Implementing Classes:
MaltLinearParser, MaltParser, MaltSvmParser, StanfordParser

public interface Parser

An interface for building dependency parse trees from raw text.

Author:
Keith Stevens

Method Summary
 String parseText(String header, String document)
          Returns a dependency parse tree formatted in the default CoNLL format.
 String parseText(String header, StringPair[] sentence)
          Returns a dependency parse tree formatted in the default CoNLL format.
 

Method Detail

parseText

String parseText(String header,
                 String document)
Returns a dependency parse tree formatted in the default CoNLL format. The returned string may represent multiple parse tress, espeically if the given document contains multiple sentences. Each parse tree will be padded with new lines. If header is not null, then it will be first line of each parse tree, otherwise only padded parse trees will be returned.

Parameters:
header - The header text that should label each parsed tree
document - The raw text to be parsed

parseText

String parseText(String header,
                 StringPair[] sentence)
Returns a dependency parse tree formatted in the default CoNLL format. The returned string will contain only one parse tree If header is not null, then it will be first line of the parse tree, otherwise only the parse tree will be returned.

Parameters:
header - The header text that should label each parsed tree
sentence - The part of speech tagged words in a sentence.


Copyright © 2010-2011. All Rights Reserved.