MCPcopy
hub / github.com/huichen/sego / Segment

Struct Segment

segment.go:4–13  ·  view source on GitHub ↗

文本中的一个分词

Source from the content-addressed store, hash-verified

2
3// 文本中的一个分词
4type Segment struct {
5 // 分词在文本中的起始字节位置
6 start int
7
8 // 分词在文本中的结束字节位置(不包括该位置)
9 end int
10
11 // 分词信息
12 token *Token
13}
14
15// 返回分词在文本中的起始字节位置
16func (s *Segment) Start() int {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected