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.cs.cmu.edu/~lemur/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 BrillPOSParser(); 00039 00041 void parseFile(char * filename); 00042 00043 void parseBuffer(char * buf, int len); 00044 00045 long fileTell(); 00046 00047 private: 00049 void doParse(); 00050 00052 int state; 00053 00055 int poscount; 00056 00058 Property wordpos; 00059 Property tag; 00060 00062 LinkedPropertyList proplist; 00063 }; 00064 00065 #endif