de.fu_berlin.ties.filter
Class EmbeddingElements

java.lang.Object
  extended by de.fu_berlin.ties.filter.EmbeddingElements
All Implemented Interfaces:
TokenProcessor

public class EmbeddingElements
extends Object
implements TokenProcessor

Determines which elements in a document contain extractions (or parts of extractions). This class is used for sentence filtering.

Version:
$Revision: 1.7 $, $Date: 2004/11/19 14:05:00 $, $Author: siefkes $
Author:
Christian Siefkes

Constructor Summary
EmbeddingElements(Document document, ExtractionContainer extractions, TokenizerFactory tFactory)
          Creates a new instance.
 
Method Summary
 boolean containsExtraction(Element element)
          Checks whether the given element contains an extraction (or parts of an extraction).
 void processToken(Element element, String left, TokenDetails details, String right, ContextMap context)
          Processes a token in an XML element, optionally modifying the element or the document it is part of.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmbeddingElements

public EmbeddingElements(Document document,
                         ExtractionContainer extractions,
                         TokenizerFactory tFactory)
Creates a new instance.

Parameters:
document - the document to use
extractions - the extractions in this document
tFactory - used to instantiate tokenizers
Method Detail

containsExtraction

public boolean containsExtraction(Element element)
Checks whether the given element contains an extraction (or parts of an extraction).

Parameters:
element - the element to check
Returns:
true if the element contains an extraction (fully or partially)

processToken

public void processToken(Element element,
                         String left,
                         TokenDetails details,
                         String right,
                         ContextMap context)
Processes a token in an XML element, optionally modifying the element or the document it is part of.

Specified by:
processToken in interface TokenProcessor
Parameters:
element - the element containing the token
left - the textual contents of the element to the left of the token (in case of mixed contents, only up to the last preceding child element, if any)
details - details about the token to process
right - the textual contents of the element to the right of the token (in case of mixed contents, only up to the next following child element, if any)
context - a map of objects that are made available for processing

toString

public String toString()
Returns a string representation of this object.

Overrides:
toString in class Object
Returns:
a textual representation


Copyright © 2003-2004 Christian Siefkes. All Rights Reserved.