#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. | |
|
|
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; } } |
1.2.18