Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.284.2.60 -r1.284.2.61 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 4 Dec 2019 10:35:18 -0000 1.284.2.60 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 5 Dec 2019 20:58:02 -0000 1.284.2.61 @@ -858,7 +858,7 @@ # regsub -all {\s} ${:value} " " value foreach w [split $value " "] { - dict incr :word_statistics $w + dict incr :word_statistics [string tolower $w] } set :word_statistics_option $flavor } @@ -875,8 +875,14 @@ FormField instproc render_word_statistics {} { #ns_log notice ":render_word_statistics: ${:word_statistics_option}" if {${:word_statistics_option} eq "word_cloud"} { + # stopword list based on lucene, added a few more terms + set stopWords { + a about an and are as at be but by do does for from how if in into is it no not of on or + such that the their then there these they this to vs was what when where who will with + } set jsWords {} foreach {word freq} [lsort -decreasing -integer -stride 2 -index 1 ${:word_statistics}] { + if {$word in $stopWords} continue lappend jsWords [subst {{text: "$word", weight: $freq}}] } set tsp [clock clicks -microseconds]