-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoptions.go
61 lines (51 loc) · 1.23 KB
/
options.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
56
57
58
59
60
61
package linguo
type NLPOptions struct {
DataPath string
Lang string
TokenizerFile string
SplitterFile string
TaggerFile string
ShallowParserFile string
SenseFile string
UKBFile string
DisambiguatorFile string
MorfoOptions *MacoOptions
}
func NewNLPOptions(dataPath string, lang string) *NLPOptions {
return &NLPOptions{
DataPath: dataPath,
Lang: lang,
}
}
func (o *NLPOptions) TokenizerFilePath(path string) *NLPOptions {
o.TokenizerFile = path
return o
}
func (o *NLPOptions) SplitterFilePath(path string) *NLPOptions {
o.SplitterFile = path
return o
}
func (o *NLPOptions) TaggerFilePath(path string) *NLPOptions {
o.TaggerFile = path
return o
}
func (o *NLPOptions) ShallowParserFilePath(path string) *NLPOptions {
o.ShallowParserFile = path
return o
}
func (o *NLPOptions) SenseFilePath(path string) *NLPOptions {
o.SenseFile = path
return o
}
func (o *NLPOptions) UKBFilePath(path string) *NLPOptions {
o.UKBFile = path
return o
}
func (o *NLPOptions) DisambiguatorFilePath(path string) *NLPOptions {
o.DisambiguatorFile = path
return o
}
func (o *NLPOptions) WithMorfoOptions(options *MacoOptions) *NLPOptions {
o.MorfoOptions = options
return o
}