Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

BasicDocStream.hpp File Reference

#include "common_headers.hpp"
#include <cassert>
#include <cstdio>
#include <cstring>
#include "DocStream.hpp"
#include "Exception.hpp"

Go to the source code of this file.

Compounds

class  BasicDocStream
 A DocStream handler of a stream with the basic lemur format. More...

class  BasicTokenDoc
 doc representation for BasicDocStream More...


Defines

#define MAXLINE   65536
 A basic DocStream implementation.


Define Documentation

#define MAXLINE   65536
 

A basic DocStream implementation.

BasicDocStream is an implementation of DocStream that recognizes the following format:

   <DOC unique_document_identifier>
   this
   is
   an
   example
   </DOC>
 

The following is a typical example of using BasicDocStream(or DocSTream) :


  DocStream *docStr = new BasicDocStream("source");
  
  docStr->startDocIteration();

  while (docStr->hasMore()) {

  Document *doc = docStr->nextDoc();
  cout << "doc id: "<< doc->getID() << endl;
  doc->startTermIteration();
  while (doc->hasMore()) {
    TokenTerm *term = thisDoc->nextTerm();
    cout << "term: "<< term->spelling() << endl;
  }
}
 


Generated on Wed Nov 3 12:59:09 2004 for Lemur Toolkit by doxygen1.2.18