Sha256: 827bfd2b46dfe5b53c536e68d97f9b46c72b9d454fcdb9c44b9687fca17f29cd

Contents?: true

Size: 417 Bytes

Versions: 1

Compression:

Stored size: 417 Bytes

Contents

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

          if contains
            matches = contains.captures

            return if /^er(.*)$/.match(matches[1])

            return "#{matches[0]}#{matches[1]}"
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sastrawi-0.1.4 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule34.rb