home *** CD-ROM | disk | FTP | other *** search
/ Enter 1999 September / ENTER9_2.bin / prog_10 / DB / TKNZTBLD.CPL < prev   
Encoding:
Text File  |  1999-03-15  |  27.9 KB  |  792 lines

  1. ####################################################################
  2. #
  3. #
  4. # File: tknztbld.def
  5. #
  6. # Personal Library Software, July, 1993
  7. # Tom Donaldson
  8. #
  9. # Tokenizer definitional data for table driven tokenizer:
  10. #     CplTabledRomanceTokenizer.
  11. #
  12. # The CplTabledRomanceTokenizer allows customization of tokenization by
  13. # editing rules that define the operation of the tokenizer.  Central
  14. # concept is "word continuation" rules, defining characters-kinds that
  15. # CANNOT be split from each other.
  16. #
  17. # History
  18. # -------
  19. #
  20. # 29jul1993     tomd    Performance improvements.  Got rid of unused
  21. #                       character classes.  Defined all non-token chars
  22. #                       to be "break" character class.  Ordered
  23. #                       user-defined character classes by expected
  24. #                       frequency in text.
  25. #
  26. #                       Also added performance hints throughout.
  27. #
  28. # 26aug93       tomd    No longer need to map all chars to char-classes.
  29. #                       Unmapped ones will default to break-chars.
  30. #
  31. #                       No longer need to assign numeric values to character
  32. #                       classes.  No longer need to assign names to predefined
  33. #                       character classes (and cannot).
  34. #
  35. #                       Canonizer map no longer has to contain all
  36. #                       characters.
  37. #
  38. ####################################################################
  39.  
  40.  
  41.  
  42. ####################################################################
  43. #
  44. # Installation
  45. # ============
  46. #
  47. # Database.def File
  48. # -----------------
  49. #
  50. # To use the CplTabledRomanceTokenizer, you need this line in the .def
  51. # file for the database:
  52. #
  53. # TOKENIZER = CplTabledRomanceTokenizer
  54. #
  55. #
  56. # Tokenizer File
  57. # --------------
  58. #
  59. # This file, tknztbld.def, is the rule file.  Note that the name of the
  60. # file CANNOT be changed, and the file MUST be in the "home directory"
  61. # of the database using the tokenizer, or the "system" directory for
  62. # the CPL installation.
  63. #
  64. ####################################################################
  65.  
  66.  
  67. ####################################################################
  68. #
  69. # Operational Overview
  70. # ====================
  71. #
  72. # Database Open
  73. # -------------
  74. #
  75. # When a database is opened, its .def file is read.  In the .def file,
  76. # a non-default tokenizer may be specified via a line of the form
  77. #
  78. # TOKENIZER = aTokenizerName
  79. #
  80. # If aTokenizerName is "CplTabledRomanceTokenizer", as soon as the
  81. # tokenizer is needed, it will try to read its definition file (i.e.,
  82. # this tknztbld.def file) from the same directory as the database's .def
  83. # file.
  84. #
  85. # If a problem arises during the load, tokenizer creation will fail.  In
  86. # this case, please do a "diff" between the file that failed to load and
  87. # the original copy.  Regretfully, few diagnostic error messages are
  88. # currently available to assist in determining why tokenizer definition
  89. # rules did not load.
  90. #
  91. # During Tokenization
  92. # -------------------
  93. #
  94. # As a buffer is scanned for words, each character is converted to a
  95. # "character class" via a Character Classification Map.  The character
  96. # classes are compared against tokenization rules, defined in this file.
  97. # If the rules explicitly state that the current character code may not
  98. # be separated from the preceeding one, then the current character is
  99. # treated as part of a word, and the next character is classified and
  100. # tested.  This process continues until the scanner finds a character
  101. # whose classification is not specified in the rules as always being
  102. # kept with the character class of the just-preceeding character.
  103. #
  104. #
  105. # Performance Hints
  106. # =================
  107. #
  108. # The table driven tokenizer allows a great deal of flexibility in
  109. # scanning words.  It is possible to create a tokenizer definition that
  110. # will scan complex patterns as tokens, or not, depending upon the
  111. # immediate context of the characters being scanned.  However, this
  112. # flexibility comes at a price: performance.
  113. #
  114. # In general, the simpler and fewer the character classes and rules the
  115. # faster tokenization will be.  That is, the closer the rules come to
  116. # generating tokens that would pass the simple isalnum() test, the
  117. # faster tokenization will be.  The further your needs depart from this
  118. # simplicity, the longer it will take to index files.
  119. #
  120. #
  121. ####################################################################
  122.  
  123.  
  124. ###################################################################
  125. #
  126. #
  127. # Required File Layout
  128. # ====================
  129. #
  130. # This tokenizer definition file, tknztbld.def, must contain the
  131. # following sections in this order:
  132. #
  133. #     Section 1: Character Class Definitions
  134. #
  135. #     Section 2: Character Classification Map
  136. #
  137. #     Section 3: Word Continuation Rules
  138. #
  139. #     Section 4: Canonization Map
  140. #
  141. # Section 1, the "Character Class Definitions", gives meaningful names
  142. # to "kinds" of characters.  These class names are used in definining
  143. # what kinds of characters make up words.
  144. #
  145. # Section 2, the "Character Classification Map", assigns a character
  146. # class to each character in the character set used by documents.
  147. #
  148. # Section 3, the "Word Continuation Rules", uses the character class
  149. # names defined in the Character Class Definitions to specify what
  150. # groupings of characters may not be separated from each other during
  151. # toknization.
  152. #
  153. # Section 4, the "Canonization Map", specifies translations of
  154. # characters from their raw input form to their final "canonical"
  155. # indexed form.
  156. #
  157. # The detailed structure of each section of the tokenizer definition is
  158. # covered in comments accompanying the sections, below.
  159. #
  160. # The lines in this file that are preceeded by the pound character, '#',
  161. # are comment lines (obviously).  Comments may only appear on a line by
  162. # themselves, but comment lines may appear anywhere in the file.
  163. # Likewise, blank lines may appear anywhere in the file.
  164. #
  165. ####################################################################
  166.  
  167.  
  168. ####################################################################
  169. #
  170. # Section 1: Character Class Definitions
  171. #
  172. ####################################################################
  173. #
  174. # The Character Class Definitions give names to the types of
  175. # characters that can take part in words, and that delimit words.  These
  176. # names will be used in Section 2, the Character Classification Map, to
  177. # assign character classes to individual characters.
  178. #
  179. # You may define up to 250 character classes, although fewer than 10
  180. # will most likely be enough.  Every character than can possibly ever
  181. # appear in the data to be tokenized MUST be assigned one of the defined
  182. # classes.  The mapping is done via a character-class map, which appears
  183. # that the end of this file.
  184. #
  185. #
  186. # Predefined Special Values
  187. # =========================
  188. #
  189. # There are four predefined values that are special to the tokenizer:
  190. #
  191. #     Invalid - NO character should EVER be of this class.
  192. #
  193. #     EndRule - This is a character class that is used in this
  194. #               definition file to mark the end of your character
  195. #               classification names.  It must be the last character
  196. #               class name listed in the table below, and can only be
  197. #               the last one listed.
  198. #
  199. #     Break --- Characters of the "Break" class can NEVER be part of a
  200. #               token.  It is always valid for the tokenizer to
  201. #               word-break the datastream either before or after a Break
  202. #               character.
  203. #
  204. #     EndBuff - Characters of the EndBuff class will be treated as a
  205. #               "null" terminating character when scanning data for
  206. #               tokens.  The ASCII NUL character is an EndBuff character
  207. #               by default, and you will not normally map other
  208. #               characters to this class.
  209. #
  210. #
  211. # Only predefined Character Class names, or Character Class names that
  212. # are defined in this Character Class Definition section may be used
  213. # anywere else in the definition.  Definitions are case sensitive.
  214. #
  215. #
  216. # Performance Hints
  217. # =================
  218. #
  219. # 1) Use The "Break" Class As Much As Possible.  The Break class is a
  220. # special character class.  Minimal testing is done on characters
  221. # classified as Break.  This is because it is ALWAYS valid to separate a
  222. # Break character from any other character.  Any characters that will
  223. # NEVER be part of a token should be classified as Break.
  224. #
  225. # 2) Define Class Names By Frequency.  When creating user-defined character
  226. # classes, list the classes that will be assigned to the largest numbers
  227. # of characters in the data first.  For example, you would expect most
  228. # data in a text file to classified as "letter" characters; you should
  229. # define your "letter" class name first.
  230. #
  231. # 3) Define As Few Classes As Possible.  Fewer classes means less
  232. # testing.  Less testing means faster tokenization.
  233.  
  234.  
  235. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  236. #
  237. #  Default Character Class Definitions: Values and Names
  238. #
  239. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  240. #
  241. #
  242. # Name
  243. # ----
  244.   Letter
  245.   Number
  246.   Dot
  247.   Paragraf
  248.   HardSpace
  249. #
  250. # The EndRule character class must always be the last class name listed,
  251. # and must only appear at the end of your character class definitions.
  252. # If it is not at the end of char class defs, an error occurs as soon as
  253. # the loader hits a non-blank, non-comment line that is not a character
  254. # class definition.
  255. #
  256.   EndRule
  257.  
  258. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  259.  
  260.  
  261. ####################################################################
  262. #
  263. # Section 2: Character Classification Map
  264. #
  265. ####################################################################
  266. #
  267. # Maps characters to word-continuation character classes.
  268. #
  269. # The Character Classification Map associates a character code with a
  270. # character class.  The character classes must have been defined in the
  271. # Character Class Definition in Section 1.  Only character class names
  272. # that have been defined in the Character Class Definition (Section 1,
  273. # above) may appear in this Character Classification Map (Section 2) or
  274. # in the Word Continuation Rules (Section 3, below).
  275. #
  276. # Default Mapping
  277. # ===============
  278. #
  279. # You only need to provide character classification for the characters
  280. # that you want to appear in tokens.
  281. #
  282. # Any characters that you do NOT map will be classified in this way:
  283. #     - ASCII NUL is mapped as the end-of-buffer marker.
  284. #     - All other characters are mapped as break characters.
  285. #
  286. #
  287. # End Of Map Marker
  288. # =================
  289. #
  290. # As for the previous table, there is a special value for this Character
  291. # Classification Map that marks its end.  The special value is -1.  The
  292. # decimal character code -1 will cause the Character Classification Map
  293. # loader to stop reading.
  294. #
  295. #
  296. # Performance Hints
  297. # =================
  298. #
  299. # Leave as many characters classified as "break" characters as possible.
  300. # Classify as may characters to the same class as possible.
  301. #
  302. # The following sample table uses Dollar and Bang classes for tokenizing
  303. # specialized technical documentation.  If you don't need the Dollar and
  304. # Bang characters in indexable terms, change their mapping to Break, and
  305. # remove all references to Dollar and Break in the Character Class
  306. # Definitions and the Word Continuation Rules.  Your database will index
  307. # faster.
  308.  
  309.  
  310. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  311. #
  312. #  Character Classification Map
  313. #
  314. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  315. #
  316. # -------       -----           -----------------------
  317. # Decimal       Class
  318. #  Value        Name            Comment
  319. # -------       -----           -----------------------
  320. # Special characters:
  321.    46           Dot             # kropeczka '.'
  322.    167          Paragraf        # Paragraf
  323.    160          HardSpace       # Twarda spacja
  324. # Digits:
  325.    48           Number          # Char '0'
  326.    49           Number          # Char '1'
  327.    50           Number          # Char '2'
  328.    51           Number          # Char '3'
  329.    52           Number          # Char '4'
  330.    53           Number          # Char '5'
  331.    54           Number          # Char '6'
  332.    55           Number          # Char '7'
  333.    56           Number          # Char '8'
  334.    57           Number          # Char '9'
  335.    91           Number          # Char '['
  336.    93           Number          # Char ']'
  337.  
  338. # Upper case letters:
  339.    65           Letter          # Char 'A'
  340.    165          Letter          # Char 'A' pol
  341.    66           Letter          # Char 'B'
  342.    67           Letter          # Char 'C'
  343.    198          Letter          # Char 'C' pol
  344.    68           Letter          # Char 'D'
  345.    69           Letter          # Char 'E'
  346.    202          Letter          # Char 'E' pol
  347.    70           Letter          # Char 'F'
  348.    71           Letter          # Char 'G'
  349.    72           Letter          # Char 'H'
  350.    73           Letter          # Char 'I'
  351.    74           Letter          # Char 'J'
  352.    75           Letter          # Char 'K'
  353.    76           Letter          # Char 'L'
  354.    163          Letter          # Char 'L' pol
  355.    77           Letter          # Char 'M'
  356.    78           Letter          # Char 'N'
  357.    209          Letter          # Char 'N' pol
  358.    79           Letter          # Char 'O'
  359.    211          Letter          # Char 'O' pol
  360.    80           Letter          # Char 'P'
  361.    81           Letter          # Char 'Q'
  362.    82           Letter          # Char 'R'
  363.    83           Letter          # Char 'S'
  364.    140          Letter          # Char 'S' pol
  365.    84           Letter          # Char 'T'
  366.    85           Letter          # Char 'U'
  367.    86           Letter          # Char 'V'
  368.    87           Letter          # Char 'W'
  369.    88           Letter          # Char 'X'
  370.    89           Letter          # Char 'Y'
  371.    90           Letter          # Char 'Z'
  372.    143          Letter          # Char 'Zi' pol
  373.    175          Letter          # Char 'Zy' pol
  374. # Lower case letters:
  375.    97           Letter          # Char 'a'
  376.    185          Letter          # Char 'a' pol
  377.    98           Letter          # Char 'b'
  378.    99           Letter          # Char 'c'
  379.    230          Letter          # Char 'c' pol
  380.    100          Letter          # Char 'd'
  381.    101          Letter          # Char 'e'
  382.    234          Letter          # Char 'e' pol
  383.    102          Letter          # Char 'f'
  384.    103          Letter          # Char 'g'
  385.    104          Letter          # Char 'h'
  386.    105          Letter          # Char 'i'
  387.    106          Letter          # Char 'j'
  388.    107          Letter          # Char 'k'
  389.    108          Letter          # Char 'l'
  390.    179          Letter          # Char 'l' pol
  391.    109          Letter          # Char 'm'
  392.    110          Letter          # Char 'n'
  393.    241          Letter          # Char 'n' pol
  394.    111          Letter          # Char 'o'
  395.    243          Letter          # Char 'o' pol
  396.    112          Letter          # Char 'p'
  397.    113          Letter          # Char 'q'
  398.    114          Letter          # Char 'r'
  399.    115          Letter          # Char 's'
  400.    156          Letter          # Char 's' pol
  401.    116          Letter          # Char 't'
  402.    117          Letter          # Char 'u'
  403.    118          Letter          # Char 'v'
  404.    119          Letter          # Char 'w'
  405.    120          Letter          # Char 'x'
  406.    121          Letter          # Char 'y'
  407.    122          Letter          # Char 'z'
  408.    159          Letter          # Char 'zi' pol
  409.    191          Letter          # Char 'zy' pol
  410. # ---           -----           -----------------------
  411.    -1           EndOfDefs       # Not loaded.  Just marks end of map definition.
  412. # ---           -----           -----------------------
  413.  
  414.  
  415. ####################################################################
  416. #
  417. # Section 3: Word Continuation Rules
  418. #
  419. ####################################################################
  420. #
  421. # The word continuation rules specify which sequences of characters
  422. # CANNOT be separated from each other in breaking a stream of data into
  423. # words.
  424. #
  425. # Each rule consists of character class names seperated by spaces or
  426. # tabs.  A rule says that characters of the specified classes may not be
  427. # split.  For example, the rule:
  428. #
  429. #   Letter Letter
  430. #
  431. # says that when two data characters are of class Letter, and occur side
  432. # by side, the data characters may not be separated.
  433. #
  434. # Similarly, the rule:
  435. #
  436. #   Letter Number
  437. #
  438. # says that a character that classifies as a Letter may not be separated
  439. # from a following character that classifies as a Number.
  440. #
  441. # Example 1:
  442. #
  443. # How does the tokenizer decide whether a character is a Letter or a
  444. # Number?  That association is formed by the Character Classification
  445. # Map, in Section 2.  Using the Character Classification Map in this
  446. # file, and the two "Letter Letter" and "Letter Number" rules just
  447. # presented, the following input text:
  448. #
  449. #   "A-1   B 2   C3   4D   5 E   6-F   GH   IJ7LMNOP"
  450. #
  451. # Will tokenize as:
  452. #
  453. #   "A" "B" "C3" "D" "E" "F" "GH" "IJ7" "LMNOP"
  454. #
  455. # Because: A Letter may not be seperated from a following Letter, and a
  456. # Letter may not be separated from a following Number.  However, a
  457. # Number may be separated from a following Letter, and all other
  458. # characters are considered as delimiters.  Obviously, we need more
  459. # rules.  A more complete sample set follows.
  460.  
  461.  
  462. # Character Class Names, and '*'
  463. # ------------------------------
  464. #
  465. # All character class names in each rule MUST have been defined in the
  466. # Character Class Definitions in Section 1, above, with the exception of
  467. # one special "name": the '*' character.  The '*' character means that
  468. # characters of the preceeding class may occur one or more times in a
  469. # sequence.
  470. #
  471. # Note that in previous rule we said that no two letters could be
  472. # separated.  We did this with the rule:
  473. #
  474. #     Letter Letter
  475. #
  476. # But what if a single letter, such as the "A" in "Section A", occurs by
  477. # itself?  The "Letter Letter" rule does NOT say that "A" is a valid
  478. # token.  The following two rules together DO say that a single letter,
  479. # or any number of letters in a row, must be treated as a token:
  480. #
  481. #     Letter
  482. #     Letter Letter
  483. #
  484. # However, we can reduce this to a single rule using the special
  485. # character class name "*":
  486. #
  487. #     Letter *
  488. #
  489. #
  490. #
  491. # Example 2: "Unusual" Characters In Tokens
  492. #
  493. # This rule:
  494. #
  495. #   Dollar * Letter
  496. #
  497. # Says that a stream of Dollar characters may not be broken if they are
  498. # followed by a Letter.  This rule will cause these strings to be
  499. # treated as words:
  500. #
  501. #   "$$SysDevice"
  502. #   "$Fr$ed"
  503. #   "$x8"
  504. #
  505. # But the same "Dollar * Letter" rule will not accept these strings:
  506. #
  507. #   "SysDevice$$$"  -- Token will be "SysDevice", "$$$" is junk.
  508. #   "Fr$ed"         -- Tokens will be "Fr" and "$ed".
  509. #   "x$8"           -- Token will be "x", the "$" and "8" will be
  510. #                      discarded.
  511. #
  512. #
  513. #
  514. # Example 3:  More Complex Rules
  515. #
  516. # Using the example rules to this point, the string:
  517. #
  518. #   "tomd@pls.com"
  519. #
  520. # Will be tokenized as:
  521. #
  522. #   "tomd" "pls" "com"
  523. #
  524. # To cause tomd@pls.com to be accepted as a token, we can define this
  525. # rule:
  526. #
  527. #   Letter * AtSign Letter * Dot Letter *
  528. #
  529. # Or define these equivalent rules:
  530. #
  531. #   Letter *
  532. #   Letter AtSign
  533. #   AtSign Letter
  534. #   Letter Dot Letter
  535. #
  536. #
  537. #
  538. # Implicit Linking of Rules
  539. # -------------------------
  540. #
  541. # It is important to note that rules functionally link to each other.
  542. # For example, we used these two rules in the previous example:
  543. #
  544. #   Letter AtSign
  545. #   AtSign Letter
  546. #
  547. # That is, a Letter may not be separated from a following AtSign, and an
  548. # AtSign may not be separated from a following Letter, which
  549. # functionally has the same effect as:
  550. #
  551. #   Letter AtSign Letter
  552. #
  553. # Thus, the last character class on a rule can match-up with the same
  554. # character class at the head of another rule (or the same rule) to
  555. # match longer strings.  In fact, the tokenizer does this, internally,
  556. # to create the longest tokens it can from an input stream.
  557. #
  558. #
  559. # EndRule: End of Definitions Marker
  560. # ----------------------------------
  561. #
  562. # The last "rule" in the list of rules MUST consist of solely the
  563. # EndRule character class (i.e., the rule with Value 1).  It tells the
  564. # Word Continuation Rule loader that it is finished.  If the EndRule is
  565. # missing, the Word Continuation Rule loader will try to eat any
  566. # following data as continuation rules, and will fail.
  567. #
  568. # Default Word Continuation Rules
  569. # -------------------------------
  570. #
  571. # The following, short, ruleset will create tokens consisting of
  572. # Numbers, Letters, and Dollars freely intermixed.  It will NOT create
  573. # tokens containing ONLY Dollars; the rules state that for a Dollar to
  574. # be part of a token, the Dollar must be followed by a Letter.  The
  575. # rules also allow a single bang character, "!", at the beginning of a
  576. # token.  Note that these rules are intended for a particular type of
  577. # technical documentation, and will probably not exactly fit your needs.
  578. #
  579. #
  580. # Examples Using Default Word Continuation Rules
  581. # ----------------------------------------------
  582. #
  583. # Example 1':
  584. #
  585. # The string from Example 1:
  586. #
  587. #   "A-1   B 2   C3   4D   5 E   6-F   GH   IJ7LMNOP"
  588. #
  589. # Previously tokenized as:
  590. #
  591. #   "A" "B" "C3" "D" "E" "F" "GH" "IJ7" "LMNOP"
  592. #
  593. # With the default rules, below, tokenizes as:
  594. #
  595. #   "A" "1" "B" "2" "C3" "4D" "5" "E" "6" "F" "GH" "IJ7MNOP"
  596. #
  597. #
  598. # Example 2':
  599. #
  600. # The strings from Example 2:
  601. #
  602. #   "$$SysDevice"
  603. #   "$Fr$ed"
  604. #   "$x8"
  605. #
  606. # Previously tokenized as:
  607. #
  608. #   "SysDevice" "Fr" "$ed" "x"
  609. #
  610. # With the default rules, below, tokenize as:
  611. #
  612. #   "$$SysDevice" "$Fr$ed" "$x8"
  613. #
  614. #
  615. #
  616. # Example 3':
  617. #
  618. # The string from Example 3:
  619. #
  620. #   "tomd@pls.com"
  621. #
  622. # Will still be tokenized as (lacking the AtSign and Dot rules):
  623. #
  624. #   "tomd" "pls" "com"
  625. #
  626. #
  627. #
  628. #
  629. # Performance Hints
  630. # =================
  631. #
  632. #
  633. # 1) Keep Rules As Simple As Possible.  The simpler the rule, the faster
  634. # the word-continuation tests.  If a rule uses few character classes,
  635. # and contains few items, it is "simple."  If a rule uses more than two
  636. # character classes, or uses two or more classes in different
  637. # permutations, the rule is "complex."
  638. #
  639. # 2) Define As Few Rules As Possible.  The fewer rules there are to
  640. # check, the faster will be tokenization.
  641. #
  642. #
  643. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  644. #
  645. # Word Continuation Rules
  646. #
  647. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- -
  648. #
  649. # I apologize if this explanation has been overly long, especially given
  650. # the brevity of the following rules.  This documentation is partially
  651. # for me (Tom Donaldson), and partially for anyone using the tokenizer.
  652. # If I jot it down now, there is a better chance I will "remember" it
  653. # all later!
  654. #
  655. #
  656. Letter
  657. Number
  658. Letter Letter
  659. Number Number
  660. Letter Number
  661. Number Letter
  662. Letter Dot HardSpace Letter
  663. Letter Dot HardSpace Number
  664. Paragraf HardSpace Letter
  665. Paragraf HardSpace Number
  666. #
  667. #
  668. # Rule End MUST be the last rule in the continuation rules.
  669. # It must NOT occur as part of any other rule.
  670. #
  671. EndRule
  672. #
  673. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  674.  
  675.  
  676. ####################################################################
  677. #
  678. # Section 4: Canonization Map
  679. #
  680. ####################################################################
  681. #
  682. # After the tokenizer returns a "word", based on the rules defined in
  683. # the first three sections of this file, it must be put into a
  684. # regularized, "canonical", form to make searches easier and faster.  In
  685. # fact, canonizing tokens can also drastically reduce the size of the
  686. # database's dictionary.
  687. #
  688. # A common form of canonization is to convert all lower case letters to
  689. # upper case, and use the upper cased terms in the index and during
  690. # searches.  This allows, for example, the word "NeXT" to match the
  691. # words "next", "NEXT", "nExt", etc.  Note that this also means that
  692. # only one version of "next" is stored in the index, rather than all
  693. # permutations on the case of the letters that might exist in the
  694. # database.
  695. #
  696. # The canonization map allows you to determine what character by
  697. # character transforms are performed during canonization.  The default
  698. # canonization supplied in the following table maps all lower case
  699. # characters to upper case.  All other values are mapped to themselves;
  700. # that is, all other values are unchanged after canonization.
  701. #
  702. # For example, in some databases you might want to convert the "A WITH
  703. # TILDE" to a plain "A".  You can do this by specifying that the "A
  704. # WITH TILDE" character, with character code 195, should be canonized
  705. # to the character "A", with character code 65:
  706. #
  707. #   195 65      # Canonize A-tilde as A
  708. #
  709. #
  710. # Default Values
  711. # ==============
  712. #
  713. # You do not have to define a mapping for all characters.  The default
  714. # for all characters is to map to itself.  Thus, your canonization
  715. # mapping table need only contain characters which you want to have
  716. # translated after tokenization.
  717. #
  718. # CRITICAL
  719. # ========
  720. #
  721. # As for the previous table, there is a special value for this
  722. # Canonization Map that marks its end.  The special value is -1.  The
  723. # decimal character code -1 will cause the Canonization Map loader to
  724. # stop reading.
  725. #
  726. #
  727. # Performance Hints
  728. # =================
  729. #
  730. # None.
  731. #
  732. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  733. #
  734. # Default Canonization Map
  735. #
  736. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  737. #
  738. # -------       -------         -----------
  739. #  Input        Output
  740. # Decimal       Decimal
  741. #  Char          Char
  742. #  Value         Value          Comment
  743. # -------       -------         -----------
  744. #
  745. # Map the characters a-z to the "canonical" characters A-Z.  That is,
  746. # all letters will be upper cased.
  747.    97           65              # Char 'a' canonizes to 'A'
  748.    98           66              # Char 'b' canonizes to 'B'
  749.    99           67              # Char 'c' canonizes to 'C'
  750.   100           68              # Char 'd' canonizes to 'D'
  751.   101           69              # Char 'e' canonizes to 'E'
  752.   102           70              # Char 'f' canonizes to 'F'
  753.   103           71              # Char 'g' canonizes to 'G'
  754.   104           72              # Char 'h' canonizes to 'H'
  755.   105           73              # Char 'i' canonizes to 'I'
  756.   106           74              # Char 'j' canonizes to 'J'
  757.   107           75              # Char 'k' canonizes to 'K'
  758.   108           76              # Char 'l' canonizes to 'L'
  759.   109           77              # Char 'm' canonizes to 'M'
  760.   110           78              # Char 'n' canonizes to 'N'
  761.   111           79              # Char 'o' canonizes to 'O'
  762.   112           80              # Char 'p' canonizes to 'P'
  763.   113           81              # Char 'q' canonizes to 'Q'
  764.   114           82              # Char 'r' canonizes to 'R'
  765.   115           83              # Char 's' canonizes to 'S'
  766.   116           84              # Char 't' canonizes to 'T'
  767.   117           85              # Char 'u' canonizes to 'U'
  768.   118           86              # Char 'v' canonizes to 'V'
  769.   119           87              # Char 'w' canonizes to 'W'
  770.   120           88              # Char 'x' canonizes to 'X'
  771.   121           89              # Char 'y' canonizes to 'Y'
  772.   122           90              # Char 'z' canonizes to 'Z'
  773.   185        165             #
  774.   230        198             #
  775.   234        202             #
  776.   179        163             #
  777.   241        209             #
  778.   243        211             #
  779.   156        140             #
  780.   159        143             #
  781.   191        175             #
  782. # ---           -----           -----------------------
  783.    -1           -1              # Not loaded.  Just marks end of map definition.
  784. # ---           -----           -----------------------
  785.  
  786. ####################################################################
  787. #
  788. #
  789. # End Of File: tknztbld.def
  790. #
  791. #
  792. ####################################################################