Changeset 88f53b244ed21fc4833bef05fb376eb4497a2740
- Timestamp:
- 04/27/08 11:46:36 (8 months ago)
- Author:
- David Balmain <dbalmain@…>
- Parents:
- 190f7af639412f6d6b91876cb6b9f609028b7e46
- Children:
- cf8e43eb3296c5f2e2681f89658e5b9b3c0dd263
- git-committer:
- David Balmain <dbalmain@gmail.com> / 2008-04-27T11:46:36Z+1000
- Message:
-
Further improved source documentation for FuzzyQuery?
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r190f7a
|
r88f53b
|
|
| 8 | 8 | * FuzzyStuff |
| 9 | 9 | * |
| 10 | | * The main method here is the fuzq_score method which scores a term against |
| 11 | | * another term. The other methods all act in support. |
| | 10 | * The main method here is the fuzq_score_mn method which scores a term |
| | 11 | * against another term. The other methods all act in support. |
| | 12 | * |
| | 13 | * To learn more about the fuzzy scoring algorithm see; |
| | 14 | * |
| | 15 | * http://en.wikipedia.org/wiki/Levenshtein_distance |
| 12 | 16 | * |
| 13 | 17 | ****************************************************************************/ |
| … |
… |
|
| 52 | 56 | } |
| 53 | 57 | |
| | 58 | /** |
| | 59 | * Calculate the similarity score for the +target+ against the query. |
| | 60 | * |
| | 61 | * @params fuzq The Fuzzy Query |
| | 62 | * @params target *the term to compare against minus the prefix |
| | 63 | * @params m the string length of +target+ |
| | 64 | * @params n the string length of the query string minus length of the prefix |
| | 65 | */ |
| 54 | 66 | static INLINE float fuzq_score_mn(FuzzyQuery *fuzq, |
| 55 | 67 | const char *target, |