-
Notifications
You must be signed in to change notification settings - Fork 1
/
structure_constructing_positive_negative_samples.txt
67 lines (55 loc) · 1.69 KB
/
structure_constructing_positive_negative_samples.txt
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
input: sentence
output:
sentence1(logical equivalence)
sentence2(logical inequivalence)
contraposition law
(positive)
if A then B <=> If not B then not A
if A then not B <=> If B then not A
if not A then B <=> If not B then A
if not A then not B <=> If not B then not A
(negative)
If A then B => If A then not B
If A then not B => If A then B
If not A then B => If not A then not B
If not A then not B => If not A then B
commutative law
(positive)
A and B <=> B and A
(negative)
A and B => A and not B / not A and B / not A and not B
implication law
(positive)
if A then B <=> A or B
(negative)
If A then B => not A or not B
=======================================
Synthetic sentence generation + (paraphraser model to paraphrase sentence, one sentence paraphrase one new sentence if there is at least one word different)
We obtain the subject, verb and adjective from pararule.
subject list []
verb list []
adjective list []
double negation
the sentence that without including negation
subject, verb, adjective
contraposition law
if A then B
if A then not B
if not A then B
If not A then not B
commutative law
A and B
A, B are two sentences which include subject, verb and object
implication law
If A then B
A or B
A, B are two sentences which include subject, verb and object
========================================
Pararule-plus with logical equivalence and inequivalence to replace one of the rules and construct new samples
Depth=2
Depth=3
Depth=4
Depth=5
Replace one key rule using logical equivalence and keep the same answer
Replace one key rule using logical inequivalence and change the answer to the other one
def contraposition(df_output, id, sub1, sub2, verb, adj1, adj2):