home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snip9707.zip / PHONETIC.H < prev    next >
C/C++ Source or Header  |  1997-07-05  |  1KB  |  67 lines

  1. /* +++Date last modified: 05-Jul-1997 */
  2.  
  3. /*
  4. **  PHONETIC.H - Snippets header file for functions to perform
  5. **             phonetic string matching.
  6. */
  7.  
  8. #ifndef PHONETIC__H
  9. #define PHONETIC__H
  10.  
  11. #include "sniptype.h"
  12.  
  13.  
  14. /*
  15. **  File SOUNDEX.C
  16. */
  17.  
  18. char *soundex(char *instr, char *outstr);
  19.  
  20.  
  21. /*
  22. **  File SOUNDEX4.C
  23. */
  24.  
  25. void  soundex4(const char *instr, char *outstr, int N);
  26.  
  27.  
  28. /*
  29. **  File SOUNDEX5.C
  30. */
  31.  
  32. #define SNDMAX (1 + 6 + 6*6 + 6*6*6)
  33. #define SNDLEN (26 * SNDMAX)
  34.  
  35. int soundex5(char *instr);
  36.  
  37.  
  38. /*
  39. **  File METAPHON.C
  40. */
  41.  
  42. /*
  43. **  MAXMETAPH is the length of the Metaphone code.
  44. **
  45. **  Four is a good compromise value for English names. For comparing words
  46. **  which are not names or for some non-English names, use a longer code
  47. **  length for more precise matches.
  48. **
  49. **  The default here is 5.
  50. */
  51.  
  52. #define MAXMETAPH 5
  53.  
  54. typedef enum {COMPARE, GENERATE} metaphlag;
  55.  
  56. Boolean_T metaphone(const char *Word, char *Metaph, metaphlag Flag);
  57.  
  58.  
  59. /*
  60. **  File APPROX.C
  61. */
  62.  
  63. void App_init(char *pattern, char *text, int degree);
  64. void App_next(char **start, char **end, int *howclose);
  65.  
  66. #endif /* PHONETIC__H */
  67.