home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / MSWBASE4.ZIP / IDEAS / IDEAS93.SBP < prev    next >
Encoding:
Text File  |  1989-09-12  |  1.3 KB  |  68 lines

  1. SBP
  2.   ╜ ideas93 create a word list and count for any text document
  3.   ╩ f e
  4.   í J("TempFile.SBF") p
  5.  ┤ Ö"TempFile"
  6.  ╛ Ö"TempFile"
  7.   Æ í
  8.   ë"TempFile"
  9.   |"Word;TXT IXD;40;1,1"
  10.   |"Instances;NUM;9999.;2,1"
  11.   ¬"TempFile"
  12.   ┬"Please select a text file for input","",13,req%,req$
  13.   íreq% 0 
  14. req$ "" p Æ
  15.   ┤req$ ¢ ñ
  16.   ╪ O B("*")
  17.  ñ cx$
  18. x$  H(x$)
  19.  íx$ "" p wendline
  20.  í .( -(x$,1)) 
  21. 33 px$  +(x$, /(x$) 1)
  22. x$ x$ " "
  23.  {x$
  24. front% 1:back% 1
  25.  ╪back% 0
  26. back%  ?(front%,x$," ")
  27.  íback% front% p
  28. word$  H( ,(x$,front%,(back% front%)))
  29. word$  >(word$)
  30.  í /(word$) 40 pword$  +(word$,40)
  31.  ╪ /(word$) 0
  32.     a%  .( +(word$,1))
  33.      ía% 64  a% 
  34. 91 p
  35.  í J(word$,Word.TempFile) p
  36.  ╔ Ñword$
  37. Instances  Instances  1
  38.  ╠ Ö"TempFile"
  39.  ^
  40.  ü Ö"TempFile"
  41. Word  Word$
  42. Instances  1
  43.  ╠ Ö"TempFile"
  44. uniq% uniq% 1
  45.  Æ í
  46. words% words% 1:word$ ""
  47.      Æ í
  48.      í /(word$) pword$  -(word$, /(word$) 1)
  49.  ┘
  50. front% back% 1
  51.  Æ í
  52.  íback% front% pfront% front% 1
  53.  ┘
  54.  
  55. endline: 
  56.   ┘
  57.   å ñ
  58.   ç: ╩ n: ╩ f │
  59.   {"Alphabetic listing of all words used"
  60.   ╔ `: ╬
  61.   ╪ O B("TempFile")
  62.  ╔ ▒: ╬
  63.   ┘
  64.   {"Number of words        = "; (words%,"999999")
  65.   {"Number of unique words = "; (uniq%,"999999")
  66.   {
  67.  
  68.  
  69.