module TextDetector

Constants

VERSION

Public Class Methods

factory(type, dictionary) click to toggle source
# File lib/text_detector.rb, line 6
def self.factory(type, dictionary)
  Executor.new type, dictionary
end
normalize(text) click to toggle source
# File lib/text_detector.rb, line 14
def self.normalize(text)
  NKF.nkf('--katakana -w', shallow_normalize(text))
end
shallow_normalize(text) click to toggle source
# File lib/text_detector.rb, line 10
def self.shallow_normalize(text)
  text.unicode_normalize(:nfc)
end