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 #include "InvFPPushIndex.hpp" 00013 00014 00015 00016 #ifndef _INVFPTEXTHANDLER_HPP 00017 #define _INVFPTEXTHANDLER_HPP 00018 00023 00024 class InvFPTextHandler : public TextHandler { 00025 00026 public: 00029 InvFPTextHandler(char * filename, int bufferSize, bool countStopWds = false); 00030 ~InvFPTextHandler(); 00031 00033 char * handleDoc(char * docno); 00035 char * handleWord(char * word); 00036 00037 00038 private: 00040 void endDoc(); 00041 00042 00044 InvFPPushIndex * index; 00046 DocumentProps * dp; 00048 InvFPTerm * term; 00050 int docLength; 00052 int pos; 00054 bool countStopWds; 00055 00058 bool first; 00059 }; 00060 00061 #endif 00062