wordninja

package module
v0.0.0-...-042cacd Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: MIT Imports: 11 Imported by: 0

README

go-wordninja

Getting Start

go get github.com/willsmil/go-wordninja

Usage

package main

import (
	"github.com/willsmil/go-wordninja"
	"fmt"
)

func main()  {
	// only English characters
	eng := "thisisatest"
	fmt.Println(wordninja.CutEnglish(eng))
	
	// multi characters
	mul := "this哈isa,test"
	fmt.Println(wordninja.Cut(mul))
}

reference

  1. https://stackoverflow.com/questions/8870261
  2. https://github.com/keredson/wordninja

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cut

func Cut(s string) []string

func CutEnglish

func CutEnglish(eng string) []string

CutEnglish return the best matched words with cutting the English string `s`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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