Sha256: e8b19d07df0ffd1f8ac5441f6816c1a3f5109d81a678c74b11d955142035179d

Contents?: true

Size: 392 Bytes

Versions: 5

Compression:

Stored size: 392 Bytes

Contents

module Sastrawi
  module Morphology
    module Disambiguator
      class DisambiguatorPrefixRule32
        def disambiguate(word)
          return 'ajar' if word == 'pelajar'

          contains = /^pe(l[aiueo])(.*)$/.match(word)

          if contains
            matches = contains.captures

            return matches[0] << matches[1]
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sastrawi-0.1.3 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule32.rb
sastrawi-0.1.2 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule32.rb
sastrawi-0.1.1 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule32.rb
sastrawi-0.1.0 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule32.rb
sastrawi-0.1.0.pre lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule32.rb