(t *testing.T)
| 53 | } |
| 54 | |
| 55 | func TestLargeDictionary(t *testing.T) { |
| 56 | prodSeg.LoadDictionary("data/dictionary.txt") |
| 57 | expect(t, "中国/ns 人口/n ", SegmentsToString(prodSeg.Segment( |
| 58 | []byte("中国人口")), false)) |
| 59 | |
| 60 | expect(t, "中国/ns 人口/n ", SegmentsToString(prodSeg.internalSegment( |
| 61 | []byte("中国人口"), false), false)) |
| 62 | |
| 63 | expect(t, "中国/ns 人口/n ", SegmentsToString(prodSeg.internalSegment( |
| 64 | []byte("中国人口"), true), false)) |
| 65 | |
| 66 | expect(t, "中华人民共和国/ns 中央人民政府/nt ", SegmentsToString(prodSeg.internalSegment( |
| 67 | []byte("中华人民共和国中央人民政府"), true), false)) |
| 68 | |
| 69 | expect(t, "中华人民共和国中央人民政府/nt ", SegmentsToString(prodSeg.internalSegment( |
| 70 | []byte("中华人民共和国中央人民政府"), false), false)) |
| 71 | |
| 72 | expect(t, "中华/nz 人民/n 共和/nz 国/n 共和国/ns 人民共和国/nt 中华人民共和国/ns 中央/n 人民/n 政府/n 人民政府/nt 中央人民政府/nt 中华人民共和国中央人民政府/nt ", SegmentsToString(prodSeg.Segment( |
| 73 | []byte("中华人民共和国中央人民政府")), true)) |
| 74 | } |
nothing calls this directly
no test coverage detected