home *** CD-ROM | disk | FTP | other *** search
/ World Book - Encyclopedia of Science / WBScience.iso / DATA / QryConfig / Verity / sample.lng < prev    next >
Text File  |  1998-04-26  |  17KB  |  553 lines

  1. #
  2. # Sample locale file for VDK 2.0.
  3. #
  4. $control: 1
  5. locale:
  6. {
  7.   #
  8.   # Description: Inherit attributes from a different locale. All keywords 
  9.   # in this lng file will overwrite any attributes from the parent
  10.   # locale. This provides a type of "subclass" mechanism for locales. For
  11.   # example, the French Canadian locale might inherit from the French
  12.   # locale, but over-ride the upper and lower case tables.
  13.   #
  14.   # Default: The locale "english" which implements basic english
  15.   #   functionality in charset 850
  16.   #
  17.   # This keyword is optional
  18.   inherit: "locale_name"
  19.  
  20.   #
  21.   # Description: This gives the major and minor version number of the
  22.   #   the current locale. This information is stamped into collections
  23.   #   when they are created so that you can tell which version of a
  24.   #   locale the collection is created with.
  25.   #
  26.   # Default: The default version is 1.0
  27.   #
  28.   # These keywords are optional
  29.   Major-Version: number
  30.   Minor-Version: number
  31.  
  32.   #
  33.   # Description: For numeric formatting, this tells the search engine to 
  34.   # use either a comma or a period as the decimal point.
  35.   #
  36.   # Default: period
  37.   #
  38.   # This keyword is optional
  39.   decimal: "dot_or_comma"
  40.  
  41.   #
  42.   # Description: Load in a library of routines to implement functional 
  43.   # callbacks for this locale.  Fill in a normal DDA spec for a library.
  44.   # The optional name specifies a name to use in the tokenizers section
  45.   # below. (q.v.)
  46.   #
  47.   # Example:  
  48.   #  driver: "DLL:french:InitFrenchLocale"
  49.   #
  50.   # This keyword is optional
  51.   driver:  "dda_spec" [ "name" ]
  52.   ...
  53.  
  54.  
  55.   #
  56.   # Description: Flags that give an indication to the engine what settings
  57.   # to use as the default for the current locale.
  58.   #
  59.   # Default: for each of the settings is "no"
  60.   #
  61.   locale-flags:
  62.   {
  63.     #
  64.     # query parser flags -- these flags affect the way the default query
  65.     # parser works
  66.     #
  67.  
  68.     # Automatically turn on case-sensitive search when a capital letter
  69.     # is found in the query string?
  70.     NoAutoCase:   yes/no
  71.  
  72.     # Use the locale's tokenizer (either the DLL function or the lex rules)
  73.     # when tokenizing a blob of text in the query?
  74.     # No will cause the engine to use its built-in tokenizer.
  75.     QueryTok:     yes/no
  76.  
  77.     # Automatically generate an expanded search when a punctuation character
  78.     # is found in a search term? For example, "AT&T" is expanded to search
  79.     # for a number of possible variations (tokenizations): 
  80.     #
  81.     # <Any>(<Many><Stem>`AT&T`,<Many><Phrase>(<Many><Stem>`AT`,<Many><Stem>`T`),
  82.     #       <Many><Phrase>(<Many><Stem>`AT`,<Many><Stem>`&`,<Many><Stem>`T`))
  83.     NoAutoPhrase: yes/no
  84.  
  85.     #
  86.     # tokenization flags -- these flags affect the way text is tokenized
  87.     # in this locale
  88.     #
  89.  
  90.     # Use the engine's built-in 8bit lexer to tokenize any unprocessed
  91.     # text chunks returned by this locale's functional tokenizer.  If this
  92.     # is on, the tokenize driver may defer tokenization of ASCII 
  93.     # passages to the engine by returning these passages as VdkBuffer 
  94.     # tokens.  For example, a multibyte tokenizer can return sections of 
  95.     # embedded English text as buffer tokens, letting the engine tokenize
  96.     # them with its built-in lexer.
  97.     NeedAsciiTok: yes/no
  98.   }
  99.  
  100.   #
  101.   # Description: The following strings are used to identify a locale.
  102.   #
  103.   locale-def:
  104.   {
  105.     #
  106.     # Description: Name of this locale IF and only if it is different from 
  107.     # the name of the subdirectory under common for this locale. This 
  108.     # keyword was designed to be used with the "default" locale.
  109.     #
  110.     # Default: name of current locale dir
  111.     #
  112.     # This keyword is optional
  113.     name:    "locale_name"
  114.  
  115.     #
  116.     # Description: Name of this language. This should be a 2 letter string
  117.     # in a ISO 639 coding.
  118.     #
  119.     # Default: language of parent locale (or english "en" when no parent
  120.     # is explicitly specified.)
  121.     #
  122.     # This keyword is optional
  123.     langName: "language_name"
  124.  
  125.     #
  126.     # Description: Name of the country. This should be a 2 letter string
  127.     # in a ISO 3166 coding.
  128.     #
  129.     # Default: country of parent locale (or "US" when no parent
  130.     # is explicitly specified.)
  131.     #
  132.     # This keyword is optional
  133.     country:  "country_name"
  134.  
  135.     #
  136.     # Description: Name of the character set for this locale. All strings 
  137.     # that this locale will manipulate are written in this charset, and all 
  138.     # tables and data in this lng file are written in this charset.
  139.     #
  140.     # Default: charset of parent locale (or 850 when no parent
  141.     # is explicitly specified.)
  142.     #
  143.     # This keyword is optional
  144.     charset: "charset_name"
  145.  
  146.     #
  147.     # Description: name of the subdialect of the given language. 
  148.     #
  149.     # Default: dialect of parent locale
  150.     #
  151.     # This keyword is optional
  152.     dialect: "dialect_name"
  153.  
  154.     #
  155.     # Description: name of the supplier of this locale. This string
  156.     # can be any arbitrary string, including your company name.
  157.     #
  158.     # Default: supplier of parent locale
  159.     #
  160.     # This keyword is optional
  161.     supplier: "supplier_name"
  162.   }
  163.  
  164.   #
  165.   # Description: Specify the tokenizers for various purposes.
  166.   #
  167.   # Equivalent: style.lex rules
  168.   #
  169.   # Default: the hard-wired 8bit lexer for English. If you do not specify
  170.   # a tokenizer for any particular purpose, then it will use the tokenizer
  171.   # you specify for the "default" purpose. If you don't specify the "default"
  172.   # purpose, then it will use the built-in hard-wired 8bit lexer for English.
  173.   #
  174.   # WARNING! Tokenization is a very sensitive process. If you use different 
  175.   # tokenizers for different purposes, your highlighting is likely to be 
  176.   # off. DO NOT CHANGE TOKENIZERS UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!
  177.   # A good solution is to set only one tokenizer for the "stream" purposes
  178.   # and possibly one for the "extract" purposes, as these are pretty 
  179.   # independent. The best solution for most accurate highlighting is to 
  180.   # use one tokenizer for all purposes. Set this using the "default" 
  181.   # purpose. (q.v.)
  182.   #
  183.   # This keyword is optional.
  184.   tokenizers:
  185.   {
  186.     #
  187.     # Description: name the tokenizer to be used for indexing the
  188.     # document.
  189.     #
  190.     # WARNING! If this tokenizer is different than the "View" tokenizer,
  191.     # you will VERY likely have your highlights be off. Do not set this
  192.     # differently unless you know what you are doing. You may want to
  193.     # change the "stream" tokenizer instead, which sets the tokenizer
  194.     # for all of the "index", "view", and "dynamichl" purposes.
  195.     Index:     args
  196.  
  197.     #
  198.     # Description: name the tokenizer to be used for viewing the
  199.     # document using VdkDocStreamRead. (This includes viewing with
  200.     # highlights from the full-text index.)
  201.     #
  202.     # WARNING! If this tokenizer is different than the "Index" tokenizer,
  203.     # you will VERY likely have your highlights be off. Do not set this
  204.     # differently unless you know what you are doing. You may want to
  205.     # change the "stream" tokenizer instead, which sets the tokenizer
  206.     # for all of the "index", "view", and "dynamichl" purposes.
  207.     View:      args
  208.  
  209.     #
  210.     # Description: name the tokenizer to be used for parsing strings
  211.     # in a BooleanPlus query.
  212.     #
  213.     # WARNING! If this tokenizer is different than the "Index" tokenizer,
  214.     # then query words will be less likely to match words in the index
  215.     # and your recall rate will be less. Do not change this tokenizer
  216.     # unless you know what you are doing!
  217.     Query:     args
  218.  
  219.     #
  220.     # Description: name the tokenizer to be used for tokenizing a 
  221.     # document that is being summarized.
  222.     Summarize: args
  223.  
  224.     #
  225.     # Description: name the tokenizer to be used for tokenizing a 
  226.     # document that is being used as a query-by-example document.
  227.     QBE:       args
  228.  
  229.     #
  230.     # Description: name the tokenizer to be used for tokenizing a 
  231.     # free-text query.
  232.     FTQP:      args
  233.  
  234.     #
  235.     # Description: name the tokenizer to be used for tokenizing a 
  236.     # document that is being highlighted dynamically.
  237.     DynamicHL: args
  238.  
  239.     #
  240.     # Description: short form for naming the tokenizer used for all
  241.     # of the Summarize, FTQP, and QBE purposes
  242.     Extract:   args
  243.  
  244.     #
  245.     # Description: short form for naming the tokenizer used for all
  246.     # of the Index, View, and DynamicHL purposes
  247.     Stream:    args
  248.  
  249.     #
  250.     # Description: name the tokenizer to be used as a default if
  251.     # any of the above purposes are not explicitly set to a particular
  252.     # tokenizer
  253.     Default:   args
  254.  
  255.     #
  256.     # The arguments to the above can be one of the following:
  257.     #
  258.     #   driver "driverName"  
  259.     #     - get the functional tokenizer from the named driver
  260.     #
  261.     #   HWLEX
  262.     #     - use the internal hard-wired lexer
  263.     #
  264.     #   LEX
  265.     #     - a set of style.lex type of rules is included to specify
  266.     #       a new lexer
  267.     #       This is an 8bit table and can only be used for locales
  268.     #       that specify a character set that is of type singlebyte.
  269.     #       These lex rules have the same syntax as the style.lex file rules.
  270.     #       Note: If you are defining a multibyte locale, you must 
  271.     #       provide the above functions in the locale driver.
  272.     #       If you are in a single byte locale, you can optionally write the 
  273.     #       above functions in the driver, but a the table below is more 
  274.     #       efficient.
  275.     #
  276.     # Example 1: for a knowledgable localizer. This example might give
  277.     #   highlighting problems because it uses different tokenizers for
  278.     #   different purposes.
  279.     # 
  280.     #  $control: 1
  281.     #  locale:
  282.     #  {
  283.     #    # named drivers
  284.     #    driver: "insowrap"  "inso"
  285.     #    driver: "veritytok" "verity"
  286.     # 
  287.     #    tokenizers:
  288.     #    {
  289.     #      Extract:    driver "inso"
  290.     # 
  291.     #      Index:      driver "verity"
  292.     #      View:       driver "verity"
  293.     #
  294.     #      DynamicHL: LEX
  295.     #      {
  296.     #        define: NL  "[ \t]*\n"
  297.     # 
  298.     #        token: WORD     "[A-Za-z0-9]+"      # word
  299.     #        token: WORD     "[0-9]+\\.[0-9]+"   # word
  300.     #        token: EOS      "[.?!]"         # end of sentence
  301.     #        token: NEWLINE  "{NL}"          # single end-of-line
  302.     #        token: EOP      "{NL}({NL})+"       # end of paragraph
  303.     #        token: TAB      "\t+"           # tab
  304.     #        token: WHITE    " +"            # whitespace
  305.     #        token: PUNCT    "."         # all other text
  306.     #      }
  307.     # 
  308.     #      Default: HWLEX
  309.     #    }
  310.     #  }
  311.     #
  312.     # Example 2: for basic tokenization. This example gives the best
  313.     #   overall highlighting fidelity because the same tokenizer is 
  314.     #   used everywhere.
  315.     #
  316.     #  $control: 1
  317.     #  locale:
  318.     #  {
  319.     #    # named drivers
  320.     #    driver: "insowrap"  "inso"
  321.     # 
  322.     #    tokenizers:
  323.     #    {
  324.     #      # use this tokenizer for everything
  325.     #      Default: driver "inso"
  326.     #    }
  327.     #  }
  328.   }
  329.  
  330.   #
  331.   # Description: Specify the attributes of each character. (The "ctype" 
  332.   # table for those that know C.) 
  333.   #
  334.   # Each entry is a bit field combination of the following:
  335.   #  LOC_UP  0x01    /* upper case letter */
  336.   #  LOC_LW  0x02    /* lower case letter */
  337.   #  LOC_NM  0x04    /* digit[0-9] */
  338.   #  LOC_SP  0x08    /* whitespace */
  339.   #  LOC_PT  0x10    /* char sometimes used as punctuation */
  340.   #  LOC_AL  0x20    /* alphabetic char (ie. non-punctuation) */
  341.   # (The above list was extracted from vdk_loc.h)
  342.   #
  343.   # Equivalent: Ctype() function in the driver
  344.   #
  345.   # Note: This is an 8bit table and can only be used for locales
  346.   # that specify a character set that is of type singlebyte.
  347.   #
  348.   # Default: English ctype table in charset 850
  349.   #
  350.   # This keyword is optional.
  351.   table: CHARTYPE
  352.   {
  353.     text: 0  "\x00\x01\x02 ..."
  354.     text: 16 "\x00\x01\x02 ..."
  355.   }
  356.  
  357.   #
  358.   # Description: Specify the attributes of each character. 
  359.   # (The "ctype" table for those that know C.) 
  360.   #
  361.   # Each entry is a bit field combination of the following:
  362.   #  LOC_UP  0x01    /* upper case letter */
  363.   #  LOC_LW  0x02    /* lower case letter */
  364.   #  LOC_NM  0x04    /* digit[0-9] */
  365.   #  LOC_SP  0x08    /* whitespace */
  366.   #  LOC_PT  0x10    /* char sometimes used as punctuation */
  367.   #  LOC_AL  0x20    /* alphabetic char (ie. non-punctuation) */
  368.   # (The above list was extracted from vdk_loc.h)
  369.   #
  370.   # Equivalent: Ctype() function in the driver
  371.   #
  372.   # Note: This is a multibyte mapping table, and can be used for
  373.   # any locale. However, it is much more efficient to use the table above
  374.   # if you are defining an 8bit locale.
  375.   #
  376.   # Default: English ctype table in charset 850
  377.   #
  378.   # This keyword is optional.
  379.   mtable: CHARTYPE
  380.   {
  381.     map: "char"  "bit_field"
  382.     ...
  383.   }
  384.  
  385.   #
  386.   # Description: Specify an upper-case mapping for each character.
  387.   #
  388.   # Equivalent: You must define all of the following in the driver:
  389.   #   UpperCopy()
  390.   #   ToUpper()
  391.   #   strcmp()
  392.   #   stricmp()
  393.   #   strncmp()
  394.   #   strnicmp()
  395.   #
  396.   # Note: All characters must be given an upper-cased equivalent.
  397.   # This is an 8bit table and can only be used for locales
  398.   # that specify a character set that is of type singlebyte.
  399.   #
  400.   # Default: English upper-case table in charset 850
  401.   #
  402.   # This keyword is optional.
  403.   table: TOUPPER
  404.   {
  405.     text: 0  "\x00\x01\x02 ..."
  406.     text: 16 "\x00\x01\x02 ..."
  407.     ...
  408.     text: 240 "\x00\x01\x02 ..."
  409.   }  
  410.  
  411.   #
  412.   # Description: Specify an upper-case mapping for each character.
  413.   #
  414.   # Equivalent: You must define all of the following in the driver:
  415.   #   UpperCopy()
  416.   #   ToUpper()
  417.   #   strcmp()
  418.   #   stricmp()
  419.   #   strncmp()
  420.   #   strnicmp()
  421.   #
  422.   # Note: Only characters that have an upper case version need to given an 
  423.   # upper-case mapping. All other characters are assumed to stay the same.
  424.   # This is a multibyte mapping table, and can be used for
  425.   # any locale. However, it is much more efficient to use the table above
  426.   # if you are defining an 8bit locale.
  427.   #
  428.   # Default: English upper-case table in charset 850
  429.   #
  430.   # This keyword is optional.
  431.   mtable: TOUPPER
  432.   {
  433.     map: "from_char" "to_char"
  434.     ...
  435.   }  
  436.  
  437.   #
  438.   # Specify a lower-case mapping for each character.
  439.   #
  440.   # Equivalent: You must define all of the following in the driver:
  441.   #   LowerCopy()
  442.   #   ToLower()
  443.   #   strcmp()
  444.   #   stricmp()
  445.   #   strncmp()
  446.   #   strnicmp()
  447.   #
  448.   # Note:All characters must be given an lower-cased equivalent.
  449.   # This is an 8bit table and can only be used for locales
  450.   # that specify a character set that is of type singlebyte.
  451.   #
  452.   # Default: English lower-case table in charset 850
  453.   #
  454.   # This keyword is optional.
  455.   table: TOLOWER
  456.   {
  457.     text:
  458.     ...
  459.   }  
  460.  
  461.   #
  462.   # Description: Specify an lower-case mapping for each character.
  463.   #
  464.   # Equivalent: You must define all of the following in the driver:
  465.   #   LowerCopy()
  466.   #   ToLower()
  467.   #   strcmp()
  468.   #   stricmp()
  469.   #   strncmp()
  470.   #   strnicmp()
  471.   #
  472.   # Note: Only characters that have an lower case version need to given an 
  473.   # lower-case mapping. All other characters are assumed to stay the same.
  474.   # This is a multibyte mapping table, and can be used for
  475.   # any locale. However, it is much more efficient to use the table above
  476.   # if you are defining an 8bit locale.
  477.   #
  478.   # Default: English lower-case table in charset 850
  479.   #
  480.   # This keyword is optional.
  481.   mtable: TOLOWER
  482.   {
  483.     map: "from_char" "to_char"
  484.     ...
  485.   }  
  486.  
  487.   #
  488.   # Description: Specify an sort order for each character in the character set.
  489.   # This is an 8bit table and can only be used for locales
  490.   # that specify a character set that is of type singlebyte.
  491.   #
  492.   # Equivalent: SortOrderValue() and OrdinalChar() in the driver
  493.   #
  494.   # Note: ALL characters in the character set must be listed here.
  495.   #
  496.   # Default: English sort order in charset 850
  497.   #
  498.   # This keyword is optional.
  499.   table: SORTORDER
  500.   {
  501.     text: 0  "\x00\x01\x02 ..."
  502.     text: 16 "\x00\x01\x02 ..."
  503.   }
  504.  
  505.   #
  506.   # Description: Specify an sort order for each character in the character set.
  507.   #
  508.   # Equivalent: SortOrderValue() and OrdinalChar() in the driver
  509.   #
  510.   # Note: ALL characters in the character set must be listed here.
  511.   # This is a multibyte table, and can be used for any locale. However, 
  512.   # it is much more efficient to use the table above if you are 
  513.   # defining an 8bit locale.
  514.   #
  515.   # Default: English sort order in charset 850
  516.   #
  517.   # This keyword is optional.
  518.   sortorder:
  519.   {
  520.     char: "char"
  521.     ...
  522.   }
  523.  
  524.   #
  525.   # Description: Specify a stem rules table.
  526.   #
  527.   # Equivalent: StemCopy() function in the driver.
  528.   #
  529.   # Note: If you are defining a multibyte locale, you must instead provide a
  530.   # StemCopy() function in the locale driver.
  531.   # This is an 8bit table and can only be used for locales
  532.   # that specify a character set that is of type singlebyte.
  533.   #
  534.   # Default: English 8bit stem rules
  535.   #
  536.   # This keyword is optional.
  537.   stemtable:
  538.     /minlen = <int>
  539.   {
  540.     map: "orig_text" "new_text" "goto_label" [<minlen>]
  541.       /position = <int>
  542.     ...
  543.     doubles:            "goto_label" [<minlen>]
  544.       /position = <int>
  545.     ...
  546.     label: "label"
  547.       /position = <int>
  548.       /minlen = <int>
  549.     ...
  550.   }
  551. }
  552. $$
  553.