diverse aanpassingen
This commit is contained in:
@@ -48,6 +48,12 @@ func main() {
|
||||
word := aa[0]
|
||||
tags := aa[1]
|
||||
lbl := aa[2]
|
||||
if n := len(aa); n > 3 {
|
||||
lbl = aa[n-1]
|
||||
for i := 2; i < n-1; i++ {
|
||||
word += "\t" + aa[i]
|
||||
}
|
||||
}
|
||||
w, ok := words[word]
|
||||
if !ok {
|
||||
w = &Word{
|
||||
@@ -87,7 +93,13 @@ func main() {
|
||||
})
|
||||
|
||||
for _, w := range wordlist {
|
||||
fmt.Printf("%6d\t%s\t%s\n", w.count, w.word, getTag(w.tags))
|
||||
var tail string
|
||||
i := strings.Index(w.word, "\t")
|
||||
if i > 0 {
|
||||
tail = w.word[i:]
|
||||
w.word = w.word[:i]
|
||||
}
|
||||
fmt.Printf("%6d\t%s\t%s%s\n", w.count, w.word, getTag(w.tags), tail)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user