lib/langusta/detector.rb
# Append more text to be recognized.
# @param text [UCS2String] text to be recognized
Append more text to be recognized.
Append more text to be recognized .
def append(text)
      Guard.klass(text, Array, __method__)
      text = Codepoints.gsub!(text, RegexHelper::URL_REGEX, "\x00\x20")
      text = Codepoints.gsub!(text, RegexHelper::MAIL_REGEX, "\x00\x20")
      text = text.map do |c|
        NGram.normalize(c)
      end
      @text = Codepoints.gsub!(text, RegexHelper::SPACE_REGEX, "\x00\x20")
    end
def append ( text ) Guard . klass ( text , Array , __method__ ) text = Codepoints . gsub! ( text , RegexHelper :: URL_REGEX , "\x00\x20" ) text = Codepoints . gsub! ( text , RegexHelper :: MAIL_REGEX , "\x00\x20" ) text = text . map do | c | NGram . normalize ( c ) end @text = Codepoints . gsub! ( text , RegexHelper :: SPACE_REGEX , "\x00\x20" ) end
Append more text to be recognized.
Append more text to be recognized .
text
text to be recognized
text to be recognized