You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

142 lines
954 B

  1. // Copyright 2013 The Go Authors. All rights reserved.
  2. //
  3. // Use of this source code is governed by a BSD-style
  4. // license that can be found in the LICENSE file or at
  5. // https://developers.google.com/open-source/licenses/bsd.
  6. package database
  7. import (
  8. "strings"
  9. )
  10. var stopWord = createStopWordMap()
  11. func createStopWordMap() map[string]bool {
  12. m := make(map[string]bool)
  13. for _, s := range strings.Fields(stopText) {
  14. m[s] = true
  15. }
  16. return m
  17. }
  18. const stopText = `
  19. a
  20. about
  21. after
  22. all
  23. also
  24. am
  25. an
  26. and
  27. another
  28. any
  29. are
  30. as
  31. at
  32. b
  33. be
  34. because
  35. been
  36. before
  37. being
  38. between
  39. both
  40. but
  41. by
  42. c
  43. came
  44. can
  45. come
  46. could
  47. d
  48. did
  49. do
  50. e
  51. each
  52. f
  53. for
  54. from
  55. g
  56. get
  57. got
  58. h
  59. had
  60. has
  61. have
  62. he
  63. her
  64. here
  65. him
  66. himself
  67. his
  68. how
  69. i
  70. if
  71. in
  72. into
  73. is
  74. it
  75. j
  76. k
  77. l
  78. like
  79. m
  80. make
  81. many
  82. me
  83. might
  84. more
  85. most
  86. much
  87. must
  88. my
  89. n
  90. never
  91. now
  92. o
  93. of
  94. on
  95. only
  96. or
  97. other
  98. our
  99. out
  100. over
  101. p
  102. q
  103. r
  104. s
  105. said
  106. same
  107. see
  108. should
  109. since
  110. some
  111. still
  112. such
  113. t
  114. take
  115. than
  116. that
  117. the
  118. their
  119. them
  120. then
  121. there
  122. these
  123. they
  124. this
  125. those
  126. through
  127. to
  128. too
  129. u
  130. under
  131. v
  132. w
  133. x
  134. y
  135. z
  136. `