class Goban::Segment::Segmenter::Analysis

Overview

A text prepared for segmentation. The characters are classified only once, and the segments computed for a version are reused for the other versions that have the same mode indicator and character count indicator lengths, since the segmentation depends only on those.

Defined in:

goban/segment/segmenter.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(text : String) #

[View source]

Instance Method Detail

def byte_offsets : Slice(Int32) #

Byte offset of each character in the text, followed by the text bytesize


[View source]
def bytesizes : Slice(UInt8) #

Number of bytes of each character, as used for the Byte mode cost


[View source]
def classes : Slice(UInt8) #

Bitwise OR of the CLASS_* flags of each character


[View source]
def min_data_bits : Int32 #

Lower bound of the number of data bits of any segmentation of the text, excluding the mode indicators and character count indicators. Versions with a smaller capacity can be skipped without segmenting the text.


[View source]
def segments_for(version : AbstractQR::Version) #

Returns the optimal segments for the given version.


[View source]
def size #

[View source]
def text : String #

[View source]