Sha256: 2f4f2e68ecda2d77279dd237ea9eac144a904caf10c65c16ff44b7929ad0f7f9

Contents?: true

Size: 396 Bytes

Versions: 5

Compression:

Stored size: 396 Bytes

Contents

module Sastrawi
  module Morphology
    module Disambiguator
      class DisambiguatorPrefixRule36
        def disambiguate(word)
          contains = /^pe([bcdfghjkpqstvxz])(er[bcdfghjklmnpqrstvwxyz])(.*)$/.match(word)

          if contains
            matches = contains.captures

            return matches[0] << matches[1] << matches[2]
          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_rule36.rb
sastrawi-0.1.2 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule36.rb
sastrawi-0.1.1 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule36.rb
sastrawi-0.1.0 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule36.rb
sastrawi-0.1.0.pre lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule36.rb