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

Parser Class Reference

Provides a generic parser interface. Supports the TextHandler interface as a source (so foundDoc and foundWord have empty implementations). Also assumes that the parser uses an acronym list. If, when developing your parser, you do not use an acronym list, you can just provide an empty implementation of the setAcroList function. More...

#include <Parser.hpp>

Inheritance diagram for Parser:

TextHandler ReutersParser TrecParser WebParser List of all members.

Public Methods

 Parser ()
virtual void parse (char *filename)=0
 Parse a file.

virtual void setAcroList (WordSet *acronyms)
 Set the acronym list. Can be an empty implementation if the parser is not designed to deal with acronyms by using a list.


Protected Methods

bool isAcronym (char *word)
 Checks to see if the word is in the acronym list. Returns false if the list is not set.


Detailed Description

Provides a generic parser interface. Supports the TextHandler interface as a source (so foundDoc and foundWord have empty implementations). Also assumes that the parser uses an acronym list. If, when developing your parser, you do not use an acronym list, you can just provide an empty implementation of the setAcroList function.


Constructor & Destructor Documentation

Parser::Parser ( ) [inline]
 


Member Function Documentation

bool Parser::isAcronym ( char * word ) [inline, protected]
 

Checks to see if the word is in the acronym list. Returns false if the list is not set.

void Parser::parse ( char * filename ) [pure virtual]
 

Parse a file.

Reimplemented in ReutersParser, TrecParser, and WebParser.

void Parser::setAcroList ( WordSet * acronyms ) [inline, virtual]
 

Set the acronym list. Can be an empty implementation if the parser is not designed to deal with acronyms by using a list.


The documentation for this class was generated from the following file:
Generated at Fri Jul 26 18:22:54 2002 for LEMUR by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000