arabic_conjugator 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +27 -0
- data/LICENSE.txt +22 -0
- data/README.md +8 -0
- data/Rakefile +1 -0
- data/arabic_conjugator.gemspec +20 -0
- data/lib/arabic_conjugator.rb +43 -0
- data/lib/arabic_conjugator/base.rb +70 -0
- data/lib/arabic_conjugator/factories/base_factory.rb +74 -0
- data/lib/arabic_conjugator/factories/tense_factory.rb +20 -0
- data/lib/arabic_conjugator/factories/type_factory.rb +59 -0
- data/lib/arabic_conjugator/form.rb +10 -0
- data/lib/arabic_conjugator/form_II_hollow_defective.rb +6 -0
- data/lib/arabic_conjugator/form_I_defective.rb +5 -0
- data/lib/arabic_conjugator/form_I_defective_past.rb +12 -0
- data/lib/arabic_conjugator/form_I_defective_present.rb +9 -0
- data/lib/arabic_conjugator/form_I_hamzated_past.rb +16 -0
- data/lib/arabic_conjugator/form_I_hamzated_present.rb +16 -0
- data/lib/arabic_conjugator/form_I_hollow_past.rb +5 -0
- data/lib/arabic_conjugator/form_I_hollow_present.rb +6 -0
- data/lib/arabic_conjugator/form_VIII_hamzated.rb +5 -0
- data/lib/arabic_conjugator/form_VIII_hollow.rb +5 -0
- data/lib/arabic_conjugator/past_bases/form_III_past_base.rb +42 -0
- data/lib/arabic_conjugator/past_bases/form_II_past_base.rb +36 -0
- data/lib/arabic_conjugator/past_bases/form_IV_past_base.rb +46 -0
- data/lib/arabic_conjugator/past_bases/form_I_past_base.rb +57 -0
- data/lib/arabic_conjugator/past_bases/form_VIII_past_base.rb +78 -0
- data/lib/arabic_conjugator/past_bases/form_VII_past_base.rb +26 -0
- data/lib/arabic_conjugator/past_bases/form_VI_past_base.rb +32 -0
- data/lib/arabic_conjugator/past_bases/form_V_past_base.rb +35 -0
- data/lib/arabic_conjugator/past_bases/form_X_past_base.rb +40 -0
- data/lib/arabic_conjugator/past_tense.rb +12 -0
- data/lib/arabic_conjugator/present_bases/form_III_present_base.rb +30 -0
- data/lib/arabic_conjugator/present_bases/form_II_present_base.rb +34 -0
- data/lib/arabic_conjugator/present_bases/form_IV_present_base.rb +48 -0
- data/lib/arabic_conjugator/present_bases/form_I_present_base.rb +54 -0
- data/lib/arabic_conjugator/present_bases/form_VIII_present_base.rb +67 -0
- data/lib/arabic_conjugator/present_bases/form_VII_present_base.rb +31 -0
- data/lib/arabic_conjugator/present_bases/form_VI_present_base.rb +47 -0
- data/lib/arabic_conjugator/present_bases/form_V_present_base.rb +30 -0
- data/lib/arabic_conjugator/present_bases/form_X_present_base.rb +30 -0
- data/lib/arabic_conjugator/present_tense.rb +12 -0
- data/lib/arabic_conjugator/version.rb +3 -0
- data/spec/past_tense/formIII_past_spec.rb +75 -0
- data/spec/past_tense/formII_past_spec.rb +108 -0
- data/spec/past_tense/formIV_past_spec.rb +122 -0
- data/spec/past_tense/formI_past_spec.rb +160 -0
- data/spec/past_tense/formVIII_past_spec.rb +135 -0
- data/spec/past_tense/formVII_past_spec.rb +60 -0
- data/spec/past_tense/formVI_past_spec.rb +70 -0
- data/spec/past_tense/formV_past_spec.rb +77 -0
- data/spec/past_tense/formX_past_spec.rb +78 -0
- data/spec/present_tense/formIII_present_spec.rb +80 -0
- data/spec/present_tense/formII_present_spec.rb +102 -0
- data/spec/present_tense/formIV_present_spec.rb +107 -0
- data/spec/present_tense/formI_present_spec.rb +143 -0
- data/spec/present_tense/formVIII_present_spec.rb +126 -0
- data/spec/present_tense/formVII_present_spec.rb +50 -0
- data/spec/present_tense/formVI_present_spec.rb +75 -0
- data/spec/present_tense/formV_present_spec.rb +87 -0
- data/spec/present_tense/formX_present_spec.rb +68 -0
- data/spec/spec_helper.rb +5 -0
- metadata +166 -0
@@ -0,0 +1,107 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe "Form IV Present" do
|
6
|
+
|
7
|
+
context 'regular present' do
|
8
|
+
it 'conjugates form IV present' do
|
9
|
+
verb = Verb.new({root1: "ر", root2: "س", root3: "ل", form: "4", tense: "present", pronoun: :you_pl})
|
10
|
+
expect(verb.conjugate).to eq("ترسلون")
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'conjugates form IV regular present with hamza as first radical' do
|
14
|
+
verb = Verb.new({root1: "ء", root2: "ل", root3: "م", form: "4", tense: "present", pronoun: :you_m})
|
15
|
+
expect(verb.conjugate).to eq("تؤلم")
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'conjugates formIV regular present with hamza as second radical' do
|
19
|
+
verb = Verb.new({root1: "س", root2: "ء", root3: "م", form: "4", tense: "present", pronoun: :you_f})
|
20
|
+
expect(verb.conjugate).to eq("تسئمين")
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'conjugates formIV regular present with hamza as third radical' do
|
24
|
+
verb = Verb.new({root1: "ن", root2: "ش", root3: "ء", form: "4", tense: "present", pronoun: :she})
|
25
|
+
expect(verb.conjugate).to eq("تنشئ")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
context 'hollow present' do
|
30
|
+
it 'conjugates form IV hollow present, medial waaw' do
|
31
|
+
verb = Verb.new({root1: "ق", root2: "و", root3: "م", form: "4", tense: "present", pronoun: :I})
|
32
|
+
expect(verb.conjugate).to eq("أقيم")
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'conjugates form IV hollow present, medial yaa' do
|
36
|
+
verb = Verb.new({root1: "ذ", root2: "ي", root3: "ع", form: "4", tense: "present", pronoun: :you_m})
|
37
|
+
expect(verb.conjugate).to eq("تذيع")
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'conjugates form IV hollow present, final radical hamza, :I' do
|
41
|
+
verb = Verb.new({root1: "ض", root2: "و", root3: "ء", form: "4", tense: "present", pronoun: :I})
|
42
|
+
expect(verb.conjugate).to eq("أضيء")
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'conjugates form IV hollow present, final radical hamza, :you_f' do
|
46
|
+
verb = Verb.new({root1: "ض", root2: "و", root3: "ء", form: "4", tense: "present", pronoun: :you_f})
|
47
|
+
expect(verb.conjugate).to eq("تضيئين")
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'conjugates form IV hollow present, final radical hamza, :you_pl' do
|
51
|
+
verb = Verb.new({root1: "ض", root2: "و", root3: "ء", form: "4", tense: "present", pronoun: :you_pl})
|
52
|
+
expect(verb.conjugate).to eq("تضيؤون")
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
context 'assimilated present' do
|
57
|
+
it 'conjugates form IV assimilated present, first radical waaw' do
|
58
|
+
verb = Verb.new({root1: "و", root2: "ق", root3: "ف", form: "4", tense: "present", pronoun: :we})
|
59
|
+
expect(verb.conjugate).to eq("نوقف")
|
60
|
+
end
|
61
|
+
|
62
|
+
it 'conjugates form IV assimilated present, first radical yaa' do
|
63
|
+
verb = Verb.new({root1: "ي", root2: "ق", root3: "ظ", form: "4", tense: "present", pronoun: :you_pl})
|
64
|
+
expect(verb.conjugate).to eq("توقظون")
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
context 'doubled present' do
|
69
|
+
it 'conjugates form IV doubled present' do
|
70
|
+
verb = Verb.new({root1: "ض", root2: "ر", root3: "ر", form: "4", tense: "present", pronoun: :I})
|
71
|
+
expect(verb.conjugate).to eq("أضرّ")
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
context 'defective present' do
|
76
|
+
it 'conjugates form IV defective present, final root yaa, :you_pl' do
|
77
|
+
verb = Verb.new({root1: "ج", root2: "ر", root3: "ي", form: "4", tense: "present", pronoun: :you_pl})
|
78
|
+
expect(verb.conjugate).to eq("تجرون")
|
79
|
+
end
|
80
|
+
|
81
|
+
it 'conjugates form IV defective present, final root yaa, :I' do
|
82
|
+
verb = Verb.new({root1: "ج", root2: "ر", root3: "ي", form: "4", tense: "present", pronoun: :I})
|
83
|
+
expect(verb.conjugate).to eq("أجري")
|
84
|
+
end
|
85
|
+
|
86
|
+
it 'conjugates form IV defective present, final root waaw' do
|
87
|
+
verb = Verb.new({root1: "ع", root2: "ط", root3: "و", form: "4", tense: "present", pronoun: :they})
|
88
|
+
expect(verb.conjugate).to eq("يعطون")
|
89
|
+
end
|
90
|
+
|
91
|
+
it 'conjugates formIV doubly weak present - defective and assimilated' do
|
92
|
+
verb = Verb.new({root1: "و", root2: "ف", root3: "ي", form: "4", tense: "present", pronoun: :you_f})
|
93
|
+
expect(verb.conjugate).to eq("توفين")
|
94
|
+
end
|
95
|
+
|
96
|
+
it 'conjugates formIV hollow-defective present' do
|
97
|
+
verb = Verb.new({root1: "ح", root2: "ي", root3: "ي", form: "4", tense: "present", pronoun: :you_f})
|
98
|
+
expect(verb.conjugate).to eq("تحيين")
|
99
|
+
end
|
100
|
+
|
101
|
+
it 'conjugates formIV defective-hamzated present' do
|
102
|
+
verb = Verb.new({root1: "ء", root2: "ت", root3: "ي", form: "4", tense: "present", pronoun: :you_m})
|
103
|
+
expect(verb.conjugate).to eq("تؤتي")
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
end
|
@@ -0,0 +1,143 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe "Form I Present" do
|
6
|
+
|
7
|
+
context "regular present" do
|
8
|
+
it 'conjugates form I present' do
|
9
|
+
verb = Verb.new({root1: "ك", root2: "ت", root3: "ب", form: "1", tense: "present", pronoun: :she})
|
10
|
+
expect(verb.conjugate).to eq("تكتب")
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'conjugates form I regular present with first radical hamza' do
|
14
|
+
verb = Verb.new({root1: "ء", root2: "ك", root3: "ل", form: "1", tense: "present", pronoun: :we})
|
15
|
+
expect(verb.conjugate).to eq("نأكل")
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'conjugates form I regular present with second radical hamza' do
|
19
|
+
verb = Verb.new({root1: "س", root2: "ء", root3: "ل", form: "1", tense: "present", pronoun: :they})
|
20
|
+
expect(verb.conjugate).to eq("يسألون")
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'conjugates form I regular present with third radical hamza' do
|
24
|
+
verb = Verb.new({root1: "ج", root2: "ر", root3: "ء", form: "1", tense: "present", pronoun: :they})
|
25
|
+
expect(verb.conjugate).to eq("يجرؤون")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
context "doubled present" do
|
30
|
+
it 'conjugates form I doubled present' do
|
31
|
+
verb = Verb.new({root1: "ر", root2: "د", root3: "د", form: "1", tense: "present", pronoun: :she})
|
32
|
+
expect(verb.conjugate).to eq("تردّ")
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'conjugates form I doubled assimilated present' do
|
36
|
+
verb = Verb.new({root1: "و", root2: "د", root3: "د", form: "1", tense: "present", pronoun: :she})
|
37
|
+
expect(verb.conjugate).to eq("تودّ")
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context 'assimilated present' do
|
42
|
+
it 'conjugates form I assimilated present with root 1 waaw' do
|
43
|
+
verb = Verb.new({root1: "و", root2: "ص", root3: "ف", form: "1", tense: "present", pronoun: :she})
|
44
|
+
expect(verb.conjugate).to eq("تصف")
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'conjugates form I assimilated present with root 1 yaa' do
|
48
|
+
verb = Verb.new({root1: "ي", root2: "ق", root3: "ظ", form: "1", tense: "present", pronoun: :we})
|
49
|
+
expect(verb.conjugate).to eq("نقظ")
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
context "hollow present" do
|
54
|
+
it 'conjugates form I hollow present, middle root waaw' do
|
55
|
+
verb = Verb.new({root1: "ق", root2: "و", root3: "ل", form: "1", tense: "present", pronoun: :he})
|
56
|
+
expect(verb.conjugate).to eq("يقول")
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'conjugates form I hollow present, middle root yaa' do
|
60
|
+
verb = Verb.new({root1: "ب", root2: "ي", root3: "ع", form: "1", tense: "present", pronoun: :you_m})
|
61
|
+
expect(verb.conjugate).to eq("تبيع")
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'conjugates form I hollow present, irregular' do
|
65
|
+
verb = Verb.new({root1: "ن", root2: "و", root3: "م", form: "1", tense: "present", pronoun: :you_m})
|
66
|
+
expect(verb.conjugate).to eq("تنام")
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
context 'hollow-hamzated' do
|
71
|
+
it 'conjugates form I hollow-hamzated, :he' do
|
72
|
+
verb = Verb.new({root1: "ج", root2: "ي", root3: "ء", form: "1", tense: "present", pronoun: :I})
|
73
|
+
expect(verb.conjugate).to eq("أجيئ")
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'conjugates form I hollow-hamzated, :you_pl' do
|
77
|
+
verb = Verb.new({root1: "ج", root2: "ي", root3: "ء", form: "1", tense: "present", pronoun: :you_pl})
|
78
|
+
expect(verb.conjugate).to eq("تجيئون")
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
context "defective present" do
|
83
|
+
it 'conjugates form I defective present with final root waaw, pronoun :they' do
|
84
|
+
verb = Verb.new({root1: "ش", root2: "ك", root3: "و", form: "1", tense: "present", pronoun: :they})
|
85
|
+
expect(verb.conjugate).to eq("يشكون")
|
86
|
+
end
|
87
|
+
|
88
|
+
it 'conjugates form I defective present with final root waaw, pronoun :he' do
|
89
|
+
verb = Verb.new({root1: "ش", root2: "ك", root3: "و", form: "1", tense: "present", pronoun: :he})
|
90
|
+
expect(verb.conjugate).to eq("يشكو")
|
91
|
+
end
|
92
|
+
|
93
|
+
it 'conjugates form I defective present with final root yaa, :we' do
|
94
|
+
verb = Verb.new({root1: "د", root2: "ع", root3: "ي", form: "1", tense: "present", pronoun: :we})
|
95
|
+
expect(verb.conjugate).to eq("ندعي")
|
96
|
+
end
|
97
|
+
|
98
|
+
it 'conjugates form I defective present with final root yaa, :you_pl' do
|
99
|
+
verb = Verb.new({root1: "د", root2: "ع", root3: "ي", form: "1", tense: "present", pronoun: :you_pl})
|
100
|
+
expect(verb.conjugate).to eq("تدعون")
|
101
|
+
end
|
102
|
+
|
103
|
+
it 'conjugates form I defective present with final root yaa, irregular' do
|
104
|
+
verb = Verb.new({root1: "س", root2: "ع", root3: "ي", form: "1", tense: "present", pronoun: :he})
|
105
|
+
expect(verb.conjugate).to eq("يسعى")
|
106
|
+
end
|
107
|
+
|
108
|
+
it 'conjugates form I defective present with final root yaa, irregular' do
|
109
|
+
verb = Verb.new({root1: "ن", root2: "س", root3: "ي", form: "1", tense: "present", pronoun: :you_pl})
|
110
|
+
expect(verb.conjugate).to eq("تنسون")
|
111
|
+
end
|
112
|
+
|
113
|
+
it 'conjugates form I hollow-defective, waaw-yaa, :they' do
|
114
|
+
verb = Verb.new({root1: "ر", root2: "و", root3: "ي", form: "1", tense: "present", pronoun: :they})
|
115
|
+
expect(verb.conjugate).to eq("يروون")
|
116
|
+
end
|
117
|
+
|
118
|
+
it 'conjugates form I hollow-defective, waaw-yaa, :she' do
|
119
|
+
verb = Verb.new({root1: "ر", root2: "و", root3: "ي", form: "1", tense: "present", pronoun: :she})
|
120
|
+
expect(verb.conjugate).to eq("تروي")
|
121
|
+
end
|
122
|
+
|
123
|
+
it 'conjugates form I hollow-defective, waaw-yaa, irregular' do
|
124
|
+
verb = Verb.new({root1: "س", root2: "و", root3: "ي", form: "1", tense: "present", pronoun: :she})
|
125
|
+
expect(verb.conjugate).to eq("تسوى")
|
126
|
+
end
|
127
|
+
|
128
|
+
it 'conjugates form I hollow-defective, yaa-yaa' do
|
129
|
+
verb = Verb.new({root1: "ح", root2: "ي", root3: "ي", form: "1", tense: "present", pronoun: :she})
|
130
|
+
expect(verb.conjugate).to eq("تحيا")
|
131
|
+
end
|
132
|
+
|
133
|
+
it 'conjugates form I assimilated-defective, waaw-yaa' do
|
134
|
+
verb = Verb.new({root1: "و", root2: "ف", root3: "ي", form: "1", tense: "present", pronoun: :they})
|
135
|
+
expect(verb.conjugate).to eq("يفون")
|
136
|
+
end
|
137
|
+
|
138
|
+
it 'conjugates form I hamzated-defective, second radical hamza' do
|
139
|
+
verb = Verb.new({root1: "ر", root2: "ء", root3: "ي", form: "1", tense: "present", pronoun: :he})
|
140
|
+
expect(verb.conjugate).to eq("يرى")
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
@@ -0,0 +1,126 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe "Form VIII Present" do
|
6
|
+
|
7
|
+
context 'regular present' do
|
8
|
+
it 'conjugates form VIII present' do
|
9
|
+
verb = Verb.new({root1: "ك", root2: "ش", root3: "ف", form: "8", tense: "present", pronoun: :I})
|
10
|
+
expect(verb.conjugate).to eq("أكتشف")
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'conjugates form VIII present with first radical hamza' do
|
14
|
+
verb = Verb.new({root1: "ء", root2: "ل", root3: "ف", form: "8", tense: "present", pronoun: :she})
|
15
|
+
expect(verb.conjugate).to eq("تأتلف")
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'conjugates form VIII present with second radical hamza' do
|
19
|
+
verb = Verb.new({root1: "ب", root2: "ء", root3: "س", form: "8", tense: "present", pronoun: :he})
|
20
|
+
expect(verb.conjugate).to eq("يبتئس")
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'conjugates form VIII present with third radical hamza' do
|
24
|
+
verb = Verb.new({root1: "ب", root2: "د", root3: "ء", form: "8", tense: "present", pronoun: :they})
|
25
|
+
expect(verb.conjugate).to eq("يبتدئون")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
context 'assimilated present' do
|
30
|
+
it 'conjugates form VIII assimilated present' do
|
31
|
+
verb = Verb.new({root1: "و", root2: "ف", root3: "ق", form: "8", tense: "present", pronoun: :they})
|
32
|
+
expect(verb.conjugate).to eq("يتّفقون")
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
context "hollow present" do
|
37
|
+
it 'conjugates form VIII hollow present, :I' do
|
38
|
+
verb = Verb.new({root1: "خ", root2: "و", root3: "ر", form: "8", tense: "present", pronoun: :I})
|
39
|
+
expect(verb.conjugate).to eq("أختار")
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'conjugates form VIII hollow present, :I' do
|
43
|
+
verb = Verb.new({root1: "خ", root2: "و", root3: "ر", form: "8", tense: "present", pronoun: :I})
|
44
|
+
expect(verb.conjugate).to eq("أختار")
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'conjugates form VIII hollow present, morphed taa' do
|
48
|
+
verb = Verb.new({root1: "ص", root2: "ي", root3: "د", form: "8", tense: "present", pronoun: :you_m})
|
49
|
+
expect(verb.conjugate).to eq("تصطاد")
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'conjugates form VIII hollow present, irregular' do
|
53
|
+
verb = Verb.new({root1: "ز", root2: "و", root3: "ج", form: "8", tense: "present", pronoun: :I})
|
54
|
+
expect(verb.conjugate).to eq("أزدوج")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
context "assimilated taa present" do
|
59
|
+
it 'conjugates form VIII assimilated taa present with root1 Thal' do
|
60
|
+
verb = Verb.new({root1: "ظ", root2: "ل", root3: "م", form: "8", tense: "present", pronoun: :he})
|
61
|
+
expect(verb.conjugate).to eq("يظّلم")
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'conjugates form VIII assimilated taa present with first radical taa' do
|
65
|
+
verb = Verb.new({root1: "ت", root2: "ب", root3: "ع", form: "8", tense: "present", pronoun: :we})
|
66
|
+
expect(verb.conjugate).to eq("نتّبع")
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'conjugates form VIII assimilated taa present with first radical daal' do
|
70
|
+
verb = Verb.new({root1: "د", root2: "ح", root3: "ر", form: "8", tense: "present", pronoun: :I})
|
71
|
+
expect(verb.conjugate).to eq("أدّحر")
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
context "morphed taa present" do
|
76
|
+
it 'conjugates form VIII morphed taa present with first radical Saad' do
|
77
|
+
verb = Verb.new({root1: "ص", root2: "د", root3: "م", form: "8", tense: "present", pronoun: :they})
|
78
|
+
expect(verb.conjugate).to eq("يصطدمون")
|
79
|
+
end
|
80
|
+
|
81
|
+
it 'conjugates form VIII morphed taa present with first radical zaa' do
|
82
|
+
verb = Verb.new({root1: "ز", root2: "ح", root3: "م", form: "8", tense: "present", pronoun: :she})
|
83
|
+
expect(verb.conjugate).to eq("تزدحم")
|
84
|
+
end
|
85
|
+
|
86
|
+
it 'conjugates form VIII morphed taa present with first radical Daad' do
|
87
|
+
verb = Verb.new({root1: "ض", root2: "ر", root3: "ب", form: "8", tense: "present", pronoun: :you_m})
|
88
|
+
expect(verb.conjugate).to eq("تضطرب")
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
context "doubled present" do
|
93
|
+
it 'conjugates form VIII doubled present, regular' do
|
94
|
+
verb = Verb.new({root1: "م", root2: "د", root3: "د", form: "8", tense: "present", pronoun: :we})
|
95
|
+
expect(verb.conjugate).to eq("نمتدّ")
|
96
|
+
end
|
97
|
+
|
98
|
+
it 'conjugates form VIII doubled present, morphed taa' do
|
99
|
+
verb = Verb.new({root1: "ض", root2: "ر", root3: "ر", form: "8", tense: "present", pronoun: :she})
|
100
|
+
expect(verb.conjugate).to eq("تضطرّ")
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
context "defective present" do
|
105
|
+
it 'conjugates form VIII defective present, you_f' do
|
106
|
+
verb = Verb.new({root1: "ب", root2: "ل", root3: "ي", form: "8", tense: "present", pronoun: :you_f})
|
107
|
+
expect(verb.conjugate).to eq("تبتلين")
|
108
|
+
end
|
109
|
+
|
110
|
+
it 'conjugates form VIII defective present, he' do
|
111
|
+
verb = Verb.new({root1: "ب", root2: "ل", root3: "ي", form: "8", tense: "present", pronoun: :he})
|
112
|
+
expect(verb.conjugate).to eq("يبتلي")
|
113
|
+
end
|
114
|
+
|
115
|
+
it 'conjugates form VIII defective-assimilated present' do
|
116
|
+
verb = Verb.new({root1: "و", root2: "ق", root3: "ي", form: "8", tense: "present", pronoun: :I})
|
117
|
+
expect(verb.conjugate).to eq("أتّقي")
|
118
|
+
end
|
119
|
+
|
120
|
+
it 'conjugates form VIII hollow-defective present' do
|
121
|
+
verb = Verb.new({root1: "ح", root2: "و", root3: "ي", form: "8", tense: "present", pronoun: :you_pl})
|
122
|
+
expect(verb.conjugate).to eq("تحتوون")
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe "Form VII Present" do
|
6
|
+
|
7
|
+
context 'regular present' do
|
8
|
+
it 'conjugates formVII present' do
|
9
|
+
verb = Verb.new({root1: "ق", root2: "ط", root3: "ع", form: "7", tense: "present", pronoun: :she})
|
10
|
+
expect(verb.conjugate).to eq("تنقطع")
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'conjugates form VII present with final radical hamza' do
|
14
|
+
verb = Verb.new({root1: "ط", root2: "ف", root3: "ء", form: "7", tense: "present", pronoun: :she})
|
15
|
+
expect(verb.conjugate).to eq("تنطفئ")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context "hollow present" do
|
20
|
+
it 'conjugates formVII present, middle radical waaw, :she' do
|
21
|
+
verb = Verb.new({root1: "ق", root2: "و", root3: "د", form: "7", tense: "present", pronoun: :she})
|
22
|
+
expect(verb.conjugate).to eq("تنقاد")
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'conjugates formVII present, middle radical yaa' do
|
26
|
+
verb = Verb.new({root1: "ب", root2: "ي", root3: "ع", form: "7", tense: "present", pronoun: :she})
|
27
|
+
expect(verb.conjugate).to eq("تنباع")
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
context "doubled present" do
|
32
|
+
it 'conjugates formVII doubled past, :she' do
|
33
|
+
verb = Verb.new({root1: "ض", root2: "م", root3: "م", form: "7", tense: "present", pronoun: :she})
|
34
|
+
expect(verb.conjugate).to eq("تنضمّ")
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
context "defective present" do
|
39
|
+
it 'conjugates formVII defective present' do
|
40
|
+
verb = Verb.new({root1: "ق", root2: "ض", root3: "ي", form: "7", tense: "present", pronoun: :she})
|
41
|
+
expect(verb.conjugate).to eq("تنقضي")
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'conjugates formVII defective-hollow present' do
|
45
|
+
verb = Verb.new({root1: "ز", root2: "و", root3: "ي", form: "7", tense: "present", pronoun: :she})
|
46
|
+
expect(verb.conjugate).to eq("تنزوي")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe "Form VI Present" do
|
6
|
+
|
7
|
+
context 'regular present' do
|
8
|
+
it 'conjugates formVI present' do
|
9
|
+
verb = Verb.new({root1: "ب", root2: "د", root3: "ل", form: "6", tense: "present", pronoun: :he})
|
10
|
+
expect(verb.conjugate).to eq("يتبادل")
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'conjugates form VI present with first radical hamza' do
|
14
|
+
verb = Verb.new({root1: "ء", root2: "ل", root3: "ف", form: "6", tense: "present", pronoun: :we})
|
15
|
+
expect(verb.conjugate).to eq("نتآلف")
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'conjugates form VI present with second radical hamza' do
|
19
|
+
verb = Verb.new({root1: "س", root2: "ء", root3: "ل", form: "6", tense: "present", pronoun: :we})
|
20
|
+
expect(verb.conjugate).to eq("نتساءل")
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'conjugates form VI present with third radical hamza' do
|
24
|
+
verb = Verb.new({root1: "ك", root2: "ف", root3: "ء", form: "6", tense: "present", pronoun: :they})
|
25
|
+
expect(verb.conjugate).to eq("يتكافؤون")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
context "assimilated present" do
|
30
|
+
it 'conjugates form VI assimilated present' do
|
31
|
+
verb = Verb.new({root1: "و", root2: "ف", root3: "ق", form: "6", tense: "present", pronoun: :you_f})
|
32
|
+
expect(verb.conjugate).to eq("تتوافقين")
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
context "defective present" do
|
37
|
+
it 'conjugates form VI defective present, third radical yaa, :he' do
|
38
|
+
verb = Verb.new({root1: "ق", root2: "ض", root3: "ي", form: "6", tense: "present", pronoun: :he})
|
39
|
+
expect(verb.conjugate).to eq("يتقاضى")
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'conjugates form VI defective present, third radical yaa, :they' do
|
43
|
+
verb = Verb.new({root1: "ق", root2: "ض", root3: "ي", form: "6", tense: "present", pronoun: :they})
|
44
|
+
expect(verb.conjugate).to eq("يتقاضون")
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'conjugates form VI defective present, third radical waaw' do
|
48
|
+
verb = Verb.new({root1: "ع", root2: "ف", root3: "و", form: "6", tense: "present", pronoun: :you_m})
|
49
|
+
expect(verb.conjugate).to eq("تتعافى")
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'conjugates form VI defective-assimilated present' do
|
53
|
+
verb = Verb.new({root1: "و", root2: "ل", root3: "ي", form: "6", tense: "present", pronoun: :you_f})
|
54
|
+
expect(verb.conjugate).to eq("تتوالين")
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'conjugates form VI hollow-assimilated present' do
|
58
|
+
verb = Verb.new({root1: "س", root2: "و", root3: "ي", form: "6", tense: "present", pronoun: :you_m})
|
59
|
+
expect(verb.conjugate).to eq("تتساوى")
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
context "hollow present" do
|
64
|
+
it 'conjugates form VI hollow present, middle radical waaw' do
|
65
|
+
verb = Verb.new({root1: "ع", root2: "و", root3: "ن", form: "6", tense: "present", pronoun: :we})
|
66
|
+
expect(verb.conjugate).to eq("نتعاون")
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'conjugates form VI hollow present, middle radical yaa' do
|
70
|
+
verb = Verb.new({root1: "ز", root2: "ي", root3: "د", form: "6", tense: "present", pronoun: :you_f})
|
71
|
+
expect(verb.conjugate).to eq("تتزايدين")
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|