Skip to content

sentence can choose tolower or keep origin sentence? #192

Open
@ivory2406

Description

hello, I want to keep uppercase letter。 like example:

	text := "Hello world, Helloworld. Winter is coming! 你好世界."
	jieba := new(gse.Segmenter)
	jieba.LoadDict()
	res := jieba.Cut(text)
	println(ToJson(res))

}

the result is : ["hello"," ","world",","," ","helloworld","."," ","winter"," ","is"," ","coming","!"," ","你好","世界","."]

I hope the result is ["Hello"," ","world",","," ","Helloworld","."," ","Winter"," ","is"," ","coming","!"," ","你好","世界","."]


And I have seen the option params: https://github.com/go-ego/gse/blob/master/segmenter.go

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions