ch.uzh.ifi.attempto.acewiki.aceowl
Class ACETextOperator

java.lang.Object
  extended by ch.uzh.ifi.attempto.base.DefaultTextOperator
      extended by ch.uzh.ifi.attempto.acewiki.aceowl.ACETextOperator
All Implemented Interfaces:
TextOperator

public class ACETextOperator
extends DefaultTextOperator

This is the text operator used for the ACE/OWL language engine for AceWiki.

Author:
Tobias Kuhn

Constructor Summary
ACETextOperator(Ontology ontology)
          Creates a new text operator.
 
Method Summary
 TextElement createTextElement(java.lang.String text)
          This method should create a text element for the given text.
 java.lang.String getTextInContext(TextElement textElement, java.lang.String preceding, java.lang.String following)
          This method checks the context of a text element and can do small surface adaptations of a token according to the surrounding text.
 
Methods inherited from class ch.uzh.ifi.attempto.base.DefaultTextOperator
getGlue, splitIntoTokens
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ACETextOperator

public ACETextOperator(Ontology ontology)
Creates a new text operator.

Parameters:
ontology - The ontology object.
Method Detail

createTextElement

public TextElement createTextElement(java.lang.String text)
Description copied from interface: TextOperator
This method should create a text element for the given text.

Specified by:
createTextElement in interface TextOperator
Overrides:
createTextElement in class DefaultTextOperator
Parameters:
text - The text.
Returns:
The text element.

getTextInContext

public java.lang.String getTextInContext(TextElement textElement,
                                         java.lang.String preceding,
                                         java.lang.String following)
Description copied from interface: TextOperator
This method checks the context of a text element and can do small surface adaptations of a token according to the surrounding text. E.g. in English "a" should become "an" in front of "apple".

Specified by:
getTextInContext in interface TextOperator
Overrides:
getTextInContext in class DefaultTextOperator
Parameters:
textElement - The text element whose text should be adapted to the context.
preceding - The preceding text.
following - The following text.
Returns:
The adapted text.


Copyright 2008-2012, AceWiki developers