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