latinverb 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +4 -1
- data/Gemfile.lock +24 -0
- data/Guardfile +10 -0
- data/README.markdown +1 -1
- data/Rakefile +12 -9
- data/latinverb.gemspec +4 -0
- data/lib/latinverb/chart.rb +5 -5
- data/lib/latinverb/version.rb +1 -1
- data/lib/latinverb.rb +266 -534
- data/lib/linguistics/latin/verb/classification_types.rb +19 -17
- data/lib/linguistics/latin/verb/constants.rb +14 -14
- data/lib/linguistics/latin/verb/deponent_tense_methods.rb +8 -21
- data/lib/linguistics/latin/verb/imperative_block.rb +118 -0
- data/lib/linguistics/latin/verb/infinitive_block.rb +39 -0
- data/lib/linguistics/latin/verb/infinitives.rb +181 -181
- data/lib/linguistics/latin/verb/irregulars.rb +74 -74
- data/lib/linguistics/latin/verb/latinverb/classmethods.rb +36 -117
- data/lib/linguistics/latin/verb/latinverb/data.rb +12 -15
- data/lib/linguistics/latin/verb/latinverb/defective_checker.rb +17 -0
- data/lib/linguistics/latin/verb/latinverb/deponent.rb +159 -0
- data/lib/linguistics/latin/verb/latinverb/display.rb +1 -2
- data/lib/linguistics/latin/verb/latinverb/impersonal.rb +34 -0
- data/lib/linguistics/latin/verb/latinverb/irregular.rb +83 -0
- data/lib/linguistics/latin/verb/latinverb/latin_verb_type_evaluator.rb +32 -0
- data/lib/linguistics/latin/verb/latinverb/latinverb_classifier.rb +100 -0
- data/lib/linguistics/latin/verb/latinverb/latinverb_input_sanitizer.rb +32 -0
- data/lib/linguistics/latin/verb/latinverb/latinverb_pp_extractor.rb +106 -0
- data/lib/linguistics/latin/verb/latinverb/metaprogramming.rb +30 -29
- data/lib/linguistics/latin/verb/latinverb/semideponent.rb +28 -0
- data/lib/linguistics/latin/verb/latinverb/validation.rb +5 -29
- data/lib/linguistics/latin/verb/latinverb/verbvector_description.rb +50 -0
- data/lib/linguistics/latin/verb/participle_block.rb +36 -0
- data/lib/linguistics/latin/verb/participles.rb +25 -25
- data/lib/linguistics/latin/verb/phonographia.rb +51 -51
- data/lib/linguistics/latin/verb/supine.rb +6 -6
- data/lib/linguistics/latin/verb/tense_block.rb +227 -0
- data/lib/linguistics/latin/verb/tense_definitions/first.rb +92 -0
- data/lib/linguistics/latin/verb/tense_definitions/fourth.rb +92 -0
- data/lib/linguistics/latin/verb/tense_definitions/impersonal.rb +25 -0
- data/lib/linguistics/latin/verb/tense_definitions/invariant.rb +613 -0
- data/lib/linguistics/latin/verb/tense_definitions/irregular.rb +82 -0
- data/lib/linguistics/latin/verb/tense_definitions/second.rb +97 -0
- data/lib/linguistics/latin/verb/tense_definitions/third.rb +86 -0
- data/lib/linguistics/latin/verb/tense_definitions/third_io.rb +91 -0
- data/test/testClusterResolution.rb +0 -1
- data/test/testDataStructures.rb +8 -5
- data/test/testDefectSemiImp.rb +9 -10
- data/test/testDeponentFirstConjugation.rb +2 -2
- data/test/testDeponentFourthConjugation.rb +2 -2
- data/test/testDeponentSecondConjugation.rb +2 -2
- data/test/testDeponentThirdConjugation.rb +2 -2
- data/test/testDeponentThirdIOConjugation.rb +2 -2
- data/test/testDeserializeInfinitives.rb +2 -4
- data/test/testFirstConjugation.rb +53 -53
- data/test/testFourthConjugation.rb +11 -11
- data/test/testFreakishVerbs.rb +12 -11
- data/test/testIrregulars.rb +24 -23
- data/test/testLatinVerb.rb +46 -55
- data/test/testSecondConjugation.rb +27 -27
- data/test/testThirdConjugation.rb +14 -14
- data/test/testThirdIOConjugation.rb +13 -13
- metadata +95 -53
- data/lib/linguistics/latin/verb/latinverb/auxiliary_classes.rb +0 -208
- data/lib/linguistics/latin/verb/tense_methods.rb +0 -950
@@ -0,0 +1,97 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# vim: set fdm=marker tw=80 sw=2 wrap:
|
3
|
+
|
4
|
+
module Linguistics
|
5
|
+
module Latin
|
6
|
+
module Verb
|
7
|
+
module TenseDefinitions
|
8
|
+
module Second
|
9
|
+
def active_voice_indicative_mood_future_tense
|
10
|
+
return TenseBlock.new(
|
11
|
+
[Linguistics::Latin::Verb::LatinVerb::AF_ONE_TWO_ENDINGS.collect{|x| stem + x}].flatten,
|
12
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_future_tense] }
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
def active_voice_indicative_mood_imperfect_tense
|
17
|
+
return TenseBlock.new(
|
18
|
+
[Linguistics::Latin::Verb::LatinVerb::AI_FIRST_AND_SECOND_CONJUG_PERS_ENDINGS.collect{|x| stem + x}].flatten,
|
19
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_imperfect_tense] }
|
20
|
+
)
|
21
|
+
end
|
22
|
+
|
23
|
+
def active_voice_indicative_mood_present_tense
|
24
|
+
return TenseBlock.new(
|
25
|
+
[ first_person_singular,
|
26
|
+
Linguistics::Latin::Verb::LatinVerb::AP_FIRST_AND_SECOND_CONJUG_PERS_ENDINGS.collect{ |ending| stem + ending}
|
27
|
+
].flatten!,
|
28
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_present_tense] }
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
32
|
+
def active_voice_subjunctive_mood_present_tense
|
33
|
+
key = verb_type.to_s.split(/::/).last.to_sym
|
34
|
+
asp_base = Linguistics::Latin::Verb::LatinVerb::ACTIVE_PRESENT_SUBJUNCTIVE_ENDINGS[key].call(stem[0..-2])
|
35
|
+
elements = ['m',
|
36
|
+
Linguistics::Latin::Verb::LatinVerb::AP_FIRST_AND_SECOND_CONJUG_PERS_ENDINGS].flatten!.map do |ending|
|
37
|
+
asp_base + ending
|
38
|
+
end
|
39
|
+
|
40
|
+
TenseBlock.new(
|
41
|
+
elements,
|
42
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_subjunctive_mood_present_tense] }
|
43
|
+
)
|
44
|
+
end
|
45
|
+
|
46
|
+
def passive_voice_indicative_mood_future_tense
|
47
|
+
fp_stem = stem+"bi"
|
48
|
+
standards = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG[2..-1].map{|x| fp_stem + x}
|
49
|
+
standards.pop
|
50
|
+
fp_stem.sub!(/.$/,'u')
|
51
|
+
elements = [stem + "b\xc5\x8dr",
|
52
|
+
stem + "beris",
|
53
|
+
standards,
|
54
|
+
fp_stem+Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.last].flatten!
|
55
|
+
TenseBlock.new(
|
56
|
+
elements,
|
57
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_future_tense] }
|
58
|
+
)
|
59
|
+
end
|
60
|
+
|
61
|
+
def passive_voice_indicative_mood_imperfect_tense
|
62
|
+
imperfect_stem = stem + "b\xc4\x81"
|
63
|
+
elements = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.map{|x| imperfect_stem+x}
|
64
|
+
return TenseBlock.new(
|
65
|
+
elements,
|
66
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_imperfect_tense] }
|
67
|
+
)
|
68
|
+
end
|
69
|
+
|
70
|
+
def passive_voice_indicative_mood_present_tense
|
71
|
+
local_pe = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.clone
|
72
|
+
elements = [first_person_singular.to_s + "r",
|
73
|
+
local_pe[1..-1].map{|x| @stem + x}].flatten!
|
74
|
+
return TenseBlock.new(
|
75
|
+
elements,
|
76
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_present_tense] }
|
77
|
+
)
|
78
|
+
end
|
79
|
+
|
80
|
+
def passive_voice_subjunctive_mood_present_tense
|
81
|
+
key = verb_type.to_s.split(/::/).last.to_sym
|
82
|
+
short_base =
|
83
|
+
Linguistics::Latin::Verb::LatinVerb::ACTIVE_PRESENT_SUBJUNCTIVE_ENDINGS[key].call(stem[0..-2])
|
84
|
+
elems = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.map do |ending|
|
85
|
+
short_base + ending
|
86
|
+
end
|
87
|
+
TenseBlock.new(
|
88
|
+
elems,
|
89
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_subjunctive_mood_present_tense] }
|
90
|
+
)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# vim: set fdm=marker tw=80 sw=2:
|
3
|
+
|
4
|
+
module Linguistics
|
5
|
+
module Latin
|
6
|
+
module Verb
|
7
|
+
module TenseDefinitions
|
8
|
+
module Third
|
9
|
+
def active_voice_indicative_mood_future_tense
|
10
|
+
return TenseBlock.new(
|
11
|
+
[Linguistics::Latin::Verb::LatinVerb::AF_OTHER_ENDINGS.collect{|x| stem + x}].flatten,
|
12
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_future_tense] }
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
def active_voice_indicative_mood_imperfect_tense
|
17
|
+
return TenseBlock.new(
|
18
|
+
[Linguistics::Latin::Verb::LatinVerb::AI_THIRD_CONJUG_PERS_ENDINGS.collect{|x| stem + x}].flatten,
|
19
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_imperfect_tense] }
|
20
|
+
)
|
21
|
+
end
|
22
|
+
|
23
|
+
def active_voice_indicative_mood_present_tense
|
24
|
+
return TenseBlock.new(
|
25
|
+
[ Linguistics::Latin::Verb::LatinVerb::AP_THIRD_CONJUG_PERS_ENDINGS.collect{ |ending| stem + ending } ].flatten!,
|
26
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_present_tense] }
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
def active_voice_subjunctive_mood_present_tense
|
31
|
+
key = verb_type.to_s.split(/::/).last.to_sym
|
32
|
+
asp_base = Linguistics::Latin::Verb::LatinVerb::ACTIVE_PRESENT_SUBJUNCTIVE_ENDINGS[key].call(stem[0..-1])
|
33
|
+
elems = ['m',
|
34
|
+
Linguistics::Latin::Verb::LatinVerb::AP_FIRST_AND_SECOND_CONJUG_PERS_ENDINGS].flatten!.map do |ending|
|
35
|
+
asp_base + ending
|
36
|
+
end
|
37
|
+
|
38
|
+
TenseBlock.new(
|
39
|
+
elems,
|
40
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_subjunctive_mood_present_tense] }
|
41
|
+
)
|
42
|
+
end
|
43
|
+
|
44
|
+
def passive_voice_indicative_mood_future_tense
|
45
|
+
fp_stem = stem+"ē"
|
46
|
+
standards = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG[1..-1].map{|x| fp_stem + x}
|
47
|
+
elems = [stem + "ar", standards].flatten!
|
48
|
+
TenseBlock.new(
|
49
|
+
elems,
|
50
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_future_tense] }
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
54
|
+
def passive_voice_indicative_mood_imperfect_tense
|
55
|
+
ministem = stem + "ēbā"
|
56
|
+
elems = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.map{|x| ministem + x}
|
57
|
+
return TenseBlock.new(
|
58
|
+
elems,
|
59
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_imperfect_tense] }
|
60
|
+
)
|
61
|
+
end
|
62
|
+
|
63
|
+
def passive_voice_indicative_mood_present_tense
|
64
|
+
return TenseBlock.new(
|
65
|
+
[first_person_singular+"r",
|
66
|
+
Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_OTHER[1..-1].map{|x| stem + x}].flatten!,
|
67
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_present_tense] }
|
68
|
+
)
|
69
|
+
end
|
70
|
+
|
71
|
+
def passive_voice_subjunctive_mood_present_tense
|
72
|
+
subjunctive_stem = verb_type.to_s =~ /O$/i ? stem + "iā" : stem + "ā"
|
73
|
+
elems = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.map do |ending|
|
74
|
+
subjunctive_stem + ending
|
75
|
+
end
|
76
|
+
TenseBlock.new(
|
77
|
+
elems,
|
78
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_subjunctive_mood_present_tense] }
|
79
|
+
)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
@@ -0,0 +1,91 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# vim: set fdm=marker tw=80 sw=2 wrap:
|
3
|
+
|
4
|
+
module Linguistics
|
5
|
+
module Latin
|
6
|
+
module Verb
|
7
|
+
module TenseDefinitions
|
8
|
+
module ThirdIO
|
9
|
+
def active_voice_indicative_mood_future_tense
|
10
|
+
return TenseBlock.new(
|
11
|
+
[Linguistics::Latin::Verb::LatinVerb::AF_OTHER_ENDINGS.collect{|x| stem + "i" + x}].flatten,
|
12
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_future_tense] }
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
def active_voice_indicative_mood_imperfect_tense
|
17
|
+
return TenseBlock.new(
|
18
|
+
[Linguistics::Latin::Verb::LatinVerb::AI_THIRD_CONJUG_PERS_ENDINGS.collect{ |x| stem + "i" + x } ].flatten!,
|
19
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_imperfect_tense] }
|
20
|
+
)
|
21
|
+
end
|
22
|
+
|
23
|
+
def active_voice_indicative_mood_present_tense
|
24
|
+
return TenseBlock.new(
|
25
|
+
[ first_person_singular, Linguistics::Latin::Verb::LatinVerb::AP_THIRDIO_CONJG_PERS_ENDINGS.collect{ |ending| stem + ending } ].flatten!,
|
26
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_present_tense] }
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
def active_voice_subjunctive_mood_present_tense
|
31
|
+
key = verb_type.to_s.split(/::/).last.to_sym
|
32
|
+
|
33
|
+
TenseBlock.new(
|
34
|
+
['m',
|
35
|
+
Linguistics::Latin::Verb::LatinVerb::AP_FIRST_AND_SECOND_CONJUG_PERS_ENDINGS].flatten!.map do |ending|
|
36
|
+
Linguistics::Latin::Verb::LatinVerb::ACTIVE_PRESENT_SUBJUNCTIVE_ENDINGS[key].call(@stem) + ending
|
37
|
+
end,
|
38
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_subjunctive_mood_present_tense] }
|
39
|
+
)
|
40
|
+
end
|
41
|
+
|
42
|
+
def passive_voice_indicative_mood_future_tense
|
43
|
+
ie_base = stem+"iē"
|
44
|
+
elems = [
|
45
|
+
stem+"ia"+Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG[0],
|
46
|
+
Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG[1..-1].map{|x| ie_base + x}
|
47
|
+
].flatten!
|
48
|
+
TenseBlock.new(
|
49
|
+
elems,
|
50
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_future_tense] }
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
54
|
+
def passive_voice_indicative_mood_imperfect_tense
|
55
|
+
base = stem+"iēbā"
|
56
|
+
elems = [Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.map{|x| base + x}].flatten!
|
57
|
+
return TenseBlock.new(
|
58
|
+
elems,
|
59
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_imperfect_tense] }
|
60
|
+
)
|
61
|
+
end
|
62
|
+
|
63
|
+
def passive_voice_indicative_mood_present_tense
|
64
|
+
base = stem+"i"
|
65
|
+
elems = [
|
66
|
+
first_person_singular+"r",
|
67
|
+
Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_OTHER[1..-2].map{|x| stem + x},
|
68
|
+
base+Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_OTHER[-1]
|
69
|
+
].flatten!
|
70
|
+
return TenseBlock.new(
|
71
|
+
elems,
|
72
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_present_tense] }
|
73
|
+
)
|
74
|
+
end
|
75
|
+
|
76
|
+
def passive_voice_subjunctive_mood_present_tense
|
77
|
+
subjunctive_stem = verb_type.to_s =~ /O$/i ? stem + "iā" : stem + "ā"
|
78
|
+
elems = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.map do |ending|
|
79
|
+
subjunctive_stem + ending
|
80
|
+
end
|
81
|
+
TenseBlock.new(
|
82
|
+
elems,
|
83
|
+
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_subjunctive_mood_present_tense] }
|
84
|
+
)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
data/test/testDataStructures.rb
CHANGED
@@ -7,10 +7,11 @@ require 'latinverb'
|
|
7
7
|
|
8
8
|
# Internal dependencies
|
9
9
|
|
10
|
-
class TestDataStructures < MiniTest::Unit::TestCase # :nodoc:
|
10
|
+
class TestDataStructures < MiniTest::Unit::TestCase # :nodoc:
|
11
11
|
def setup
|
12
12
|
@aFirstDS = Linguistics::Latin::Verb::LatinVerb.new 'amō amāre amāvī amatum'
|
13
13
|
end
|
14
|
+
|
14
15
|
def test_to_hash
|
15
16
|
h = @aFirstDS.to_hash
|
16
17
|
assert_equal(23, h.keys.length )
|
@@ -18,12 +19,14 @@ class TestDataStructures < MiniTest::Unit::TestCase # :nodoc:
|
|
18
19
|
assert_equal("amant",
|
19
20
|
h[:active_voice_indicative_mood_present_tense].third_person_plural_number)
|
20
21
|
end
|
22
|
+
|
21
23
|
def test_yaml
|
22
|
-
assert @aFirstDS.to_y
|
23
|
-
assert @aFirstDS.active_voice_indicative_mood_perfect_tense.to_a.to_yaml
|
24
|
-
@aFirstDS.active_voice_indicative_mood_perfect_tense
|
24
|
+
assert @aFirstDS.to_y, "to_y should return a yaml structure"
|
25
|
+
assert @aFirstDS.active_voice_indicative_mood_perfect_tense.to_a.to_yaml, "to_yaml should return a yaml structure"
|
26
|
+
assert @aFirstDS.active_voice_indicative_mood_perfect_tense, "A tense block should be returned"
|
25
27
|
end
|
28
|
+
|
26
29
|
def test_json
|
27
|
-
assert @aFirstDS.pretty_generate
|
30
|
+
assert @aFirstDS.pretty_generate
|
28
31
|
end
|
29
32
|
end
|
data/test/testDefectSemiImp.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
|
3
3
|
require "minitest/autorun"
|
4
|
-
require 'pp'
|
5
4
|
|
6
5
|
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
7
6
|
require 'latinverb'
|
@@ -9,27 +8,27 @@ require 'latinverb'
|
|
9
8
|
|
10
9
|
class TestDefectSemiImp < MiniTest::Unit::TestCase # :nodoc:
|
11
10
|
def test_semideponents
|
12
|
-
|
13
|
-
assert_equal Linguistics::Latin::Verb::
|
11
|
+
|
12
|
+
assert_equal Linguistics::Latin::Verb::Classification::Semideponent,
|
14
13
|
Linguistics::Latin::Verb::LatinVerb.new("audeō audēre ausus sum").classification
|
15
14
|
|
16
|
-
assert_equal Linguistics::Latin::Verb::
|
15
|
+
assert_equal Linguistics::Latin::Verb::Classification::Semideponent,
|
17
16
|
Linguistics::Latin::Verb::LatinVerb.new("gaudeō gaudēre gavisus sum ").classification
|
18
17
|
|
19
|
-
assert_equal Linguistics::Latin::Verb::
|
18
|
+
assert_equal Linguistics::Latin::Verb::Classification::Semideponent,
|
20
19
|
Linguistics::Latin::Verb::LatinVerb.new("soleō solēre solitus sum").classification
|
21
20
|
|
22
|
-
assert_equal Linguistics::Latin::Verb::
|
21
|
+
assert_equal Linguistics::Latin::Verb::Classification::Semideponent,
|
23
22
|
Linguistics::Latin::Verb::LatinVerb.new("fidō fidere fisus sum").classification
|
24
23
|
|
25
24
|
# Test extensions of the four standard mappings
|
26
|
-
assert_equal Linguistics::Latin::Verb::
|
25
|
+
assert_equal Linguistics::Latin::Verb::Classification::Semideponent,
|
27
26
|
Linguistics::Latin::Verb::LatinVerb.new("confidō confidere confīsus sum").classification
|
28
27
|
end
|
29
28
|
|
30
29
|
def test_semideponent_exhaustively #:nodoc:
|
31
30
|
f = Linguistics::Latin::Verb::LatinVerb.new "gaudeō gaudēre gāvīsus"
|
32
|
-
assert_equal Linguistics::Latin::Verb::
|
31
|
+
assert_equal Linguistics::Latin::Verb::Classification::Semideponent, f.classification
|
33
32
|
|
34
33
|
assert_equal "gaudeō", f.active_voice_indicative_mood_present_tense_first_person_singular_number
|
35
34
|
assert_equal "gaudēs", f.active_voice_indicative_mood_present_tense_second_person_singular_number
|
@@ -44,7 +43,7 @@ class TestDefectSemiImp < MiniTest::Unit::TestCase # :nodoc:
|
|
44
43
|
assert_equal "gaudēbāmus", f.active_voice_indicative_mood_imperfect_tense_first_person_plural_number
|
45
44
|
assert_equal "gaudēbātis", f.active_voice_indicative_mood_imperfect_tense_second_person_plural_number
|
46
45
|
assert_equal "gaudēbant", f.active_voice_indicative_mood_imperfect_tense_third_person_plural_number
|
47
|
-
|
46
|
+
|
48
47
|
assert_equal "gaudēbō", f.active_voice_indicative_mood_future_tense_first_person_singular_number
|
49
48
|
assert_equal "gaudēbis", f.active_voice_indicative_mood_future_tense_second_person_singular_number
|
50
49
|
assert_equal "gaudēbit", f.active_voice_indicative_mood_future_tense_third_person_singular_number
|
@@ -90,7 +89,7 @@ class TestDefectSemiImp < MiniTest::Unit::TestCase # :nodoc:
|
|
90
89
|
assert_equal "gaudērēmus", f.active_voice_subjunctive_mood_imperfect_tense_first_person_plural_number
|
91
90
|
assert_equal "gaudērētis", f.active_voice_subjunctive_mood_imperfect_tense_second_person_plural_number
|
92
91
|
assert_equal "gaudērent", f.active_voice_subjunctive_mood_imperfect_tense_third_person_plural_number
|
93
|
-
|
92
|
+
|
94
93
|
assert_equal "[ gāvīsus, gāvīsa, gāvīsum ] sim", f.active_voice_subjunctive_mood_perfect_tense_first_person_singular_number
|
95
94
|
assert_equal "[ gāvīsus, gāvīsa, gāvīsum ] sis", f.active_voice_subjunctive_mood_perfect_tense_second_person_singular_number
|
96
95
|
assert_equal "[ gāvīsus, gāvīsa, gāvīsum ] sit", f.active_voice_subjunctive_mood_perfect_tense_third_person_singular_number
|
@@ -8,13 +8,13 @@ require 'linguistics/latin/verb/classification_types'
|
|
8
8
|
|
9
9
|
# Internal dependencies
|
10
10
|
|
11
|
-
class TestDeponent < MiniTest::Unit::TestCase # :nodoc:
|
11
|
+
class TestDeponent < MiniTest::Unit::TestCase # :nodoc:
|
12
12
|
def setup
|
13
13
|
@aDep = Linguistics::Latin::Verb::LatinVerb.new 'mīror mīrārī mīrātum'
|
14
14
|
end
|
15
15
|
|
16
16
|
def test_firstconj_depo
|
17
|
-
assert_equal(Linguistics::Latin::Verb::
|
17
|
+
assert_equal(Linguistics::Latin::Verb::Classification::Deponent, @aDep.classification)
|
18
18
|
|
19
19
|
assert_equal 'mīror', @aDep.active_voice_indicative_mood_present_tense_first_person_singular_number
|
20
20
|
assert_equal 'mīrāris', @aDep.active_voice_indicative_mood_present_tense_second_person_singular_number
|
@@ -8,13 +8,13 @@ require 'linguistics/latin/verb/classification_types'
|
|
8
8
|
|
9
9
|
# Internal dependencies
|
10
10
|
|
11
|
-
class TestDeponentFourthConjugation < MiniTest::Unit::TestCase # :nodoc:
|
11
|
+
class TestDeponentFourthConjugation < MiniTest::Unit::TestCase # :nodoc:
|
12
12
|
def setup
|
13
13
|
@aDep = Linguistics::Latin::Verb::LatinVerb.new 'partior partīrī partītum'
|
14
14
|
end
|
15
15
|
|
16
16
|
def test_depo
|
17
|
-
assert_equal(Linguistics::Latin::Verb::
|
17
|
+
assert_equal(Linguistics::Latin::Verb::Classification::Deponent, @aDep.classification)
|
18
18
|
|
19
19
|
assert_equal 'partior', @aDep.active_voice_indicative_mood_present_tense_first_person_singular_number
|
20
20
|
assert_equal 'partīris', @aDep.active_voice_indicative_mood_present_tense_second_person_singular_number
|
@@ -8,13 +8,13 @@ require 'linguistics/latin/verb/classification_types'
|
|
8
8
|
|
9
9
|
# Internal dependencies
|
10
10
|
|
11
|
-
class TestDeponentSecondConjugation < MiniTest::Unit::TestCase # :nodoc:
|
11
|
+
class TestDeponentSecondConjugation < MiniTest::Unit::TestCase # :nodoc:
|
12
12
|
def setup
|
13
13
|
@aDep = Linguistics::Latin::Verb::LatinVerb.new 'vereor verērī veritum'
|
14
14
|
end
|
15
15
|
|
16
16
|
def test_depo
|
17
|
-
assert_equal(Linguistics::Latin::Verb::
|
17
|
+
assert_equal(Linguistics::Latin::Verb::Classification::Deponent, @aDep.classification)
|
18
18
|
|
19
19
|
assert_equal 'vereor', @aDep.active_voice_indicative_mood_present_tense_first_person_singular_number
|
20
20
|
assert_equal 'verēris', @aDep.active_voice_indicative_mood_present_tense_second_person_singular_number
|
@@ -8,13 +8,13 @@ require 'linguistics/latin/verb/classification_types'
|
|
8
8
|
|
9
9
|
# Internal dependencies
|
10
10
|
|
11
|
-
class TestDeponentThirdConjugation < MiniTest::Unit::TestCase # :nodoc:
|
11
|
+
class TestDeponentThirdConjugation < MiniTest::Unit::TestCase # :nodoc:
|
12
12
|
def setup
|
13
13
|
@aDep = Linguistics::Latin::Verb::LatinVerb.new 'sequor sequī secūtum'
|
14
14
|
end
|
15
15
|
|
16
16
|
def test_depo
|
17
|
-
assert_equal(Linguistics::Latin::Verb::
|
17
|
+
assert_equal(Linguistics::Latin::Verb::Classifications::Deponent, @aDep.classification)
|
18
18
|
|
19
19
|
assert_equal 'sequor', @aDep.active_voice_indicative_mood_present_tense_first_person_singular_number
|
20
20
|
assert_equal 'sequeris', @aDep.active_voice_indicative_mood_present_tense_second_person_singular_number
|
@@ -8,13 +8,13 @@ require 'linguistics/latin/verb/classification_types'
|
|
8
8
|
|
9
9
|
# Internal dependencies
|
10
10
|
|
11
|
-
class TestDeponentThirdConjugation < MiniTest::Unit::TestCase # :nodoc:
|
11
|
+
class TestDeponentThirdConjugation < MiniTest::Unit::TestCase # :nodoc:
|
12
12
|
def setup
|
13
13
|
@aDep = Linguistics::Latin::Verb::LatinVerb.new 'patior patī passum'
|
14
14
|
end
|
15
15
|
|
16
16
|
def test_depo
|
17
|
-
assert_equal(Linguistics::Latin::Verb::
|
17
|
+
assert_equal(Linguistics::Latin::Verb::Classification::Deponent, @aDep.classification)
|
18
18
|
|
19
19
|
assert_equal 'patior', @aDep.active_voice_indicative_mood_present_tense_first_person_singular_number
|
20
20
|
assert_equal 'pateris', @aDep.active_voice_indicative_mood_present_tense_second_person_singular_number
|
@@ -1,11 +1,9 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
|
3
3
|
require "minitest/autorun"
|
4
|
-
require 'pp'
|
5
4
|
|
6
5
|
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
7
6
|
require 'latinverb'
|
8
|
-
require 'linguistics/latin/verb/latinverb/auxiliary_classes'
|
9
7
|
|
10
8
|
|
11
9
|
class TestDeserializeInfinitives < MiniTest::Unit::TestCase # :nodoc:
|
@@ -17,10 +15,10 @@ class TestDeserializeInfinitives < MiniTest::Unit::TestCase # :nodoc:
|
|
17
15
|
"data": {
|
18
16
|
"present_active_infinitive": "amāre",
|
19
17
|
"present_passive_infinitive": "amārī",
|
20
|
-
|
18
|
+
|
21
19
|
"perfect_active_infinitive": "amāvīsse",
|
22
20
|
"perfect_passive_infinitive": "amatum",
|
23
|
-
|
21
|
+
|
24
22
|
"future_active_infinitive ": "amatūrus esse",
|
25
23
|
"future_passive_infinitive": "amatum īri"
|
26
24
|
}
|