Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

mootEval.h

Go to the documentation of this file.
00001 /* -*- Mode: C++ -*- */
00002 
00003 /*
00004    libmoot : moocow's part-of-speech tagging library
00005    Copyright (C) 2003-2005 by Bryan Jurish <moocow@ling.uni-potsdam.de>
00006 
00007    This library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Lesser General Public
00009    License as published by the Free Software Foundation; either
00010    version 2.1 of the License, or (at your option) any later version.
00011    
00012    This library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Lesser General Public License for more details.
00016    
00017    You should have received a copy of the GNU Lesser General Public
00018    License along with this library; if not, write to the Free Software
00019    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00020 */
00021 
00022 /*--------------------------------------------------------------------------
00023  * File: mootEval.h
00024  * Author: Bryan Jurish <moocow@ling.uni-potsdam.de>
00025  * Description:
00026  *   + moot PoS tagger : evaluator
00027  *--------------------------------------------------------------------------*/
00028 
00029 #ifndef _moot_EVAL_H
00030 #define _moot_EVAL_H
00031 
00032 #include <mootTypes.h>
00033 #include <mootToken.h>
00034 #include <string>
00035 
00036 
00037 moot_BEGIN_NAMESPACE
00038 
00039 /*--------------------------------------------------------------------------
00040  * mootEval : evaluation class
00041  *--------------------------------------------------------------------------*/
00042 
00044 class mootEval {
00045 public:
00046 
00048   typedef enum {
00049     MEF_None           = 0x0000, 
00050     //MEF_SentMismatch = 0x0001, /**< sentence lengths differ */
00051     MEF_TokMismatch    = 0x0002, 
00052     MEF_BestMismatch   = 0x0004, 
00053     MEF_EmptyClass1    = 0x0008, 
00054     MEF_EmptyClass2    = 0x0010, 
00055     MEF_ImpClass1      = 0x0020, 
00056     MEF_ImpClass2      = 0x0040, 
00057     MEF_XImpClass1     = 0x0080, 
00058     MEF_XImpClass2     = 0x0100  
00059   } evalStatus;
00060 
00061 public:
00062   int status;                    
00064 public:
00065   mootEval(void) : status(MEF_None) {};
00066 
00068   inline void clear(void) { status = MEF_None; };
00069 
00075   int compareTokens(const mootToken &tok1, const mootToken &tok2);
00076 
00078   //list<mootEvalFlag> compareSentences(const mootSentence &sent1, const mootSentence &sent2);
00079 
00080   /*----------------------------------------------------
00081    * Accessors
00082    */
00084   inline bool isTokenMismatch(void) { return status&MEF_TokMismatch; };
00085 
00087   inline bool isBestMismatch(void) { return status&MEF_BestMismatch; };
00088 
00093   inline bool isEmptyClass1(void) { return status&MEF_EmptyClass1; };
00094 
00099   inline bool isEmptyClass2(void) { return status&MEF_EmptyClass2; };
00100 
00105   inline bool isImpClass1(void) { return status&MEF_ImpClass1; };
00106 
00111   inline bool isImpClass2(void) { return status&MEF_ImpClass2; };
00112 
00117   inline bool isXImpClass1(void) { return status&MEF_XImpClass1; };
00118 
00123   inline bool isXImpClass2(void) { return status&MEF_XImpClass2; };
00124 
00125 
00126   /*----------------------------------------------------
00127    * Stringification
00128    */
00144   string status_string(void);
00145 };
00146 
00147 
00148 moot_END_NAMESPACE
00149 
00150 #endif /* _moot_EVAL_H */

Generated on Mon Sep 11 16:10:33 2006 for libmoot by doxygen1.2.18