tokenizer

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2018 License: MIT Imports: 0 Imported by: 7

README

Text Tokenizer for Golang Last release

Go Report Card

Branch Status Coverage
master Build Status Coveralls
import (
    "fmt"

    "github.com/euskadi31/go-tokenizer"
)

func main() {
    t := tokenizer.New()

    tokens := t.Tokenize("I believe life is an intelligent thing: that things aren't random.")

    fmt.Print(tokens) // []string{"I", "believe", "life", "is", "an", "intelligent", "thing", "that", "things", "aren't", "random"}
}

License

go-tokenizer is licensed under the MIT license.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tokenizer

type Tokenizer interface {
	KeepSeparator()
	Tokenize(content string) []string
}

Tokenizer interface

func New

func New() Tokenizer

New Tokenizer

func NewWithSeparator

func NewWithSeparator(sep string) Tokenizer

NewWithSeparator Tokenizer

Jump to

Keyboard shortcuts

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