summaryrefslogblamecommitdiffstats
path: root/migratetags/matchers/matcher.h
blob: 1448c2e3d2aa724e90e93477ecd3ed5e5d51727c (plain) (tree)
























                                                                                                                                                     
#ifndef matcher_h
#define matcher_h

class Matcher {
public:

// Compares 2 words and tries to give a percentage assurance of a match
// TODO: could use more smarts here
//
virtual int compare(const SWBuf &s1, const SWBuf &s2) = 0;

// This is where the magic happens
//
// we must point each targetMod word to an XMLTag
//
// when the magic is done, and your guess is made
// populate targetWordTags with the integer offset
// into wordTags for which XMLTag you think it should
// be.
//
virtual void matchWords(vector<int> &targetWordTags, const vector<SWBuf> &targetWords, const vector<SWBuf> &fromWords, vector<int> fromWordTags) = 0;


};
#endif