00001 /* 00002 * $Id: MotivePatternWrapper.h,v 1.1 2005/11/28 23:25:56 amiasnik Exp $ 00003 */ 00004 00005 // Contents: Classes implementing a wrapper for IBM implementation of the Motive Pattern Extractor 00006 00007 // 00008 // Principal Author: Alexei Miasnikov (2004) 00009 // 00010 // Status: 00011 // 00012 // Revision History: 00013 // 00014 00015 #ifndef MOTIVE_PATTERN_WRAPPER_H 00016 #define MOTIVE_PATTERN_WRAPPER_H 00017 00018 00019 #include "global.h" 00020 #include "FreeGroup.h" 00021 #include "Word.h" 00022 #include <vector> 00023 #include <stdlib.h> 00024 00026 // 00027 // MOTIVE PATTERN 00028 // 00030 00031 struct MotivePattern 00032 { 00033 int occurrences; 00034 int sequences; 00035 00036 Word thePattern; 00037 }; 00038 00040 // 00041 // MOTIVE PATTERN WRAPPER 00042 // 00044 00045 class MotivePatternWrapper 00046 { 00047 public: 00048 MotivePatternWrapper( const FreeGroup& f): theGroup( f ) {} 00049 00050 void initializeSequence( const vector<Word>& ); 00051 bool compute(); 00052 vector<MotivePattern> getPatterns(); 00053 private: 00054 string input_file; 00055 string output_file; 00056 00057 00058 FreeGroup theGroup; 00059 }; 00060 00061 00062 #endif