-
Notifications
You must be signed in to change notification settings - Fork 6
/
gonlpir_test.go
55 lines (48 loc) · 1.33 KB
/
gonlpir_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/***************************************************************
*
* Copyright (c) 2015, Menglong TAN <[email protected]>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GPL licence
*
**************************************************************/
/**
*
*
* @file gonlpir_test.go
* @author Menglong TAN <[email protected]>
* @date Sun Mar 8 15:40:16 2015
*
**/
package gonlpir
import (
"fmt"
"testing"
)
//===================================================================
// Public APIs
//===================================================================
func TestParagraphProcess(t *testing.T) {
nlpir, err := NewNLPIR("./deps", UTF8, "")
if err != nil {
t.Error(err)
return
}
fmt.Println("TestParagraphProcess: 我是中国人")
fmt.Println(nlpir.ParagraphProcess("我是中国人", true))
}
func TestParagraphProcessA(t *testing.T) {
nlpir, err := NewNLPIR("./deps", UTF8, "")
if err != nil {
t.Error(err)
return
}
fmt.Println("TestParagraphProcessA: 我是中国人")
results := nlpir.ParagraphProcessA("我是中国人", true)
for i := 0; i < len(results); i++ {
fmt.Printf("%#v\n", results[i])
}
}
//===================================================================
// Private
//===================================================================