Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.8 KiB

  1. //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  2. //
  3. // Copyright (c) 2001 Microsoft Corporation. All rights reserved.
  4. //
  5. // Module:
  6. // volcano/dll/segm.h
  7. //
  8. // Description:
  9. // Functions to implement the functionality of the break Neural net that
  10. // modifies the lattice structure to correct segmentation errors.
  11. //
  12. // Author:
  13. // ahmadab 11/14/01
  14. //
  15. //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  16. #ifndef __SEGM_H__
  17. #define __SEGM_H__
  18. #include "common.h"
  19. #include "volcanop.h"
  20. #include "lattice.h"
  21. #include "runnet.h"
  22. // maximum number of segmentations to consider
  23. #define MAX_SEGMENTATIONS 5
  24. // maximum number of segmentation features
  25. #define MAX_SEG_FEAT 20
  26. // maximum number of characters per segmentations consider
  27. #define MAX_SEG_CHAR 3
  28. // Magic key the identifies the NN bin file
  29. #define SEGMNET_FILE_TYPE 0xBEEB0FEA
  30. // Version information for file.
  31. #define SEGMNET_MIN_FILE_VERSION 0 // First version of code that can read this file
  32. #define SEGMNET_OLD_FILE_VERSION 0 // Oldest file version this code can read.
  33. #define SEGMNET_CUR_FILE_VERSION 0 // Current version of code.
  34. // structure describing a range of strokes
  35. typedef struct tagSTROKE_RANGE
  36. {
  37. int iStartStrk;
  38. int iEndStrk;
  39. }
  40. STROKE_RANGE;
  41. // structure describing a stroke range and its different possible segmentations
  42. typedef struct tagRange
  43. {
  44. int cSegm;
  45. ELEMLIST **ppSegm;
  46. STROKE_RANGE StrokeRange;
  47. }
  48. INK_SEGMENT;
  49. BOOL EnumerateInkSegmentations (LATTICE *pLat, INK_SEGMENT *pInkSegment);
  50. int FeaturizeSegmentation (LATTICE *pLat, ELEMLIST *pSeg, int *pFeat);
  51. void FreeInkSegment (INK_SEGMENT *pInkSegment);
  52. int FeaturizeInkSegment (LATTICE *pLat, INK_SEGMENT *pInkSegment, int *pFeat);
  53. BOOL UpdateSegmentations (LATTICE *pLat, int iStrtStrk, int iEndStrk);
  54. #endif