lib/pragmatic_segmenter/languages/amharic.rb in pragmatic_segmenter-0.3.1 vs lib/pragmatic_segmenter/languages/amharic.rb in pragmatic_segmenter-0.3.2

- old
+ new

@@ -1,36 +1,10 @@ module PragmaticSegmenter module Languages - class Amharic - class Process < PragmaticSegmenter::Process - private + module Amharic + include Languages::Common - def sentence_boundary_punctuation(txt) - PragmaticSegmenter::Languages::Amharic::SentenceBoundaryPunctuation.new(text: txt).split - end - - def punctuation_array - PragmaticSegmenter::Languages::Amharic::Punctuation.new.punct - end - end - - class Cleaner < PragmaticSegmenter::Cleaner - end - - class SentenceBoundaryPunctuation < PragmaticSegmenter::SentenceBoundaryPunctuation - SENTENCE_BOUNDARY = /.*?[፧።!\?]|.*?$/ - - def split - text.scan(SENTENCE_BOUNDARY) - end - end - - class Punctuation < PragmaticSegmenter::Punctuation - PUNCT = ['።', '፧', '?', '!'] - - def punct - PUNCT - end - end + SENTENCE_BOUNDARY_REGEX = /.*?[፧።!\?]|.*?$/ + Punctuations = ['።', '፧', '?', '!'] end end end