00001 /*========================================================================== 00002 * Copyright (c) 2002 University of Massachusetts. 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.lemurproject.org/license.html 00008 * 00009 *========================================================================== 00010 */ 00011 /* 00012 author: dmf 00013 */ 00014 #ifndef _INVPASSAGETEXTHANDLER_HPP 00015 #define _INVPASSAGETEXTHANDLER_HPP 00016 #include "InvFPTextHandler.hpp" 00017 #include "InvPassagePushIndex.hpp" 00018 00023 00024 class InvPassageTextHandler : public InvFPTextHandler { 00025 00026 public: 00029 InvPassageTextHandler(const string &filename, int psgSize, int bufferSize, 00030 bool countStopWords = false) { 00031 // create index and helper objects 00032 index = new InvPassagePushIndex(filename, psgSize, bufferSize); 00033 dp = new DocumentProps(); 00034 term = new InvFPTerm(); 00035 countStopWds = countStopWords; 00036 docLength = 0; 00037 pos = 1; 00038 // set state that is on first doc 00039 first = true; 00040 } 00041 }; 00042 00043 #endif 00044