Sha256: 1bcdc192aa2c2ae49a90feea3c9378682d1dd55aaebe999b36406d38e3603da9

Contents?: true

Size: 453 Bytes

Versions: 1

Compression:

Stored size: 453 Bytes

Contents

module Sastrawi
  module Morphology
    module Disambiguator
      class DisambiguatorPrefixRule24
        def disambiguate(word)
          contains = /^per([bcdfghjklmnpqrstvwxyz])([a-z])er([aiueo])(.*)$/.match(word)

          if contains
            matches = contains.captures

            return if matches[0] == 'r'

            return "#{matches[0]}#{matches[1]}er#{matches[2]}#{matches[3]}"
          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_rule24.rb