Sha256: 377a462c217a0b426c734a69b1ea80a297e4ceab8d5325181f0ffbc0f156fb5d
Contents?: true
Size: 651 Bytes
Versions: 1
Compression:
Stored size: 651 Bytes
Contents
module Sastrawi module Stemmer module Context module Visitor class RemoveInflectionalPossessivePronoun def visit(context) result = remove(context.current_word) if result != context.current_word removed_part = context.current_word.sub(result, '') removal = Removal.new(self, context.current_word, result, removed_part, 'PP') context.add_removal(removal) context.current_word = result end end def remove(word) word.sub(/-*(ku|mu|nya)$/, '') end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sastrawi-0.1.0.pre | lib/sastrawi/stemmer/context/visitor/remove_inflectional_possessive_pronoun.rb |