Module: NlpPure::Segmenting::DefaultWord
- Defined in:
- lib/nlp_pure/segmenting/default_word.rb
Constant Summary collapse
- DEFAULT_OPTIONS =
{ # hyphen, en dash, em dash, and string split: /[\-–—\s]/ }.freeze
Class Method Summary collapse
-
.options ⇒ Object
NOTE: exposed as a method for easy mock/stub.
- .parse(*args) ⇒ Object
Class Method Details
.options ⇒ Object
NOTE: exposed as a method for easy mock/stub
19 20 21 |
# File 'lib/nlp_pure/segmenting/default_word.rb', line 19 def self. DEFAULT_OPTIONS end |
.parse(*args) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/nlp_pure/segmenting/default_word.rb', line 11 def self.parse(*args) unless args.nil? || args.empty? input = args[0].to_s input.split([:split]) end end |