sastrawi-ruby 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/MILESTONES.md +12 -0
  4. data/data/base-word.txt +17 -1
  5. data/data/stop-words.txt +842 -0
  6. data/lib/sastrawi/dictionary/array_dictionary.rb +19 -6
  7. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule10.rb +2 -0
  8. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule11.rb +2 -0
  9. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule12.rb +2 -0
  10. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule13a.rb +2 -0
  11. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule13b.rb +2 -0
  12. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule14.rb +2 -0
  13. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule15a.rb +2 -0
  14. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule15b.rb +2 -0
  15. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule16.rb +2 -0
  16. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule17a.rb +2 -0
  17. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule17b.rb +2 -0
  18. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule17c.rb +2 -0
  19. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule17d.rb +2 -0
  20. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule18a.rb +2 -0
  21. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule18b.rb +2 -0
  22. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule19.rb +2 -0
  23. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule1a.rb +2 -0
  24. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule1b.rb +2 -0
  25. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule2.rb +2 -0
  26. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule20.rb +2 -0
  27. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule21a.rb +2 -0
  28. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule21b.rb +2 -0
  29. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule23.rb +2 -0
  30. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule24.rb +2 -0
  31. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule25.rb +2 -0
  32. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule26a.rb +2 -0
  33. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule26b.rb +2 -0
  34. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule27.rb +2 -0
  35. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule28a.rb +2 -0
  36. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule28b.rb +2 -0
  37. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule29.rb +2 -0
  38. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule3.rb +2 -0
  39. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule30a.rb +2 -0
  40. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule30b.rb +2 -0
  41. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule30c.rb +2 -0
  42. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule31a.rb +2 -0
  43. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule31b.rb +2 -0
  44. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule32.rb +2 -0
  45. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule34.rb +2 -0
  46. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule35.rb +2 -0
  47. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule36.rb +2 -0
  48. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule37a.rb +2 -0
  49. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule37b.rb +2 -0
  50. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule38a.rb +2 -0
  51. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule38b.rb +2 -0
  52. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule39a.rb +2 -0
  53. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule39b.rb +2 -0
  54. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule4.rb +2 -0
  55. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule40a.rb +2 -0
  56. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule40b.rb +2 -0
  57. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule41.rb +2 -0
  58. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule42.rb +2 -0
  59. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule5.rb +2 -0
  60. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule6a.rb +2 -0
  61. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule6b.rb +2 -0
  62. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule7.rb +2 -0
  63. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule8.rb +2 -0
  64. data/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule9.rb +2 -0
  65. data/lib/sastrawi/morphology/invalid_affix_pair_specification.rb +2 -0
  66. data/lib/sastrawi/stemmer/cache/array_cache.rb +40 -5
  67. data/lib/sastrawi/stemmer/cached_stemmer.rb +8 -0
  68. data/lib/sastrawi/stemmer/confix_stripping/precedence_adjustment_specification.rb +2 -0
  69. data/lib/sastrawi/stemmer/context/context.rb +3 -5
  70. data/lib/sastrawi/stemmer/context/removal.rb +2 -0
  71. data/lib/sastrawi/stemmer/context/visitor/dont_stem_short_word.rb +2 -0
  72. data/lib/sastrawi/stemmer/context/visitor/prefix_disambiguator.rb +2 -0
  73. data/lib/sastrawi/stemmer/context/visitor/remove_derivational_suffix.rb +2 -0
  74. data/lib/sastrawi/stemmer/context/visitor/remove_inflectional_particle.rb +2 -0
  75. data/lib/sastrawi/stemmer/context/visitor/remove_inflectional_possessive_pronoun.rb +2 -0
  76. data/lib/sastrawi/stemmer/context/visitor/remove_plain_prefix.rb +2 -0
  77. data/lib/sastrawi/stemmer/context/visitor/visitor_provider.rb +2 -0
  78. data/lib/sastrawi/stemmer/filter/text_normalizer.rb +10 -0
  79. data/lib/sastrawi/stemmer/stemmer.rb +10 -0
  80. data/lib/sastrawi/stemmer/stemmer_factory.rb +2 -0
  81. data/lib/sastrawi/stop_word_remover/stop_word_remover.rb +4 -0
  82. data/lib/sastrawi/stop_word_remover/stop_word_remover_factory.rb +19 -107
  83. data/lib/sastrawi/version.rb +1 -1
  84. data/lib/sastrawi.rb +2 -0
  85. metadata +3 -1
@@ -1,14 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'set'
4
+
1
5
  module Sastrawi
2
6
  module Dictionary
3
7
  class ArrayDictionary
4
- attr_reader :words
5
-
6
8
  def initialize(words = [])
7
- @words = []
9
+ @words = Set.new
8
10
 
9
11
  add_words(words)
10
12
  end
11
13
 
14
+ ##
15
+ # Return the words as an Array (for backward compatibility)
16
+
17
+ def words
18
+ @words.to_a
19
+ end
20
+
12
21
  ##
13
22
  # Check whether a word is contained in the dictionary
14
23
 
@@ -20,7 +29,7 @@ module Sastrawi
20
29
  # Count how many words in the dictionary
21
30
 
22
31
  def count
23
- @words.length
32
+ @words.size
24
33
  end
25
34
 
26
35
  ##
@@ -36,9 +45,13 @@ module Sastrawi
36
45
  # Add a word to the dictionary
37
46
 
38
47
  def add(word)
39
- return if word.nil? || word.strip == ''
48
+ unless word.is_a?(String)
49
+ raise ArgumentError, "dictionary entries must be strings, got #{word.class}"
50
+ end
51
+
52
+ return if word.strip == ''
40
53
 
41
- @words.push(word)
54
+ @words.add(word)
42
55
  end
43
56
 
44
57
  ##
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Morphology
3
5
  module Disambiguator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ##
2
4
  # Asian J. (2007) "Effective Techniques for Indonesian Text Retrieval". page 26
3
5
  # http://researchbank.rmit.edu.au/eserv/rmit:6312/Asian.pdf
@@ -1,23 +1,58 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Stemmer
3
5
  module Cache
4
6
  class ArrayCache
5
- attr_reader :data
7
+ DEFAULT_MAX_SIZE = 10_000
8
+
9
+ attr_reader :max_size
6
10
 
7
- def initialize
11
+ def initialize(max_size: DEFAULT_MAX_SIZE)
8
12
  @data = {}
13
+ @mutex = Mutex.new
14
+ @max_size = max_size
15
+ end
16
+
17
+ def data
18
+ @mutex.synchronize { @data.dup }
9
19
  end
10
20
 
11
21
  def set(key, value)
12
- @data[key.to_sym] = value
22
+ @mutex.synchronize do
23
+ evict_if_full
24
+ @data[key.to_sym] = value
25
+ end
13
26
  end
14
27
 
15
28
  def get(key)
16
- @data[key.to_sym] if @data.key?(key.to_sym)
29
+ @mutex.synchronize do
30
+ @data[key.to_sym] if @data.key?(key.to_sym)
31
+ end
17
32
  end
18
33
 
19
34
  def has?(key)
20
- @data.key?(key.to_sym)
35
+ @mutex.synchronize do
36
+ @data.key?(key.to_sym)
37
+ end
38
+ end
39
+
40
+ def size
41
+ @mutex.synchronize { @data.size }
42
+ end
43
+
44
+ def clear!
45
+ @mutex.synchronize { @data.clear }
46
+ end
47
+
48
+ private
49
+
50
+ def evict_if_full
51
+ return if @data.size < @max_size
52
+
53
+ # Remove the oldest entry (first inserted key)
54
+ oldest_key = @data.keys.first
55
+ @data.delete(oldest_key)
21
56
  end
22
57
  end
23
58
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'sastrawi/stemmer/filter/text_normalizer'
2
4
 
3
5
  module Sastrawi
@@ -10,9 +12,15 @@ module Sastrawi
10
12
  @delegated_stemmer = delegated_stemmer
11
13
  end
12
14
 
15
+ def clear_cache!
16
+ @cache.clear!
17
+ end
18
+
13
19
  def stem(text)
14
20
  normalized_text = Sastrawi::Stemmer::Filter::TextNormalizer.normalize_text(text)
15
21
 
22
+ return "" if normalized_text.empty?
23
+
16
24
  words = normalized_text.split(' ')
17
25
  stems = []
18
26
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ##
2
4
  # Confix Stripping Rule Precendence Adjustment Specification
3
5
  # Asian J. (2007) "Effective Techniques for Indonesian Text Retrieval" page 78-79
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'sastrawi/stemmer/confix_stripping/precedence_adjustment_specification'
2
4
 
3
5
  ##
@@ -205,11 +207,7 @@ module Sastrawi
205
207
  end
206
208
  end
207
209
 
208
- @removals.each do |removal|
209
- if removal.affix_type == 'DP'
210
- @removals.delete(removal)
211
- end
212
- end
210
+ @removals = @removals.reject { |removal| removal.affix_type == 'DP' }
213
211
  end
214
212
  end
215
213
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Stemmer
3
5
  module Context
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Stemmer
3
5
  module Context
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sastrawi
2
4
  module Stemmer
3
5
  module Context
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'sastrawi/stemmer/context/removal'
2
4
 
3
5
  ##
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ##
2
4
  # Remove inflectional particle
3
5
  # Asian J. (2007) "Effective Techniques for Indonesian Text Retrieval" page 60
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ##
2
4
  # Remove inflectional possessive pronoun
3
5
  # Asian J. (2007) "Effective Techniques for Indonesia Text Retrieval" page 60
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ##
2
4
  # Remove plain prefix
3
5
  # Asian J. (2007) "Effective Techniques for Indonesian Text Retrieval" page 61
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'sastrawi/stemmer/context/visitor/dont_stem_short_word'
2
4
  require 'sastrawi/stemmer/context/visitor/remove_inflectional_particle'
3
5
  require 'sastrawi/stemmer/context/visitor/remove_inflectional_possessive_pronoun'