#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 &targetWordTags, const vector &targetWords, const vector &fromWords, vector fromWordTags) = 0; // sanitize word for comparing (e.g., toUpper, strip accents, etc) virtual SWBuf sanitizeWord(const SWBuf &word) = 0; }; #endif