Sha256: 1e0cacb201500e5f44daf5b9333934eb3ed83775eb4d8817f6e7bb98184d120f

Contents?: true

Size: 356 Bytes

Versions: 5

Compression:

Stored size: 356 Bytes

Contents

module Sastrawi
  module Morphology
    module Disambiguator
      class DisambiguatorPrefixRule31a
        def disambiguate(word)
          contains = /^peny([aiueo])(.*)$/.match(word)

          if contains
            matches = contains.captures

            return 'ny' << 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_rule31a.rb
sastrawi-0.1.2 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule31a.rb
sastrawi-0.1.1 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule31a.rb
sastrawi-0.1.0 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule31a.rb
sastrawi-0.1.0.pre lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule31a.rb