li_recognizer_internal.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * li_recognizer_internal.h
  3. *
  4. * Adapted from cmu_recognizer_internal.h.
  5. * Credit to Dean Rubine, Jim Kempf, and Ari Rapkin.
  6. */
  7. #define MAXSCLASSES 100
  8. typedef struct PointList {
  9. Stroke;
  10. int xrange, yrange;
  11. struct PointList* next;
  12. } point_list;
  13. typedef struct {
  14. char* file_name; /*The classifier file name.*/
  15. int nclasses; /*Number of symbols in class */
  16. point_list* ex[MAXSCLASSES]; /*The training examples.*/
  17. char* cnames[MAXSCLASSES]; /*The class names.*/
  18. point_list* canonex[MAXSCLASSES]; /*Canonicalized vrsions of strokes */
  19. point_list* dompts[MAXSCLASSES]; /*Dominant points */
  20. } rClassifier;
  21. /*This structure contains extra fields for instance-specific data.*/
  22. typedef struct {
  23. /*Instance-specific data.*/
  24. uint li_magic; /*Just to make sure nobody's cheating.*/
  25. rClassifier li_rc; /*The character classifier.*/
  26. } li_recognizer;
  27. /*Name of the default classifier file.*/
  28. #define LI_DEFAULT_CLASSIFIER_FILE "default.cl"
  29. /*Classifier file extension.*/
  30. #define LI_CLASSIFIER_EXTENSION ".cl"
  31. /*Locale supported by recognizer.*/
  32. #define LI_SUPPORTED_LOCALE REC_DEFAULT_LOCALE