KeywordInContextIndexBuilder.st
changeset 5223 94415e3adba0
parent 4188 f823326d96a3
child 5224 2e6d0898b080
equal deleted inserted replaced
5222:0a8e81e05775 5223:94415e3adba0
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 2003 by eXept Software AG
     4  COPYRIGHT (c) 2003 by eXept Software AG
     3               All Rights Reserved
     5               All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
    14 "{ NameSpace: Smalltalk }"
    16 "{ NameSpace: Smalltalk }"
    15 
    17 
    16 Object subclass:#KeywordInContextIndexBuilder
    18 Object subclass:#KeywordInContextIndexBuilder
    17 	instanceVariableNames:'keywordToLinesMapping excluded separatorAlgorithm
    19 	instanceVariableNames:'keywordToLinesMapping excluded separatorAlgorithm
    18 		unquoteAlgorithm exclusionFilter matchSorter'
    20 		unquoteAlgorithm exclusionFilter matchSorter'
    19 	classVariableNames:''
    21 	classVariableNames:'FillWordsEnglish FillWordsGerman FillWordsFrench'
    20 	poolDictionaries:''
    22 	poolDictionaries:''
    21 	category:'Collections-Support'
    23 	category:'Collections-Support'
    22 !
    24 !
    23 
    25 
    24 !KeywordInContextIndexBuilder class methodsFor:'documentation'!
    26 !KeywordInContextIndexBuilder class methodsFor:'documentation'!
   292 
   294 
   293 new
   295 new
   294     ^ self basicNew initialize
   296     ^ self basicNew initialize
   295 ! !
   297 ! !
   296 
   298 
       
   299 !KeywordInContextIndexBuilder class methodsFor:'queries'!
       
   300 
       
   301 defaultFillWordsEnglish
       
   302     ^ #(
       
   303         'the' 'a'
       
   304         'can' 'you' 
       
   305         'to' 'in' 'out' 'at' 'of' 
       
   306         'also' 'with' 'without' 'all' 'any' 'how' 
       
   307         'however' 'although' 'always' 'either' 'neither'
       
   308         'anywhere' 'anyway' 'anything' 'anyone'
       
   309         'not' 'but' 'else' 'elsewhere'
       
   310         'am' 'are' 'is' 'be' 'will' 'wont' 'won''t' 'do' 'don''t'
       
   311         'no' 'non' 'now' 'old' 'on' 'only'
       
   312         'my' 'their' 'your' 'its'
       
   313         'one' 'two' 'three'
       
   314         'etc' 'for' 'lot' 'lots' 'made' 'may' 'most' 'mostly' 'much'
       
   315         'use' 'this' 'that' 'which' 'what' 'why'
       
   316         'or' 'other' 'please'
       
   317     ).
       
   318 !
       
   319 
       
   320 defaultFillWordsFrench
       
   321     ^ #(
       
   322         'le' 'la' 'il' 'un' 'une' 
       
   323     ).
       
   324 !
       
   325 
       
   326 defaultFillWordsGerman
       
   327     ^ #(
       
   328         'der' 'die' 'das' 'ein' 'eine' 'einer' 'eines'
       
   329         'kann' 'ich' 'du' 'er' 'sie' 'es' 'wir' 'ihr'
       
   330         'zu' 'in' 'aus' 'bei' 'von' 
       
   331         'auch' 'mit' 'ohne' 'alle' 
       
   332         'wie' 'wo' 
       
   333         'jedoch' 'obgleich' 'immer' 'entweder' 'oder' 'weder' 'noch'
       
   334         'irgendwo' 'dennoch' 'etwas' 'jemand'
       
   335         'nicht' 'aber' 'ansonsten' 
       
   336         'bin' 'sind' 'ist' 'wird' 'nicht'
       
   337         'nein' 'alt' 'auf' 'nur'
       
   338         'mein' 'dein' 'sein'
       
   339         'eins' 'zwei' 'drei'
       
   340         'etc' 'kann' 
       
   341         'oder' 'bitte'
       
   342     ).
       
   343 !
       
   344 
       
   345 fillWordsEnglish
       
   346     FillWordsEnglish isNil ifTrue:[
       
   347         ^ self defaultFillWordsEnglish
       
   348     ].
       
   349     ^ FillWordsEnglish 
       
   350 !
       
   351 
       
   352 fillWordsFrench
       
   353     FillWordsFrench isNil ifTrue:[
       
   354         ^ self defaultFillWordsFrench
       
   355     ].
       
   356     ^ FillWordsFrench 
       
   357 !
       
   358 
       
   359 fillWordsGerman
       
   360     FillWordsGerman isNil ifTrue:[
       
   361         ^ self defaultFillWordsGerman
       
   362     ].
       
   363     ^ FillWordsGerman 
       
   364 ! !
       
   365 
   297 !KeywordInContextIndexBuilder methodsFor:'accessing'!
   366 !KeywordInContextIndexBuilder methodsFor:'accessing'!
   298 
   367 
   299 excluded:aListOfExcludedWords
   368 excluded:aListOfExcludedWords
   300     "define words which are to be ignored.
   369     "define words which are to be ignored.
   301      Typically, this is a list of fillwords, such as 'and', 'the', 'in', etc."
   370      Typically, this is a list of fillwords, such as 'and', 'the', 'in', etc."