ch.uzh.ifi.attempto.acewiki.core
Interface LanguageHandler

All Known Implementing Classes:
AbstractLanguageHandler, ACEHandler, GFHandler, MonolingualHandler

public interface LanguageHandler

This interface represents the language-specific parts of the AceWiki engine.

Author:
Tobias Kuhn

Method Summary
 java.util.List<Sentence> extractSentences(TextContainer tc, PredictiveParser parser)
          Extracts the sentences from a text container and/or a parser state.
 EditorController getEditorController()
          Returns the controller object for the predictive editor.
 java.lang.String getLanguage()
          Returns the language of this language handler.
 LexiconChanger getLexiconChanger(java.lang.String type)
          Returns a lexicon changer object for the given lexical type.
 PredictiveParser getPredictiveParser()
          Returns the predictive parser to be used within the predictive editor.
 SentenceSuggestion getSuggestion(Sentence sentence)
          Returns a suggestion to change a newly created sentence, or null (no suggestion).
 TextOperator getTextOperator()
          Returns the text operator.
 void init(Ontology ontology)
          This is the first method to be called and provides the ontology object.
 

Method Detail

init

void init(Ontology ontology)
This is the first method to be called and provides the ontology object.

Parameters:
ontology - The ontology object.

getTextOperator

TextOperator getTextOperator()
Returns the text operator.

Returns:
The text operator.

getLanguage

java.lang.String getLanguage()
Returns the language of this language handler. Null can be returned for monolingual engines.

Returns:
The name of the language or null.

extractSentences

java.util.List<Sentence> extractSentences(TextContainer tc,
                                          PredictiveParser parser)
Extracts the sentences from a text container and/or a parser state.

Parameters:
tc - The text container.
parser - The parser object with the parsed text.
Returns:
A list of sentences.

getPredictiveParser

PredictiveParser getPredictiveParser()
Returns the predictive parser to be used within the predictive editor.

Returns:
The predictive parser.

getEditorController

EditorController getEditorController()
Returns the controller object for the predictive editor.

Returns:
The editor controller.

getLexiconChanger

LexiconChanger getLexiconChanger(java.lang.String type)
Returns a lexicon changer object for the given lexical type.

Parameters:
type - The lexical type.
Returns:
A lexicon changer object.

getSuggestion

SentenceSuggestion getSuggestion(Sentence sentence)
Returns a suggestion to change a newly created sentence, or null (no suggestion).

Parameters:
sentence - The newly created sentence.
Returns:
A suggestion to change the sentence or null.


Copyright 2008-2012, AceWiki developers