class PragmaticSegmenter::Languages::Chinese::BetweenPunctuation

Constants

BETWEEN_DOUBLE_ANGLE_QUOTATION_MARK_REGEX
BETWEEN_L_BRACKET_REGEX

Private Instance Methods

sub_punctuation_between_double_angled_quotation_marks(txt) click to toggle source
# File lib/pragmatic_segmenter/languages/chinese.rb, line 23
def sub_punctuation_between_double_angled_quotation_marks(txt)
  PunctuationReplacer.new(
    matches_array: txt.scan(BETWEEN_DOUBLE_ANGLE_QUOTATION_MARK_REGEX),
    text: txt
  ).replace
end
sub_punctuation_between_l_bracket(txt) click to toggle source
# File lib/pragmatic_segmenter/languages/chinese.rb, line 30
def sub_punctuation_between_l_bracket(txt)
  PunctuationReplacer.new(
    matches_array: txt.scan(BETWEEN_L_BRACKET_REGEX),
    text: txt
  ).replace
end
sub_punctuation_between_quotes_and_parens(txt) click to toggle source
# File lib/pragmatic_segmenter/languages/chinese.rb, line 17
def sub_punctuation_between_quotes_and_parens(txt)
  super
  sub_punctuation_between_double_angled_quotation_marks(txt)
  sub_punctuation_between_l_bracket(txt)
end