Sha256: 7074a362a5b47a727eeeed2ee3b12a8b2dce67af153fd176c02dc3531819258c

Contents?: true

Size: 354 Bytes

Versions: 5

Compression:

Stored size: 354 Bytes

Contents

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

          if contains
            matches = contains.captures

            return 'n' << 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_rule28a.rb
sastrawi-0.1.2 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule28a.rb
sastrawi-0.1.1 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule28a.rb
sastrawi-0.1.0 lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule28a.rb
sastrawi-0.1.0.pre lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule28a.rb