#REFACTORING by exept
class: HTMLDocGenerator class
changed:
#generateKWIC
#generateKWICForClassAndMethodNames
--- a/HTMLDocGenerator.st Sat Oct 05 11:20:18 2019 +0200
+++ b/HTMLDocGenerator.st Sat Oct 12 15:06:03 2019 +0200
@@ -421,28 +421,10 @@
!
generateKWIC
- |fillWords kwic|
-
- fillWords :=
- #(
- 'the' 'a'
- 'can' 'you'
- 'to' 'in' 'out' 'at' 'of'
- 'also' 'with' 'without' 'all' 'any' 'how'
- 'however' 'although' 'always' 'either' 'neither'
- 'anywhere' 'anyway' 'anything' 'anyone'
- 'not' 'but' 'else' 'elsewhere'
- 'am' 'are' 'is' 'be' 'will' 'wont' 'won''t' 'do' 'don''t'
- 'no' 'non' 'now' 'old' 'on' 'only'
- 'my' 'their' 'your' 'its'
- 'one' 'two' 'three'
- 'etc' 'for' 'lot' 'lots' 'made' 'may' 'most' 'mostly' 'much'
- 'use' 'this' 'that' 'which' 'what' 'why'
- 'or' 'other' 'please'
- ).
-
+ |kwic|
+
kwic := KeywordInContextIndexBuilder new.
- kwic excluded:fillWords.
+ kwic excluded:(KeywordInContextIndexBuilder fillWordsEnglish).
kwic separatorAlgorithm:[:line |
line asCollectionOfSubstringsSeparatedByAny:' ^~=@.:,;-+*/()[]|{}#"''<>',Character cr
].
@@ -488,28 +470,10 @@
!
generateKWICForClassAndMethodNames
- |fillWords kwic|
-
- fillWords :=
- #(
-"/ 'the' 'a'
-"/ 'can' 'you'
-"/ 'to' 'in' 'out' 'at' 'of'
-"/ 'also' 'with' 'without' 'all' 'any' 'how'
-"/ 'however' 'although' 'always' 'either' 'neither'
-"/ 'anywhere' 'anyway' 'anything' 'anyone'
-"/ 'not' 'but' 'else' 'elsewhere'
-"/ 'am' 'are' 'is' 'be' 'will' 'wont' 'won''t' 'do' 'don''t'
-"/ 'no' 'non' 'now' 'old' 'on' 'only'
-"/ 'my' 'their' 'your' 'its'
-"/ 'one' 'two' 'three'
-"/ 'etc' 'for' 'lot' 'lots' 'made' 'may' 'most' 'mostly' 'much'
-"/ 'use' 'this' 'that' 'which' 'what' 'why'
-"/ 'or' 'other' 'please'
- ).
-
+ |kwic|
+
kwic := KeywordInContextIndexBuilder new.
- kwic excluded:fillWords.
+ kwic excluded:#().
kwic separatorAlgorithm:[:name |
|words|
words := Set new.