segment

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Segment

type Segment struct {
	Text   string
	Weight float64
}

Segment type a word with weight.

func (Segment) GetText

func (s Segment) GetText() string

GetText return the segment's text.

func (Segment) GetWeight

func (s Segment) GetWeight() float64

GetWeight return the segment's weight.

type Segments

type Segments []Segment

Segments type a slice of Segment.

func (Segments) Len

func (ss Segments) Len() int

func (Segments) Less

func (ss Segments) Less(i, j int) bool

func (Segments) Swap

func (ss Segments) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL