home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume10 / cbw / part01 / autotri.h < prev    next >
Encoding:
C/C++ Source or Header  |  1987-06-16  |  1.1 KB  |  44 lines

  1. /*
  2.  * Definitions for automatically guessing with trigrams. 
  3.  */
  4.  
  5.  
  6. #define    PERMSZ        20
  7. #define    TRIGTABSZ    150
  8. #define    TRIGBUFSZ    (4*(TRIGTABSZ+1))
  9.  
  10.  
  11.  
  12. #define    trig_ent    struct xtrigent
  13. trig_ent    {
  14.         float    prob;        /* A priori probability of this trigram. */
  15.         char    *trigram;    /* Null for last entry in table. */
  16.         int        notused;    /* For compatibility with pqueue. */
  17.         };
  18.  
  19.  
  20. #define    atrinfo    struct xatrinfo
  21. atrinfo    {
  22.         ecinfo        *eci;
  23.         /* A guess must have a better score than this field. */
  24.         float        max_score;
  25.         /* A guess must deduce atleast this many chars. */
  26.         int            min_total_chars;
  27.         /* Each wire of the guess must deduce this many chars. */
  28.         int            min_wire_chars;
  29.         char        *best_trigram;
  30.         float        best_score;
  31.         int            gcount;            /* Total number of guesses. */
  32.         float        total_score;    /* Their cummulative score. */
  33.         /* NONE terminated string of the chars deduced by the best trigram. */
  34.         /* Does not include the trigram itself. */
  35.         int            best_pvec[BLOCKSIZE+1];
  36.         /* Table of permutation wirings deduced by the best guess so far. */
  37.         /* The table is terminated by a perment with x == NONE. */
  38.         perment        best_permvec[PERMSZ];
  39.         };
  40.  
  41.  
  42. extern    trig_ent    trig_tab[];
  43.  
  44.