lang

package
v0.0.0-...-3435f2a Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: BSD-3-Clause Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lang

type Lang struct {
	Lefthyphenmin  int
	Righthyphenmin int
	Name           string
	// contains filtered or unexported fields
}

Lang represents a language for for hyphenation

func LoadPatternFile

func LoadPatternFile(fn string) (*Lang, error)

LoadPatternFile loads the hyphenation patterns with the given file name

func NewFromReader

func NewFromReader(r io.Reader) (*Lang, error)

NewFromReader returns a Lang object from the reader r which points to hyphenation patterns.

func (*Lang) Hyphenate

func (l *Lang) Hyphenate(word string) []int

Hyphenate returns a slice of hyphenation points

func (*Lang) String

func (l *Lang) String() string

Jump to

Keyboard shortcuts

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