-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstring_test.go
More file actions
51 lines (44 loc) · 1 KB
/
Copy pathstring_test.go
File metadata and controls
51 lines (44 loc) · 1 KB
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
package cqr_test
import (
"github.com/hscells/cqr"
"github.com/hscells/groove/combinator"
"github.com/hscells/transmute/backend"
"github.com/hscells/transmute/lexer"
"github.com/hscells/transmute/parser"
"github.com/hscells/transmute/pipeline"
"testing"
)
func TestName(t *testing.T) {
cqrPipeline := pipeline.NewPipeline(
parser.NewMedlineParser(),
backend.NewCQRBackend(),
pipeline.TransmutePipelineOptions{
LexOptions: lexer.LexOptions{
FormatParenthesis: false,
},
RequiresLexing: true,
})
rawQuery := `1. MMSE*.tw.
2. sMMSE.tw.
3. Folstein*.tw.
4. MiniMental.tw.
5. mini mental stat*.tw.
6. or/1-5`
cq, err := cqrPipeline.Execute(rawQuery)
if err != nil {
t.Fatal(err)
}
repr, err := cq.Representation()
if err != nil {
t.Fatal(err)
}
q := repr.(cqr.CommonQueryRepresentation)
t.Log(q.String())
t.Log(q.String())
t.Log(q.String())
t.Log(q.String())
t.Log(combinator.HashCQR(q))
t.Log(combinator.HashCQR(q))
t.Log(combinator.HashCQR(q))
t.Log(combinator.HashCQR(q))
}