Sha256: d2bf6a08bf1400394e4f4c71acdfc918e1aacb2249f99541860fc4be8ff4c5cf
Contents?: true
Size: 437 Bytes
Versions: 1
Compression:
Stored size: 437 Bytes
Contents
module Sastrawi module Morphology module Disambiguator class DisambiguatorPrefixRule2 def disambiguate(word) contains = /^ber([bcdfghjklmnpqrstvwxyz])([a-z])(.*)$/.match(word) if contains matches = contains.captures return if /^er(.*)$/.match(matches[2]) return "#{matches[0]}#{matches[1]}#{matches[2]}" 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_rule2.rb |