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

Parser.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2001 Carnegie Mellon University.  All Rights Reserved.
00003  *
00004  * Use of the Lemur Toolkit for Language Modeling and Information Retrieval
00005  * is subject to the terms of the software license set forth in the LICENSE
00006  * file included with this software, and also available at
00007  * http://www.cs.cmu.edu/~lemur/license.html
00008  *
00009  *==========================================================================
00010 */
00011 #include "TextHandler.hpp"
00012 
00013 #ifndef _PARSER_HPP
00014 #define _PARSER_HPP
00015 
00016 #include "WordSet.hpp"
00017 
00027 
00028 class Parser : public TextHandler {
00029 
00030 public:
00031 
00032   Parser() {
00033     acros = NULL;
00034   }
00035 
00037   virtual void parse(char * filename) = 0;
00038 
00042   virtual void setAcroList(WordSet * acronyms)  {
00043     acros = acronyms;
00044   }
00045 
00046 
00047 protected: 
00050   bool isAcronym(char * word) {
00051     if (acros != NULL) 
00052       return acros->contains(word);
00053     return false;
00054   }
00055 
00056 private:
00058   WordSet * acros;
00059 
00060 };
00061 
00062 #endif

Generated at Fri Jul 26 18:22:27 2002 for LEMUR by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000