ch.uzh.ifi.attempto.acewiki.gf
Class GFHandler

java.lang.Object
  extended by ch.uzh.ifi.attempto.acewiki.core.AbstractLanguageHandler
      extended by ch.uzh.ifi.attempto.acewiki.gf.GFHandler
All Implemented Interfaces:
LanguageHandler

public class GFHandler
extends AbstractLanguageHandler

This is a language handler for languages written in GF.

Author:
Tobias Kuhn

Constructor Summary
GFHandler(java.lang.String language, GFGrammar gfGrammar)
          Creates a new GF handler for the given language.
 
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.
 PredictiveParser getPredictiveParser()
          Returns the predictive parser to be used within the predictive editor.
 TextOperator getTextOperator()
          Returns the text operator.
 void init(Ontology ontology)
          This is the first method to be called and provides the ontology object.
 
Methods inherited from class ch.uzh.ifi.attempto.acewiki.core.AbstractLanguageHandler
getLexiconChanger, getSuggestion, setLexiconChanger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GFHandler

public GFHandler(java.lang.String language,
                 GFGrammar gfGrammar)
Creates a new GF handler for the given language.

Parameters:
language - The name of the language.
gfGrammar - The grammar object.
Method Detail

getLanguage

public java.lang.String getLanguage()
Description copied from interface: LanguageHandler
Returns the language of this language handler. Null can be returned for monolingual engines.

Returns:
The name of the language or null.

init

public void init(Ontology ontology)
Description copied from interface: LanguageHandler
This is the first method to be called and provides the ontology object.

Parameters:
ontology - The ontology object.

getTextOperator

public TextOperator getTextOperator()
Description copied from interface: LanguageHandler
Returns the text operator.

Returns:
The text operator.

extractSentences

public java.util.List<Sentence> extractSentences(TextContainer tc,
                                                 PredictiveParser parser)
Description copied from interface: LanguageHandler
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

public PredictiveParser getPredictiveParser()
Description copied from interface: LanguageHandler
Returns the predictive parser to be used within the predictive editor.

Returns:
The predictive parser.

getEditorController

public EditorController getEditorController()
Description copied from interface: LanguageHandler
Returns the controller object for the predictive editor.

Returns:
The editor controller.


Copyright 2008-2012, AceWiki developers