-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprops.py
59 lines (41 loc) · 1.2 KB
/
props.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
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
import os
app_name = 'Similis-Service'
app_version = '1.0'
# PATH pattern
current_in_path_prefix = os.environ['BGTPATH_IN']
current_in_path = r"/{0}/BGT/Testi"
# current output path
current_out_path = None
# Livello di logging
logging_level = 'DEBUG'
#################################################
#
# CONFIG EXPERIMENT
#
#################################################
# SET METHOD Jaccard / Cosine
COSINE = 'cosine'
JACCARD = 'jaccard'
TF_IDF = 'tf-idf'
TF = 'tf'
THRESHOLD_JACC = 0.35 # 0.4
THRESHOLD_COSINE_TF_IDF = 0.35
THRESHOLD_COSINE_TF = 0.2
# MAX_DF_COSINE = 0.95
MAX_DF_COSINE = 1.00
class DistanceConfig:
def __init__(self, method=None, threshold=None):
self.method = method
self.threshold = threshold
if threshold is None:
if self.method == TF_IDF:
self.threshold = THRESHOLD_COSINE_TF_IDF
elif self.method == TF:
self.threshold = THRESHOLD_COSINE_TF
elif self.method == JACCARD:
self.threshold = THRESHOLD_JACC
curr_dist_cfg = DistanceConfig(None)
processCorpus = 'FULL'
# processCorpus = 'VIR'
# processCorpus = 'NOVIR'
#################################################