00001 /*========================================================================== 00002 * Copyright (c) 2003 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.lemurproject.org/license.html 00008 * 00009 *========================================================================== 00010 */ 00011 00012 #include "Parser.hpp" 00013 #include "TextHandler.hpp" 00014 #include "LinkedPropertyList.hpp" 00015 00016 #ifndef _BRILLPOSPARSER_HPP 00017 #define _BRILLPOSPARSER_HPP 00018 00032 00033 // Source code in BrillPOSParser.l 00034 00035 class BrillPOSParser : public Parser { 00036 00037 public: 00038 static const string identifier; 00039 00040 BrillPOSParser(); 00041 00043 void parseFile(const string &filename); 00044 00045 void parseBuffer(char * buf, int len); 00046 00047 long fileTell() const; 00048 00049 private: 00051 void doParse(); 00052 00054 int state; 00055 00057 int poscount; 00058 00060 Property wordpos; 00061 Property tag; 00062 00064 LinkedPropertyList proplist; 00065 }; 00066 00067 #endif