-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_new_old_network.py
52 lines (34 loc) · 1.35 KB
/
get_new_old_network.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
#
# ################################################################################
# ## Copyright (C) Gaurav Dass - All Rights Reserved
# ## Unauthorized copying of this file, via any medium is strictly prohibited
# ## Proprietary and confidential
# ## Written by Gaurav Dass <[email protected]>, January 2020
#
# ################################################################################
"""
Creates two versions of a network at once
"""
import crelib
import jsonlines
import sys
from crelib.old_verbs import verbs,reverse_verbs
inpath = sys.argv[1]
csoutpath = sys.argv[2]
csoutpath2 = sys.argv[3]
ceoutpath = sys.argv[4]
csoutpathold = sys.argv[5]
ceoutpathold = sys.argv[6]
print('ingesting data ......')
crelib.ingest_corpus.ingest_corpus(inpath,csoutpath)
print('sentences written')
crelib.get_causal_sentences.get_causal_sentences_lines(csoutpath,csoutpath2)
print('causal sentences obtained')
crelib.get_causes_effects.get_causes_effects_line(csoutpath2,ceoutpath)
print('cause effect pairs obtained')
crelib.parameter_config.verbs = verbs;
crelib.parameter_config.reverse_verbs = reverse_verbs;
crelib.get_causal_sentences.get_causal_sentences_lines(csoutpath2,csoutpathold)
print('old causal sentences obtained')
crelib.get_causes_effects.get_causes_effects_line(csoutpathold,ceoutpathold)
print('old cause effect pairs obtained')