public class QuestionToStatementTranslator
extends java.lang.Object
Translate a question to a statement. For example, "where was Obama born?" to "Obama was born in ?".
This class was developed for, and therefore likely performs best on (read: "over-fits gloriously to") the webquestions dataset (http://www-nlp.stanford.edu/software/sempre/). The rules were created based off of the webquestions training set, and tested against the sentences in the QuestionToStatementTranslatorTest. If something fails, please add it to the test when you fix it! If you change something here, please validate it wit the test!
Modifier and Type | Class and Description |
---|---|
static class |
QuestionToStatementTranslator.UnknownTokenMarker |
Constructor and Description |
---|
QuestionToStatementTranslator() |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args) |
java.util.List<java.util.List<CoreLabel>> |
toStatement(java.util.List<CoreLabel> question)
Convert a question to a statement, if possible.
|
public java.util.List<java.util.List<CoreLabel>> toStatement(java.util.List<CoreLabel> question)
question
- The question to convert to a statement.public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException