ch.uzh.ifi.attempto.preditor.text
Class NounTextElement

java.lang.Object
  extended by ch.uzh.ifi.attempto.preditor.text.BasicTextElement
      extended by ch.uzh.ifi.attempto.preditor.text.NounTextElement
All Implemented Interfaces:
RefableTextElement, TextElement

public class NounTextElement
extends BasicTextElement
implements RefableTextElement

This class represents referenceable text elements that contain a noun. One can refer to such text elements with "the" plus the respective noun, e.g. "the customer" in the case of the noun "customer". If the text element is followed by a VarTextElement then the variable is also included in the reference text, e.g. "the customer X" if the variable has the name "X".

Author:
Tobias Kuhn

Constructor Summary
NounTextElement(java.lang.String noun, java.lang.String category)
          Creates a new noun text element.
 
Method Summary
 void checkNeighborTextElements(TextElement precedingTextElement, TextElement nextTextElement)
          Checks the preceding and next text element.
 java.lang.String getReferenceText()
          This method should return the text how a reference to this text element has to look like.
 
Methods inherited from class ch.uzh.ifi.attempto.preditor.text.BasicTextElement
equals, getCategory, getText
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ch.uzh.ifi.attempto.preditor.text.TextElement
equals, getCategory, getText
 

Constructor Detail

NounTextElement

public NounTextElement(java.lang.String noun,
                       java.lang.String category)
Creates a new noun text element.

Parameters:
noun - The noun.
category - The category.
Method Detail

checkNeighborTextElements

public void checkNeighborTextElements(TextElement precedingTextElement,
                                      TextElement nextTextElement)
Description copied from interface: TextElement
Checks the preceding and next text element. This is needed for words that change their form depending on the context, e.g. for capitalization or for the indefinite article "a"/"an".

Specified by:
checkNeighborTextElements in interface TextElement
Overrides:
checkNeighborTextElements in class BasicTextElement

getReferenceText

public java.lang.String getReferenceText()
Description copied from interface: RefableTextElement
This method should return the text how a reference to this text element has to look like.

Specified by:
getReferenceText in interface RefableTextElement
Returns:
The text of a possible reference.


Copyright 2008, Attempto Group, University of Zurich (see http://attempto.ifi.uzh.ch)