|
FreeLing
3.0
|
00001 00002 // 00003 // Omlet - Open Machine Learning Enhanced Toolkit 00004 // 00005 // Copyright (C) 2006 TALP Research Center 00006 // Universitat Politecnica de Catalunya 00007 // 00008 // This file is part of the Omlet library 00009 // 00010 // The Omlet library is free software; you can redistribute it 00011 // and/or modify it under the terms of the GNU General Public 00012 // License as published by the Free Software Foundation; either 00013 // version 3 of the License, or (at your option) any later version. 00014 // 00015 // This library is distributed in the hope that it will be useful, 00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 // General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU General Public 00021 // License along with this library; if not, write to the Free Software 00022 // Foundation, Inc., 51 Franklin St, 5th Floor, Boston, MA 02110-1301 USA 00023 // 00024 // contact: Lluis Padro (padro@lsi.upc.es) 00025 // TALP Research Center 00026 // despatx Omega.S112 - Campus Nord UPC 00027 // 08034 Barcelona. SPAIN 00028 // 00030 00031 #ifndef _SVM 00032 #define _SVM 00033 00034 #include <string> 00035 00036 #include "freeling/omlet/example.h" 00037 #include "freeling/omlet/classifier.h" 00038 #include "freeling/omlet/libsvm.h" 00039 00043 00044 class svm : public classifier { 00045 private: 00046 svm_model *model; 00047 int *class_code; 00048 00049 public: 00050 // constructor 00051 svm(const std::wstring &, const std::wstring &); 00052 // destructor 00053 ~svm(); 00054 00056 void classify(const example &, double[]) const; 00058 int get_nlabels() const; 00059 }; 00060 00061 #endif
1.7.6.1