Class SyntaxDiagnoseImpl
java.lang.Object
|
+--SyntaxDiagnoseImpl
- All Implemented Interfaces:
- SyntaxDiagnose
- public class SyntaxDiagnoseImpl
- extends java.lang.Object
- implements SyntaxDiagnose
Dummy implementation of interface SyntaxDiagnose
for communicating with the CDG-Parser
Method Summary |
void |
analyze(java.lang.String sentence)
Analyzes the german natural language user input
for grammatical correctness |
Explanation |
explanation()
Gives an explanation for incorrect sentences |
boolean |
isCorrect()
The natural language sentence input by the user was correct |
double |
quality()
evaluation of the quality of an input sentence |
java.util.TreeMap |
syntaxTree()
Returns syntax tree generated by the CDG-Parser |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
sentence
private java.lang.String sentence
syntaxTree
private java.util.TreeMap syntaxTree
explanation
private Explanation explanation
quality
private double quality
SATZ1
private final java.lang.String SATZ1
SATZ2
private final java.lang.String SATZ2
SATZ3
private final java.lang.String SATZ3
SATZ4
private final java.lang.String SATZ4
SyntaxDiagnoseImpl
public SyntaxDiagnoseImpl()
analyze
public void analyze(java.lang.String sentence)
- Analyzes the german natural language user input
for grammatical correctness
- Specified by:
analyze
in interface SyntaxDiagnose
- Parameters:
sentence
- the sentence input by user
isCorrect
public boolean isCorrect()
- The natural language sentence input by the user was correct
- Specified by:
isCorrect
in interface SyntaxDiagnose
- Returns:
- the centence was correct
explanation
public Explanation explanation()
- Gives an explanation for incorrect sentences
- Specified by:
explanation
in interface SyntaxDiagnose
- Returns:
- explanation of the error
syntaxTree
public java.util.TreeMap syntaxTree()
- Returns syntax tree generated by the CDG-Parser
- Specified by:
syntaxTree
in interface SyntaxDiagnose
- Returns:
- the syntax tree generated by the CDG-Parser
quality
public double quality()
- evaluation of the quality of an input sentence
- Specified by:
quality
in interface SyntaxDiagnose
- Returns:
- quality of input sentence - 0.0 if sentence was correct