module PragmaticSegmenter::ExclamationWords

This class searches for exclamation points that are part of words and not ending punctuation and replaces them.

Constants

EXCLAMATION_WORDS
REGEXP

Public Class Methods

apply_rules(text) click to toggle source
# File lib/pragmatic_segmenter/exclamation_words.rb, line 12
def self.apply_rules(text)
  PragmaticSegmenter::PunctuationReplacer.new(
    matches_array: text.scan(REGEXP),
    text: text
  ).replace
end