Sha256: ae96b6012ac4f4133631d1626e5eb6b955422a49d4f9e2c952bf2ba5673d42b2

Contents?: true

Size: 419 Bytes

Versions: 5

Compression:

Stored size: 419 Bytes

Contents

module Sastrawi
  module Morphology
    module Disambiguator
      class DisambiguatorPrefixRule7
        def disambiguate(word)
          contains = /^ter([bcdfghjklmnpqrstvwxyz])er([aiueo].*)$/.match(word)

          if contains
            matches = contains.captures

            return if matches[0] == 'r'

            return matches[0] << 'er' << 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_rule7.rb
sastrawi-0.1.2 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule7.rb
sastrawi-0.1.1 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule7.rb
sastrawi-0.1.0 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule7.rb
sastrawi-0.1.0.pre lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule7.rb