forked from hankcs/HanLP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.java
More file actions
79 lines (77 loc) · 1.96 KB
/
Config.java
File metadata and controls
79 lines (77 loc) · 1.96 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
* <summary></summary>
* <author>He Han</author>
* <email>hankcs.cn@gmail.com</email>
* <create-date>2014/10/30 10:06</create-date>
*
* <copyright file="Config.java" company="上海林原信息科技有限公司">
* Copyright (c) 2003-2014, 上海林原信息科技有限公司. All Right Reserved, http://www.linrunsoft.com/
* This source is subject to the LinrunSpace License. Please contact 上海林原信息科技有限公司 to get more information.
* </copyright>
*/
package com.hankcs.hanlp.seg;
/**
* 分词器配置项
*/
public class Config
{
/**
* 是否是索引分词(合理地最小分割)
*/
public boolean indexMode = false;
/**
* 是否识别中国人名
*/
public boolean nameRecognize = true;
/**
* 是否识别音译人名
*/
public boolean translatedNameRecognize = true;
/**
* 是否识别日本人名
*/
public boolean japaneseNameRecognize = false;
/**
* 是否识别地名
*/
public boolean placeRecognize = false;
/**
* 是否识别机构
*/
public boolean organizationRecognize = false;
/**
* 是否加载用户词典
*/
public boolean useCustomDictionary = true;
/**
* 用户词典高优先级
*/
public boolean forceCustomDictionary = false;
/**
* 词性标注
*/
public boolean speechTagging = false;
/**
* 命名实体识别是否至少有一项被激活
*/
public boolean ner = true;
/**
* 是否计算偏移量
*/
public boolean offset = false;
/**
* 是否识别数字和量词
*/
public boolean numberQuantifierRecognize = false;
/**
* 并行分词的线程数
*/
public int threadNumber = 1;
/**
* 更新命名实体识别总开关
*/
public void updateNerConfig()
{
ner = nameRecognize || translatedNameRecognize || japaneseNameRecognize || placeRecognize || organizationRecognize;
}
}