|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Tree analyser can analyse a parse tree and resolute the importance and role of single words, detect role of the actors in this sentence and detect the action type of the sentence.
This analysis uses output from linguistic tools. Implementations of this interface may use different rules and tools for the analysis.
Analysis methods return a new Semantics object. This object contains the detected type of step, words of the sentence with their detected roles and additional optional information. Posible step types and what can you expect to be in the semantics follows.
REQUEST_RECEIVED:
Subject refers to an actor, different from SuD. Its name in the sentence will
be marked as SUBJECT. Main verb is marked as VERB, representative object words
as REPRESENTATIVE_OBJECT, others as NOT_IMPORTANT.
REQUEST_SENT:
Subject refers to SuD (marked as SUBJECT), indirect object refers to an actor
and its name is marked as INDIRECT_OBJECT. Main verb is marked as VERB,
representative object words as REPRESENTATIVE_OBJECT, others as NOT_IMPORTANT.
INTERNAL_ACTION:
Subject refers to SuD (marked as SUBJECT). Main verb is marked as VERB,
representative object words as REPRESENTATIVE_OBJECT, others as NOT_IMPORTANT.
GOTO:
Verb is marked as VERB, target step label is marked as GOTO_TARGET.
ABORT:
Verb (abort) is marked as VERB, subject (use case) is marked as SUBJECT, if present.
TERMINATE_USECASE:
Verb (end, terminate) is marked as VERB, subject (use case) is marked as SUBJECT,
if present.
TERMINATE_BRANCH:
Verb (end, terminate) is marked as VERB, subject (extension, variation) is marked
as SUBJECT.
CONDITION:
Important words are marked as CONDITION_LABEL.
In future, there may be another possibility (in addition) as follows:
Subject is set, and refers to actor that triggers the condition. Its name in the
sentence is marked as SUBJECT. Main verb is marked as verb, and for condition token
it should be turned into passive voice. Other important words are
marked as CONDITION_LABEL.
Method Summary | |
Semantics |
analyseCondition(java.lang.String parseTree)
Analyses the given parse tree as a condition. |
Semantics |
analyseStep(java.lang.String parseTree)
Analyses the given parse tree as a use case step. |
Semantics |
minimalSemantics(java.lang.String parseTree)
Creates a Semantics object for the sentence. |
void |
setProject(Project p)
Sets active project. |
void |
setUseCase(UseCase uc)
Sets active use case, that will be used to gather actor information from. |
Method Detail |
public void setProject(Project p)
p
- the project to be setpublic void setUseCase(UseCase uc)
uc
- the use case to be setpublic Semantics analyseStep(java.lang.String parseTree) throws cz.cuni.mff.procasor.treeAnalyser.InvalidParseTreeException, cz.cuni.mff.procasor.treeAnalyser.AnalyserNotReadyException, cz.cuni.mff.procasor.treeAnalyser.AnalysisFailedException
parseTree
- Parse tree of the sentence to analyse
cz.cuni.mff.procasor.treeAnalyser.InvalidParseTreeException
- when supplied parse tree is not valid
cz.cuni.mff.procasor.treeAnalyser.AnalyserNotReadyException
- when use case or project information wasn't supplied
cz.cuni.mff.procasor.treeAnalyser.AnalysisFailedException
- when tree analysis is not successfulpublic Semantics analyseCondition(java.lang.String parseTree) throws cz.cuni.mff.procasor.treeAnalyser.InvalidParseTreeException, cz.cuni.mff.procasor.treeAnalyser.AnalyserNotReadyException, cz.cuni.mff.procasor.treeAnalyser.AnalysisFailedException
parseTree
- Parse tree of the sentence/fragment to analyse
cz.cuni.mff.procasor.treeAnalyser.InvalidParseTreeException
- when supplied parse tree is not valid
cz.cuni.mff.procasor.treeAnalyser.AnalyserNotReadyException
- when use case or project information wasn't supplied
cz.cuni.mff.procasor.treeAnalyser.AnalysisFailedException
- when tree analysis is not successfulpublic Semantics minimalSemantics(java.lang.String parseTree) throws cz.cuni.mff.procasor.treeAnalyser.InvalidParseTreeException
parseTree
- Parse tree of the sentence
cz.cuni.mff.procasor.treeAnalyser.InvalidParseTreeException
- when supplied parse tree is not valid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |