edu.columbia.cs.cg.prdualrank.index.reader
Class TokenBasedReader
java.lang.Object
java.io.Reader
edu.columbia.cs.cg.prdualrank.index.reader.TokenBasedReader
- All Implemented Interfaces:
- java.io.Closeable, java.lang.Readable
public class TokenBasedReader
- extends java.io.Reader
For this Class, Apache Lucene Engine is required.
This class is used for our implementation of:
"Searching Patterns for Relation Extraction over the Web: Rediscovering the Pattern-Relation Duality" . Y. Fang and K. C.-C. Chang. In WSDM, pages 825-834, 2011.
For further information, WSDM 2011 Conference Website .
Description
Reader used to retrieve tokens from already saved tokens. It is used by Apache Lucene's<\b> interface.
- Since:
- 2011-10-07
- Version:
- 0.1
- Author:
- Pablo Barrio, Goncalo Simoes
- See Also:
- Apache Lucene Engine ,
WSDM 2011 Conference Website
Constructor Summary |
TokenBasedReader(Span[] tokenizedSpans,
java.lang.String[] tokenizedString)
Instantiates a new token based reader. |
Methods inherited from class java.io.Reader |
mark, markSupported, read, read, read, ready, reset, skip |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenBasedReader
public TokenBasedReader(Span[] tokenizedSpans,
java.lang.String[] tokenizedString)
- Instantiates a new token based reader.
- Parameters:
tokenizedSpans
- the spans representing the tokenization of the content.tokenizedString
- the value of the tokens. Must match the tokenizedSpans.
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Specified by:
close
in class java.io.Reader
- Throws:
java.io.IOException
read
public int read(char[] cbuf,
int off,
int len)
throws java.io.IOException
- Specified by:
read
in class java.io.Reader
- Throws:
java.io.IOException
getSpans
public Span[] getSpans()
- Gets the spans.
- Returns:
- the stored spans
getStrings
public java.lang.String[] getStrings()
- Gets the strings.
- Returns:
- the stored strings