edu.stanford.nlp.parser
Interface ViterbiParserWithOptions

All Superinterfaces:
Parser, ViterbiParser
All Known Implementing Classes:
LexicalizedParser

public interface ViterbiParserWithOptions
extends ViterbiParser

The interface for Viterbi parsers with options. Viterbi parsers support getBestParse, which returns a best parse of the input, or null if no parse exists.

Author:
Christopher Manning

Method Summary
 void setOptionFlags(String... flags)
          This will set options to a parser, in a way generally equivalent to passing in the same sequence of command-line arguments.
 
Methods inherited from interface edu.stanford.nlp.parser.ViterbiParser
getBestParse
 
Methods inherited from interface edu.stanford.nlp.parser.Parser
parse, parse
 

Method Detail

setOptionFlags

void setOptionFlags(String... flags)
This will set options to a parser, in a way generally equivalent to passing in the same sequence of command-line arguments. This is a useful convenience method when building a parser programmatically. The options passed in should be specified like command-line arguments, including with an initial minus sign.

Parameters:
flags - Arguments to the parser, for example, {"-outputFormat", "typedDependencies", "-maxLength", "70"}
Throws:
IllegalArgumentException - If an unknown flag is passed in


Stanford NLP Group