home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Contrib / Patricia / Patricia.doc < prev    next >
Text File  |  1995-09-26  |  6KB  |  128 lines

  1.                                  Patricia
  2.          ---===================================================---
  3.      Practical Algorithm To Retrieve Information Coded In Alphanumeric
  4.  
  5.  
  6. Overview
  7. --------
  8. This  implementation  is  an enhanced version of D.R. Morrison's Patricia as
  9. described in [1]. Some of the features are:
  10.  
  11. - Search for arbitrary text in AmigaGuide and ascii files.
  12. - The result is an amigaguide file with links to all files, resp. AmigaGuide
  13.   nodes the search text is found in and occurence numbers for each entry.
  14. - The text passages found can be highlighted.
  15. - Text search is based on a precalculated database, so search is very fast.
  16. - With a suitable database all occurences (even as subwords) of every word
  17.   are found. On database creation the range of words added to the database
  18.   can be reduced to decrease database size, however.
  19.  
  20. PSearch documentation
  21. ---------------------
  22. PSearch can be started from Workbench and Shell and supports all OS >= 1.2.
  23. Shell arguments from OS 2.04 on are:
  24.  
  25. DataBases/A/M,Search/K,P=FilePattern/K,NOH=NoHighlight/S,Profile/S,
  26. BaseDir/K,TempDir/K,GuideViewer/K,TextViewer/K,PHighPath/K
  27.  
  28. DataBases   - a list of patricia databases to search in
  29. Search      - text(s) that PSearch will search (see below)
  30. FilePattern - only files in the database matching this pattern are searched
  31. NoHighlight - don't highlight found text passages
  32. Profile     - print some statistics while searching
  33. BaseDir     - path the searched files are located in;
  34.               usually saved in the database itself on creation
  35. TempDir     - used for temporary files and for highlighted texts,
  36.               Default: "T:"
  37.               Should you run out of RAM, use a directory on harddrive or
  38.               search with "NoHighlight".
  39. GuideViewer - AmigaGuide viewer, default: "AmigaGuide []"
  40.               Attention: To show the right node in a highlighted document
  41.               always "AmigaGuide xxx Document yyy" is used!
  42. TextViewer  - used to show ascii texts, default: "More []"
  43. PHighPath   - the path PHighlight is located in
  44.               Can be omitted if PHighlight is in the search path or the
  45.               current directory when starting PSearch.
  46.  
  47. With OS <= 1.3 unix style argument parsing is used and
  48. some features are disabled: GUI, profiling and pattern matching.
  49.  
  50. PSearch -s Search -n -b BaseDir -t TempDir -g GuideViewer
  51.         -v TextViewer -h PHighPath - DataBase1 DataBase2 ...
  52.                                   ^^^
  53.                                Please mind the dash!
  54. -sbtgvh - the same as above
  55. -n      - NoHighlight
  56.  
  57. PHighlight  is  used in PSearch to highlight text passages and should not be
  58. called manually. It will be found if it is in the search path, in the
  59. current directory when starting PSearch or you give the full path.
  60.  
  61. Search Text
  62. -----------
  63. PSearch  can search for an arbitrary  number of text passages  separated  by
  64. " | ". The spaces around the "|" are nescessary, otherwise it is part of the
  65. word  beside it. The text itself can consist of several words. The text will
  66. only  be  found if the words are seperated by the same number of whitespaces
  67. both in the search text and in the files being searched, i.e.
  68. "Meeting Pearls"  (one  space)  is   different  from  "Meeting  Pearls" (two
  69. spaces).  A  carriage  return,  spaces  and  tabs  are  all  treated  as one
  70. whitespace.
  71.  
  72. A  text  might not be found when it contains a word that is either too short
  73. or  occured too often in the text. Your are warned about this in the result,
  74. but there is also a "workaround" for this: Assume you search for "dummy-name
  75. has dummy-verb".
  76.  
  77. "has" is  probably not stored in the database,  thus this text  might not be
  78. found. You can  search for "dummy-name     dummy-verb" (three spaces instead
  79. of "has"). This will find more occurences, but it will also find "dummy-name
  80. had dummy-verb".
  81.  
  82. Limitations
  83. -----------
  84. If  the  range of words stored in the database is intentionally limited or a
  85. error  occured  while  searching,  the search might not be complete. You are
  86. warned  in  the  result  AmigaGuide  document  about  this  and  a  detailed
  87. explanation  is  given.  All  inexact  occurence numbers will have a ">=" in
  88. front of them.
  89.  
  90. If a word in an AmigaGuide document is partly written in another text style,
  91. then  you  can  only  search  for  each part, not for the whole word. If you
  92. search  for  a  sequence  of words and in the text there are format commands
  93. between  some  of  these  words,  then  PSearch will not find this sequence,
  94. because  it  cannot  distinguish  between  spaces and format commands in the
  95. file.
  96.  
  97. Distribution
  98. ------------
  99. This  distribution  includes  only  the  programs nescessary to search in an
  100. existing  database (PSearch and PHighlight). They can be distributed freely.
  101. The program PCreateDB used to create a patricia database is not included and
  102. must  not  be  distributed without the author's permission. All programs and
  103. text files are © 1995 by Patrick Ohly.
  104.  
  105. If  you want to use Patricia to create and distribute your own databases ask
  106. the  author  for permission and conditions. Angela Schmidt is herewith given
  107. the permission to create databases for the Meeting Pearls III and to include
  108. PSearch, PHighlight and this documentation on that CD.
  109.  
  110.  
  111. The Author
  112. ----------
  113. Patrick Ohly
  114. Weechstr. 1, WG E0/1
  115. 76131 Karlsruhe
  116. Germany
  117.  
  118. Tel.: +49 721 615662
  119. eMail: patrick.ohly@stud.uni-karlsruhe.de
  120. IRC: Irish@AmigaGer
  121.  
  122.  
  123. References
  124. ----------
  125. [1] R. Sedgewick, Algorithmen; Addison-Wesley 1992
  126. [2] D. E. Knuth, The Art of Computer Programming,
  127.     Volume 3: Sorting and Searching, Addison-Wesley 1975
  128.