Class: ICU4X::Segmenter
- Inherits:
-
Object
- Object
- ICU4X::Segmenter
- Defined in:
- lib/icu4x/yard_docs.rb,
lib/icu4x.rb
Overview
Segments text into graphemes, words, sentences, or lines.
Segmenter provides Unicode-compliant text segmentation according to UAX #29 (Text Segmentation) and UAX #14 (Line Breaking).
Defined Under Namespace
Classes: Segment
Instance Method Summary collapse
-
#initialize(granularity:, provider: nil) ⇒ Segmenter
constructor
Creates a new Segmenter instance.
-
#resolved_options ⇒ Hash
Returns the resolved options for this instance.
-
#segment(text) ⇒ Array<Segment>
Segments text into an array of segments.
Constructor Details
#initialize(granularity:, provider: nil) ⇒ Segmenter
Creates a new Segmenter instance.
934 |
# File 'lib/icu4x/yard_docs.rb', line 934 def initialize(granularity:, provider: nil); end |
Instance Method Details
#resolved_options ⇒ Hash
Returns the resolved options for this instance.
954 |
# File 'lib/icu4x/yard_docs.rb', line 954 def ; end |
#segment(text) ⇒ Array<Segment>
Segments text into an array of segments.
947 |
# File 'lib/icu4x/yard_docs.rb', line 947 def segment(text); end |