Class: TextDetector::Detector::Simple
- Defined in:
- lib/text_detector/detector/simple.rb
Overview
BM法っぽく(トライ木を調べてる時に見かけた実装を参考に)
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from TextDetector::Detector::Base
Instance Method Details
#detect(text) ⇒ Object
7 8 9 |
# File 'lib/text_detector/detector/simple.rb', line 7 def detect(text) detect_n(text, 1).first end |
#detect_all(text) ⇒ Object
11 12 13 |
# File 'lib/text_detector/detector/simple.rb', line 11 def detect_all(text) detect_n(text) end |