Showing 1 of 3 files from the diff.
Other files ignored by Codecov
hmm/pos/dict.go has changed.

@@ -50,12 +50,14 @@
Loading
50 50
// TrimPosPunct trim SegPos not space and punct
51 51
func (seg *Segmenter) TrimPosPunct(se []SegPos) (re []SegPos) {
52 52
	for i := 0; i < len(se); i++ {
53 -
		if !seg.IsStop(se[i].Text) {
54 -
			if se[i].Text != "" && len(se[i].Text) > 0 {
55 -
				ru := []rune(se[i].Text)[0]
56 -
				if !unicode.IsSpace(ru) && !unicode.IsPunct(ru) {
57 -
					re = append(re, se[i])
58 -
				}
53 +
		if !seg.NotStop && seg.IsStop(se[i].Text) {
54 +
			se[i].Text = ""
55 +
		}
56 +
57 +
		if se[i].Text != "" && len(se[i].Text) > 0 {
58 +
			ru := []rune(se[i].Text)[0]
59 +
			if !unicode.IsSpace(ru) && !unicode.IsPunct(ru) {
60 +
				re = append(re, se[i])
59 61
			}
60 62
		}
61 63
	}
@@ -85,7 +87,7 @@
Loading
85 87
func (seg *Segmenter) Trim(s []string) (r []string) {
86 88
	for i := 0; i < len(s); i++ {
87 89
		si := FilterSymbol(s[i])
88 -
		if !seg.NotStop && seg.IsStop(s[i]) {
90 +
		if !seg.NotStop && seg.IsStop(si) {
89 91
			si = ""
90 92
		}
91 93
@@ -100,11 +102,13 @@
Loading
100 102
// TrimPos trim SegPos not symbol, space and punct
101 103
func (seg *Segmenter) TrimPos(s []SegPos) (r []SegPos) {
102 104
	for i := 0; i < len(s); i++ {
103 -
		if !seg.IsStop(s[i].Text) {
104 -
			si := FilterSymbol(s[i].Text)
105 -
			if si != "" {
106 -
				r = append(r, s[i])
107 -
			}
105 +
		si := FilterSymbol(s[i].Text)
106 +
		if !seg.NotStop && seg.IsStop(si) {
107 +
			si = ""
108 +
		}
109 +
110 +
		if si != "" {
111 +
			r = append(r, s[i])
108 112
		}
109 113
	}
110 114
Files Coverage
dag.go 90.45%
dict_util.go 92.21%
dictionary.go 91.67%
gse.go 93.33%
seg.go 100.00%
seg_utils.go 92.41%
segmenter.go 91.57%
stop.go 87.50%
test_utils.go 81.82%
token.go 86.67%
trim.go 90.00%
Project Totals (11 files) 91.16%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading