SortWordString.h

Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 1999-2009 Soeren Sonnenburg
00008  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
00009  */
00010 
00011 #ifndef _CSORTWORDSTRING__H__
00012 #define _CSORTWORDSTRING__H__
00013 
00014 #include <shogun/features/StringFeatures.h>
00015 #include <shogun/preprocessor/StringPreprocessor.h>
00016 #include <shogun/lib/common.h>
00017 
00018 #include <stdio.h>
00019 
00020 namespace shogun
00021 {
00029 class CSortWordString : public CStringPreprocessor<uint16_t>
00030 {
00031 public:
00033     CSortWordString();
00034 
00036     virtual ~CSortWordString();
00037 
00039     virtual bool init(CFeatures* f);
00040 
00042     virtual void cleanup();
00044     virtual bool load(FILE* f);
00046     virtual bool save(FILE* f);
00047 
00051     virtual bool apply_to_string_features(CFeatures* f);
00052 
00055     virtual uint16_t* apply_to_string(uint16_t* f, int32_t &len);
00056 
00058     virtual inline const char* get_name() const { return "SortWordString"; }
00059 
00061     virtual inline EPreprocessorType get_type() const { return P_SORTWORDSTRING; }
00062 
00063 };
00064 }
00065 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation