|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.filter.EmbeddingElements
public class EmbeddingElements
Determines which elements in a document contain extractions (or parts of extractions). This class is used for sentence filtering.
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 |
---|
public EmbeddingElements(Document document, ExtractionContainer extractions, TokenizerFactory tFactory)
document
- the document to useextractions
- the extractions in this documenttFactory
- used to instantiate tokenizersMethod Detail |
---|
public boolean containsExtraction(Element element)
element
- the element to check
true
if the element contains an extraction (fully
or partially)public void processToken(Element element, String left, TokenDetails details, String right, ContextMap context)
processToken
in interface TokenProcessor
element
- the element containing the tokenleft
- 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 processright
- 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 processingpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |