de.fu_berlin.ties.xml.dom
Interface TokenProcessor

All Known Implementing Classes:
Extractor, Trainer

public interface TokenProcessor

Interface for a processor that operates on tokens in XML documents.

Version:
$Revision: 1.1 $, $Date: 2004/02/26 19:32:10 $, $Author: siefkes $
Author:
Christian Siefkes

Method Summary
 void processToken(Element element, String left, String token, String right, int tokenRep, boolean whitespaceBefore, ContextMap context)
          Processes a token in an XML element, optionally modifying the element or the document it is part of.
 

Method Detail

processToken

public void processToken(Element element,
                         String left,
                         String token,
                         String right,
                         int tokenRep,
                         boolean whitespaceBefore,
                         ContextMap context)
                  throws IOException,
                         ProcessingException
Processes a token in an XML element, optionally modifying the element or the document it is part of.

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)
token - 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)
tokenRep - the repetition of the token in the document (counting starts with 0, as the first occurrence is the "0th repetition").
whitespaceBefore - whether there is whitespace before the main token (either at the end of left or in the preceding element)
context - a map of objects that are made available for processing
Throws:
IOException - if an I/O error occurs
ProcessingException - if an error occurs during processing


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