forked from wjx-git/IllegalTextDetection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
33 lines (25 loc) · 823 Bytes
/
config.py
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
"""
@Project :Insult_Recognition
@File :config.py
@IDE :PyCharm
@Author :wujx
"""
class FastTextConfig:
def __init__(self):
self.train_file = 'data/train.txt'
self.test_file = 'data/test.txt'
self.dev_file = 'data/dev.txt'
self.model_path = 'outputs/fasttext/fasttext_model.bin'
self.lr = 0.5
self.embedding_dim = 200
self.epoch = 20
self.ngrams = 2
self.loss_function = 'softmax'
self.minCount = 4
self.bucket = 20000
class SystemConfig:
def __init__(self):
self.illegal_dicts_file = 'dicts/illegal.txt'
self.suspected_illegal_dicts_file = 'dicts/suspected_illegal.txt'
self.trad2simple_file = 'dicts/trad2simp.txt'
self.illegal_char_split_file = 'dicts/illegal_char_split.txt'