class TextDetector::Executor

Public Class Methods

new(type, dictionary) click to toggle source
# File lib/text_detector/executor.rb, line 6
def initialize(type, dictionary)
  @detector = Detector.factory(type, Dictionary.factory(dictionary))
end

Public Instance Methods

detect(text) click to toggle source
# File lib/text_detector/executor.rb, line 10
def detect(text)
  @detector.detect(TextDetector.shallow_normalize(text))
end
detect_all(text) click to toggle source
# File lib/text_detector/executor.rb, line 14
def detect_all(text)
  @detector.detect_all(TextDetector.shallow_normalize(text))
end