Simon HARPER wrote:

As an addition to this does the sorting machinery allow frequency counts for words in a text field?

The old MetaCard IDE shipped with a very efficient word-counting script as one of its examples. Here it is with superfluous stuff removed and reformatted as a function:

function wordCount pText
  repeat for each word w in pText
    add 1 to wordCount[w]
  end repeat
  put keys(wordCount) into keyWords
  sort keyWords -- optional
  repeat for each line l in keyWords
    put l & tab & wordCount[l] & return after tResult
  end repeat
  return tResult
end wordCount

--
Jacqueline Landman Gay         |     [EMAIL PROTECTED]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to