tokenizer

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package tokenizer provides a way to extract tokens (words) from a sentence.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tokens

func Tokens(s string) []string

Tokens returns lowercase tokens (words) containing in s.

func TokensReuseSlice

func TokensReuseSlice(s string, buf []rune) ([]string, []rune)

TokensReuseSlice returns lowercase tokens (words) containing in s.

func Unique

func Unique(tokens []string) []string

Unique returns a slice of sorted unique tokens.

func UniqueInPlace

func UniqueInPlace(tokens []string) []string

UniqueInPlace returns a slice of sorted unique tokens, reusing the tokens slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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