All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gate.creole.annic.lucene.LuceneReader Maven / Gradle / Ivy

Go to download

GATE - general achitecture for text engineering - is open source software capable of solving almost any text processing problem. This artifact enables you to embed the core GATE Embedded with its essential dependencies. You will able to use the GATE Embedded API and load and store GATE XML documents. This artifact is the perfect dependency for CREOLE plugins or for applications that need to customize the GATE dependencies due to confict with their own dependencies or for lower footprint.

The newest version!
/*
 *  LuceneReader.java
 *
 *  Niraj Aswani, 19/March/07
 *
 *  $Id: LuceneReader.html,v 1.0 2007/03/19 16:22:01 niraj Exp $
 */
package gate.creole.annic.lucene;

import gate.creole.annic.apache.lucene.analysis.Token;

import java.io.BufferedReader;
import java.io.StringReader;
import java.util.List;

/**
 * A Reader that stores the document to read and the token stream
 * associated with it.
 * 
 * @author niraj
 * 
 */
public class LuceneReader extends BufferedReader {

  /**
   * Gate document
   */
  gate.Document gateDoc;

  /**
   * Token Stream.
   */
  List tokenStream;

  /**
   * Constructor
   * 
   * @param gateDoc
   * @param tokenStream
   */
  public LuceneReader(gate.Document gateDoc, List tokenStream) {
    super(new StringReader(""));
    this.gateDoc = gateDoc;
    this.tokenStream = tokenStream;
  }

  /**
   * Gets the document object
   */
  public gate.Document getDocument() {
    return this.gateDoc;
  }

  /**
   * Gets the token stream associated with this reader
   */
  public List getTokenStream() {
    return this.tokenStream;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy