latinverb 0.2.0 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. data/.gitignore +0 -1
  2. data/Gemfile +1 -2
  3. data/README.markdown +54 -240
  4. data/etc/irreg_skel.json +104 -0
  5. data/{latinirb.gemspec → latinverb.gemspec} +4 -4
  6. data/lib/latinverb/chart.rb +94 -0
  7. data/lib/latinverb/version.rb +10 -0
  8. data/lib/latinverb.rb +710 -0
  9. data/lib/linguistics/latin/verb/classification_types.rb +59 -0
  10. data/lib/linguistics/latin/verb/constants.rb +201 -0
  11. data/lib/linguistics/latin/verb/deponent_tense_methods.rb +98 -0
  12. data/lib/linguistics/latin/verb/infinitives.rb +212 -0
  13. data/lib/linguistics/latin/verb/irregulars.rb +4393 -0
  14. data/lib/linguistics/latin/verb/latinverb/auxiliary_classes.rb +208 -0
  15. data/lib/linguistics/latin/verb/latinverb/classmethods.rb +215 -0
  16. data/lib/linguistics/latin/verb/latinverb/data.rb +90 -0
  17. data/lib/linguistics/latin/verb/latinverb/display.rb +23 -0
  18. data/lib/linguistics/latin/verb/latinverb/metaprogramming.rb +79 -0
  19. data/lib/linguistics/latin/verb/latinverb/validation.rb +66 -0
  20. data/lib/linguistics/latin/verb/participles.rb +202 -0
  21. data/lib/linguistics/latin/verb/phonographia.rb +109 -0
  22. data/lib/linguistics/latin/verb/supine.rb +42 -0
  23. data/lib/linguistics/latin/verb/tense_methods.rb +950 -0
  24. data/test/testAmbiguousLookups.rb +30 -0
  25. data/test/testClusterResolution.rb +20 -0
  26. data/test/testDataStructures.rb +29 -0
  27. data/test/testDefectSemiImp.rb +111 -0
  28. data/test/testDeponentFirstConjugation.rb +64 -0
  29. data/test/testDeponentFourthConjugation.rb +64 -0
  30. data/test/testDeponentSecondConjugation.rb +64 -0
  31. data/test/testDeponentThirdConjugation.rb +64 -0
  32. data/test/testDeponentThirdIOConjugation.rb +64 -0
  33. data/test/testDeserializeInfinitives.rb +38 -0
  34. data/test/testFirstConjugation.rb +388 -0
  35. data/test/testFourthConjugation.rb +190 -0
  36. data/test/testFreakishVerbs.rb +93 -0
  37. data/test/testImperativeBlock.rb +27 -0
  38. data/test/testIrregularSum.rb +22 -0
  39. data/test/testIrregulars.rb +652 -0
  40. data/test/testLatinVerb.rb +195 -0
  41. data/test/testMacronRules.rb +19 -0
  42. data/test/testSecondConjugation.rb +189 -0
  43. data/test/testThirdConjugation.rb +190 -0
  44. data/test/testThirdIOConjugation.rb +190 -0
  45. metadata +70 -18
  46. data/bin/latinirb.rb +0 -7
  47. data/latinverb.rb +0 -544
  48. data/lib/LatinIRB.rb +0 -172
  49. data/lib/latinirb/paradigmatic_verbs.rb +0 -17
  50. data/lib/latinirb/version.rb +0 -10
  51. data/lib/latirb.rb +0 -20
@@ -0,0 +1,30 @@
1
+ # encoding: UTF-8
2
+
3
+ require "minitest/autorun"
4
+
5
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
6
+ require 'latinverb'
7
+
8
+
9
+ class TestAmbiguousLookups < MiniTest::Unit::TestCase # :nodoc:
10
+ def setup
11
+ @aFourth = Linguistics::Latin::Verb::LatinVerb.new 'audiō audīre audīvī auditum'
12
+ end
13
+
14
+ def test_ambiguous_lookups_number_undef
15
+ assert_equal @aFourth.active_voice_indicative_mood_present_tense_first_person_singular_number, 'audiō'
16
+ assert_equal @aFourth.active_voice_indicative_mood_present_tense_first_person_plural_number, 'audimus'
17
+ assert_equal @aFourth.active_voice_indicative_mood_present_tense_first_person.to_s, '["audiō", "audimus"]'
18
+ assert_equal @aFourth.passive_voice_subjunctive_mood_pastperfect_tense_third_person.to_s, '["[ auditus, audita, auditum ] esset", "[ auditī, auditae, audita ] essent"]'
19
+ end
20
+
21
+ def test_ambiguous_lookups_person_undef
22
+ assert_equal @aFourth.active_voice_indicative_mood_present_tense_singular_number.to_s, '["audiō", "audis", "audit"]'
23
+ assert_equal @aFourth.active_voice_indicative_mood_imperfect_tense_plural_number.to_s, '["audiēbāmus", "audiēbātis", "audiēbant"]'
24
+ end
25
+
26
+ def test_tense_block_returns_stringified_array
27
+ assert_equal @aFourth.active_voice_indicative_mood_present_tense.to_s.class, String
28
+ end
29
+
30
+ end
@@ -0,0 +1,20 @@
1
+ # encoding: UTF-8
2
+
3
+ require "minitest/autorun"
4
+ require 'pp'
5
+
6
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
7
+ require 'latinverb'
8
+
9
+
10
+ class TestLatinVerbSecondConj < MiniTest::Unit::TestCase # :nodoc:
11
+ def setup
12
+ @aSecond = Linguistics::Latin::Verb::LatinVerb.new 'moneō monēre monuī monitum'
13
+ end
14
+
15
+ def test_partial #:nodoc:
16
+ tp = @aSecond.active_voice_indicative_mood_present_tense
17
+ assert_equal "monet", tp[2]
18
+ assert_equal 6, tp.length
19
+ end
20
+ end
@@ -0,0 +1,29 @@
1
+ # encoding: UTF-8
2
+
3
+ require "minitest/autorun"
4
+
5
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
6
+ require 'latinverb'
7
+
8
+ # Internal dependencies
9
+
10
+ class TestDataStructures < MiniTest::Unit::TestCase # :nodoc:
11
+ def setup
12
+ @aFirstDS = Linguistics::Latin::Verb::LatinVerb.new 'amō amāre amāvī amatum'
13
+ end
14
+ def test_to_hash
15
+ h = @aFirstDS.to_hash
16
+ assert_equal(23, h.keys.length )
17
+ assert_equal("amem", h[:active_voice_subjunctive_mood_present_tense][0])
18
+ assert_equal("amant",
19
+ h[:active_voice_indicative_mood_present_tense].third_person_plural_number)
20
+ end
21
+ 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
25
+ end
26
+ def test_json
27
+ assert @aFirstDS.pretty_generate
28
+ end
29
+ end
@@ -0,0 +1,111 @@
1
+ # encoding: UTF-8
2
+
3
+ require "minitest/autorun"
4
+ require 'pp'
5
+
6
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
7
+ require 'latinverb'
8
+
9
+
10
+ class TestDefectSemiImp < MiniTest::Unit::TestCase # :nodoc:
11
+ def test_semideponents
12
+
13
+ assert_equal Linguistics::Latin::Verb::VerbTypes::Semideponent,
14
+ Linguistics::Latin::Verb::LatinVerb.new("audeō audēre ausus sum").classification
15
+
16
+ assert_equal Linguistics::Latin::Verb::VerbTypes::Semideponent,
17
+ Linguistics::Latin::Verb::LatinVerb.new("gaudeō gaudēre gavisus sum ").classification
18
+
19
+ assert_equal Linguistics::Latin::Verb::VerbTypes::Semideponent,
20
+ Linguistics::Latin::Verb::LatinVerb.new("soleō solēre solitus sum").classification
21
+
22
+ assert_equal Linguistics::Latin::Verb::VerbTypes::Semideponent,
23
+ Linguistics::Latin::Verb::LatinVerb.new("fidō fidere fisus sum").classification
24
+
25
+ # Test extensions of the four standard mappings
26
+ assert_equal Linguistics::Latin::Verb::VerbTypes::Semideponent,
27
+ Linguistics::Latin::Verb::LatinVerb.new("confidō confidere confīsus sum").classification
28
+ end
29
+
30
+ def test_semideponent_exhaustively #:nodoc:
31
+ f = Linguistics::Latin::Verb::LatinVerb.new "gaudeō gaudēre gāvīsus"
32
+ assert_equal Linguistics::Latin::Verb::VerbTypes::Semideponent, f.classification
33
+
34
+ assert_equal "gaudeō", f.active_voice_indicative_mood_present_tense_first_person_singular_number
35
+ assert_equal "gaudēs", f.active_voice_indicative_mood_present_tense_second_person_singular_number
36
+ assert_equal "gaudet", f.active_voice_indicative_mood_present_tense_third_person_singular_number
37
+ assert_equal "gaudēmus", f.active_voice_indicative_mood_present_tense_first_person_plural_number
38
+ assert_equal "gaudētis", f.active_voice_indicative_mood_present_tense_second_person_plural_number
39
+ assert_equal "gaudent", f.active_voice_indicative_mood_present_tense_third_person_plural_number
40
+
41
+ assert_equal "gaudēbam", f.active_voice_indicative_mood_imperfect_tense_first_person_singular_number
42
+ assert_equal "gaudēbās", f.active_voice_indicative_mood_imperfect_tense_second_person_singular_number
43
+ assert_equal "gaudēbat", f.active_voice_indicative_mood_imperfect_tense_third_person_singular_number
44
+ assert_equal "gaudēbāmus", f.active_voice_indicative_mood_imperfect_tense_first_person_plural_number
45
+ assert_equal "gaudēbātis", f.active_voice_indicative_mood_imperfect_tense_second_person_plural_number
46
+ assert_equal "gaudēbant", f.active_voice_indicative_mood_imperfect_tense_third_person_plural_number
47
+
48
+ assert_equal "gaudēbō", f.active_voice_indicative_mood_future_tense_first_person_singular_number
49
+ assert_equal "gaudēbis", f.active_voice_indicative_mood_future_tense_second_person_singular_number
50
+ assert_equal "gaudēbit", f.active_voice_indicative_mood_future_tense_third_person_singular_number
51
+ assert_equal "gaudēbimus", f.active_voice_indicative_mood_future_tense_first_person_plural_number
52
+ assert_equal "gaudēbitis", f.active_voice_indicative_mood_future_tense_second_person_plural_number
53
+ assert_equal "gaudēbunt", f.active_voice_indicative_mood_future_tense_third_person_plural_number
54
+
55
+ assert_equal "gāvīsum sum", f.active_voice_indicative_mood_perfect_tense_first_person_singular_number
56
+ assert_equal "gāvīsum es", f.active_voice_indicative_mood_perfect_tense_second_person_singular_number
57
+ assert_equal "gāvīsum est", f.active_voice_indicative_mood_perfect_tense_third_person_singular_number
58
+ assert_equal "gāvīsum sumus", f.active_voice_indicative_mood_perfect_tense_first_person_plural_number
59
+ assert_equal "gāvīsum estis", f.active_voice_indicative_mood_perfect_tense_second_person_plural_number
60
+ assert_equal "gāvīsum sunt", f.active_voice_indicative_mood_perfect_tense_third_person_plural_number
61
+
62
+ assert_equal "gāvīsum eram", f.active_voice_indicative_mood_pastperfect_tense_first_person_singular_number
63
+ assert_equal "gāvīsum erās", f.active_voice_indicative_mood_pastperfect_tense_second_person_singular_number
64
+ assert_equal "gāvīsum erat", f.active_voice_indicative_mood_pastperfect_tense_third_person_singular_number
65
+ assert_equal "gāvīsum erāmus", f.active_voice_indicative_mood_pastperfect_tense_first_person_plural_number
66
+ assert_equal "gāvīsum erātis", f.active_voice_indicative_mood_pastperfect_tense_second_person_plural_number
67
+ assert_equal "gāvīsum erant", f.active_voice_indicative_mood_pastperfect_tense_third_person_plural_number
68
+
69
+ assert_equal "gāvīsum erō", f.active_voice_indicative_mood_futureperfect_tense_first_person_singular_number
70
+ assert_equal "gāvīsum eris", f.active_voice_indicative_mood_futureperfect_tense_second_person_singular_number
71
+ assert_equal "gāvīsum erit", f.active_voice_indicative_mood_futureperfect_tense_third_person_singular_number
72
+ assert_equal "gāvīsum erimus", f.active_voice_indicative_mood_futureperfect_tense_first_person_plural_number
73
+ assert_equal "gāvīsum eritis", f.active_voice_indicative_mood_futureperfect_tense_second_person_plural_number
74
+ assert_equal "gāvīsum erint", f.active_voice_indicative_mood_futureperfect_tense_third_person_plural_number
75
+
76
+ assert f.passive_voice_indicative_mood_perfect_tense.wordless?
77
+ assert f.passive_voice_indicative_mood_pastperfect_tense.wordless?
78
+ assert f.passive_voice_indicative_mood_futureperfect_tense.wordless?
79
+
80
+ assert_equal "gaudeam", f.active_voice_subjunctive_mood_present_tense_first_person_singular_number
81
+ assert_equal "gaudeās", f.active_voice_subjunctive_mood_present_tense_second_person_singular_number
82
+ assert_equal "gaudeat", f.active_voice_subjunctive_mood_present_tense_third_person_singular_number
83
+ assert_equal "gaudeāmus", f.active_voice_subjunctive_mood_present_tense_first_person_plural_number
84
+ assert_equal "gaudeātis", f.active_voice_subjunctive_mood_present_tense_second_person_plural_number
85
+ assert_equal "gaudeant", f.active_voice_subjunctive_mood_present_tense_third_person_plural_number
86
+
87
+ assert_equal "gaudērem", f.active_voice_subjunctive_mood_imperfect_tense_first_person_singular_number
88
+ assert_equal "gaudērēs", f.active_voice_subjunctive_mood_imperfect_tense_second_person_singular_number
89
+ assert_equal "gaudēret", f.active_voice_subjunctive_mood_imperfect_tense_third_person_singular_number
90
+ assert_equal "gaudērēmus", f.active_voice_subjunctive_mood_imperfect_tense_first_person_plural_number
91
+ assert_equal "gaudērētis", f.active_voice_subjunctive_mood_imperfect_tense_second_person_plural_number
92
+ assert_equal "gaudērent", f.active_voice_subjunctive_mood_imperfect_tense_third_person_plural_number
93
+
94
+ assert_equal "[ gāvīsus, gāvīsa, gāvīsum ] sim", f.active_voice_subjunctive_mood_perfect_tense_first_person_singular_number
95
+ assert_equal "[ gāvīsus, gāvīsa, gāvīsum ] sis", f.active_voice_subjunctive_mood_perfect_tense_second_person_singular_number
96
+ assert_equal "[ gāvīsus, gāvīsa, gāvīsum ] sit", f.active_voice_subjunctive_mood_perfect_tense_third_person_singular_number
97
+ assert_equal "[ gāvīsī, gāvīsae, gāvīsa ] simus", f.active_voice_subjunctive_mood_perfect_tense_first_person_plural_number
98
+ assert_equal "[ gāvīsī, gāvīsae, gāvīsa ] sitis", f.active_voice_subjunctive_mood_perfect_tense_second_person_plural_number
99
+ assert_equal "[ gāvīsī, gāvīsae, gāvīsa ] sint", f.active_voice_subjunctive_mood_perfect_tense_third_person_plural_number
100
+
101
+ assert_equal "[ gāvīsus, gāvīsa, gāvīsum ] essem", f.active_voice_subjunctive_mood_pastperfect_tense_first_person_singular_number
102
+ assert_equal "[ gāvīsus, gāvīsa, gāvīsum ] essēs", f.active_voice_subjunctive_mood_pastperfect_tense_second_person_singular_number
103
+ assert_equal "[ gāvīsus, gāvīsa, gāvīsum ] esset", f.active_voice_subjunctive_mood_pastperfect_tense_third_person_singular_number
104
+ assert_equal "[ gāvīsī, gāvīsae, gāvīsa ] essēmus", f.active_voice_subjunctive_mood_pastperfect_tense_first_person_plural_number
105
+ assert_equal "[ gāvīsī, gāvīsae, gāvīsa ] essētis", f.active_voice_subjunctive_mood_pastperfect_tense_second_person_plural_number
106
+ assert_equal "[ gāvīsī, gāvīsae, gāvīsa ] essent", f.active_voice_subjunctive_mood_pastperfect_tense_third_person_plural_number
107
+
108
+ assert f.passive_voice_subjunctive_mood_perfect_tense.wordless?
109
+ assert f.passive_voice_subjunctive_mood_pastperfect_tense.wordless?
110
+ end
111
+ end
@@ -0,0 +1,64 @@
1
+ # encoding: UTF-8
2
+
3
+ require "minitest/autorun"
4
+
5
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
6
+ require 'latinverb'
7
+ require 'linguistics/latin/verb/classification_types'
8
+
9
+ # Internal dependencies
10
+
11
+ class TestDeponent < MiniTest::Unit::TestCase # :nodoc:
12
+ def setup
13
+ @aDep = Linguistics::Latin::Verb::LatinVerb.new 'mīror mīrārī mīrātum'
14
+ end
15
+
16
+ def test_firstconj_depo
17
+ assert_equal(Linguistics::Latin::Verb::VerbTypes::Deponent, @aDep.classification)
18
+
19
+ assert_equal 'mīror', @aDep.active_voice_indicative_mood_present_tense_first_person_singular_number
20
+ assert_equal 'mīrāris', @aDep.active_voice_indicative_mood_present_tense_second_person_singular_number
21
+ assert_equal 'mīrātur', @aDep.active_voice_indicative_mood_present_tense_third_person_singular_number
22
+ assert_equal 'mīrāmur', @aDep.active_voice_indicative_mood_present_tense_first_person_plural_number
23
+ assert_equal 'mīrāminī', @aDep.active_voice_indicative_mood_present_tense_second_person_plural_number
24
+ assert_equal 'mīrantur', @aDep.active_voice_indicative_mood_present_tense_third_person_plural_number
25
+
26
+ assert_equal 'mīrābar', @aDep.active_voice_indicative_mood_imperfect_tense_first_person_singular_number
27
+ assert_equal 'mīrābor', @aDep.active_voice_indicative_mood_future_tense_first_person_singular_number
28
+ assert_equal 'mīrātum sum', @aDep.active_voice_indicative_mood_perfect_tense_first_person_singular_number
29
+ assert_equal 'mīrātum eram', @aDep.active_voice_indicative_mood_pastperfect_tense_first_person_singular_number
30
+ assert_equal 'mīrātum erō', @aDep.active_voice_indicative_mood_futureperfect_tense_first_person_singular_number
31
+
32
+ # Subjunctives
33
+ assert_equal 'mīrer', @aDep.active_voice_subjunctive_mood_present_tense_first_person_singular_number
34
+ assert_equal 'mīrārer', @aDep.active_voice_subjunctive_mood_imperfect_tense_first_person_singular_number
35
+ assert @aDep.active_voice_subjunctive_mood_perfect_tense_first_person_singular_number =~ /mīrātus.*sim/
36
+ assert @aDep.active_voice_subjunctive_mood_pastperfect_tense_first_person_singular_number =~ /mīrātus.*essem/
37
+
38
+ # Imperatives
39
+ assert_equal 'mīrāre', @aDep.active_voice_imperative_mood_present_tense_second_person_singular_number
40
+ assert_equal 'mīrāminī', @aDep.active_voice_imperative_mood_present_tense_second_person_plural_number
41
+ assert_equal 'mīrātor', @aDep.active_voice_imperative_mood_future_tense_second_person_singular_number
42
+
43
+ # Infinitives
44
+
45
+ assert_equal 'mīrārī', @aDep.present_active_infinitive
46
+ assert @aDep.perfect_active_infinitive =~ /mīrātus.*esse/
47
+ assert @aDep.future_active_infinitive =~ /mīrātūrus.*esse/
48
+
49
+ # Participles
50
+ assert_equal 'mīrāns, mīrantis', @aDep.present_active_participle
51
+ assert @aDep.future_active_participle =~ %r'mīrātūrus,'
52
+ assert @aDep.perfect_active_participle =~ %r'mīrātus'
53
+ assert @aDep.future_passive_participle =~ %r'mīrandus'
54
+
55
+ # Gerund
56
+ assert @aDep.gerund =~ %r'mīrandī', "Was not #{@aDep.gerund}"
57
+
58
+ # Supine
59
+ assert_equal 'mīrātum', @aDep.supine[:accusative]
60
+ assert_equal 'mīrātū', @aDep.supine[:ablative]
61
+ end
62
+
63
+
64
+ end
@@ -0,0 +1,64 @@
1
+ # encoding: UTF-8
2
+
3
+ require "minitest/autorun"
4
+
5
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
6
+ require 'latinverb'
7
+ require 'linguistics/latin/verb/classification_types'
8
+
9
+ # Internal dependencies
10
+
11
+ class TestDeponentFourthConjugation < MiniTest::Unit::TestCase # :nodoc:
12
+ def setup
13
+ @aDep = Linguistics::Latin::Verb::LatinVerb.new 'partior partīrī partītum'
14
+ end
15
+
16
+ def test_depo
17
+ assert_equal(Linguistics::Latin::Verb::VerbTypes::Deponent, @aDep.classification)
18
+
19
+ assert_equal 'partior', @aDep.active_voice_indicative_mood_present_tense_first_person_singular_number
20
+ assert_equal 'partīris', @aDep.active_voice_indicative_mood_present_tense_second_person_singular_number
21
+ assert_equal 'partītur', @aDep.active_voice_indicative_mood_present_tense_third_person_singular_number
22
+ assert_equal 'partīmur', @aDep.active_voice_indicative_mood_present_tense_first_person_plural_number
23
+ assert_equal 'partīminī', @aDep.active_voice_indicative_mood_present_tense_second_person_plural_number
24
+ assert_equal 'partiuntur', @aDep.active_voice_indicative_mood_present_tense_third_person_plural_number
25
+
26
+ assert_equal 'partiēbar', @aDep.active_voice_indicative_mood_imperfect_tense_first_person_singular_number
27
+ assert_equal 'partiar', @aDep.active_voice_indicative_mood_future_tense_first_person_singular_number
28
+ assert_equal 'partītum sum', @aDep.active_voice_indicative_mood_perfect_tense_first_person_singular_number
29
+ assert_equal 'partītum eram', @aDep.active_voice_indicative_mood_pastperfect_tense_first_person_singular_number
30
+ assert_equal 'partītum erō', @aDep.active_voice_indicative_mood_futureperfect_tense_first_person_singular_number
31
+
32
+ # Subjunctives
33
+ assert_equal 'partiar', @aDep.active_voice_subjunctive_mood_present_tense_first_person_singular_number
34
+ assert_equal 'partīrer', @aDep.active_voice_subjunctive_mood_imperfect_tense_first_person_singular_number
35
+ assert @aDep.active_voice_subjunctive_mood_perfect_tense_first_person_singular_number =~ /partītus.*sim/
36
+ assert @aDep.active_voice_subjunctive_mood_pastperfect_tense_first_person_singular_number =~ /partītus.*essem/
37
+
38
+ # Imperatives
39
+ assert_equal 'partīre', @aDep.active_voice_imperative_mood_present_tense_second_person_singular_number
40
+ assert_equal 'partīminī', @aDep.active_voice_imperative_mood_present_tense_second_person_plural_number
41
+ assert_equal 'partītor', @aDep.active_voice_imperative_mood_future_tense_second_person_singular_number
42
+
43
+ # Infinitives
44
+
45
+ assert_equal 'partīrī', @aDep.present_active_infinitive
46
+ assert @aDep.perfect_active_infinitive =~ /partītus.*esse/
47
+ assert @aDep.future_active_infinitive =~ /partītūrus.*esse/
48
+
49
+ # Participles
50
+ assert_equal 'partiēns, partientis', @aDep.present_active_participle
51
+ assert @aDep.future_active_participle =~ %r'partītūrus', "future_active_participle failed with: #{@aDep.future_active_participle}."
52
+ assert @aDep.perfect_active_participle =~ %r'partītus'
53
+ assert @aDep.future_passive_participle =~ %r'partiendus'
54
+
55
+ # Gerund
56
+ assert @aDep.gerund =~ %r'partiendī', "Was not #{@aDep.gerund}"
57
+
58
+ # Supine
59
+ assert_equal 'partītum', @aDep.supine[:accusative]
60
+ assert_equal 'partītū', @aDep.supine[:ablative]
61
+ end
62
+
63
+
64
+ end
@@ -0,0 +1,64 @@
1
+ # encoding: UTF-8
2
+
3
+ require "minitest/autorun"
4
+
5
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
6
+ require 'latinverb'
7
+ require 'linguistics/latin/verb/classification_types'
8
+
9
+ # Internal dependencies
10
+
11
+ class TestDeponentSecondConjugation < MiniTest::Unit::TestCase # :nodoc:
12
+ def setup
13
+ @aDep = Linguistics::Latin::Verb::LatinVerb.new 'vereor verērī veritum'
14
+ end
15
+
16
+ def test_depo
17
+ assert_equal(Linguistics::Latin::Verb::VerbTypes::Deponent, @aDep.classification)
18
+
19
+ assert_equal 'vereor', @aDep.active_voice_indicative_mood_present_tense_first_person_singular_number
20
+ assert_equal 'verēris', @aDep.active_voice_indicative_mood_present_tense_second_person_singular_number
21
+ assert_equal 'verētur', @aDep.active_voice_indicative_mood_present_tense_third_person_singular_number
22
+ assert_equal 'verēmur', @aDep.active_voice_indicative_mood_present_tense_first_person_plural_number
23
+ assert_equal 'verēminī', @aDep.active_voice_indicative_mood_present_tense_second_person_plural_number
24
+ assert_equal 'verentur', @aDep.active_voice_indicative_mood_present_tense_third_person_plural_number
25
+
26
+ assert_equal 'verēbar', @aDep.active_voice_indicative_mood_imperfect_tense_first_person_singular_number
27
+ assert_equal 'verēbor', @aDep.active_voice_indicative_mood_future_tense_first_person_singular_number
28
+ assert_equal 'veritum sum', @aDep.active_voice_indicative_mood_perfect_tense_first_person_singular_number
29
+ assert_equal 'veritum eram', @aDep.active_voice_indicative_mood_pastperfect_tense_first_person_singular_number
30
+ assert_equal 'veritum erō', @aDep.active_voice_indicative_mood_futureperfect_tense_first_person_singular_number
31
+
32
+ # Subjunctives
33
+ assert_equal 'verear', @aDep.active_voice_subjunctive_mood_present_tense_first_person_singular_number
34
+ assert_equal 'verērer', @aDep.active_voice_subjunctive_mood_imperfect_tense_first_person_singular_number
35
+ assert @aDep.active_voice_subjunctive_mood_perfect_tense_first_person_singular_number =~ /veritus.*sim/
36
+ assert @aDep.active_voice_subjunctive_mood_pastperfect_tense_first_person_singular_number =~ /veritus.*essem/
37
+
38
+ # Imperatives
39
+ assert_equal 'verēre', @aDep.active_voice_imperative_mood_present_tense_second_person_singular_number
40
+ assert_equal 'verēminī', @aDep.active_voice_imperative_mood_present_tense_second_person_plural_number
41
+ assert_equal 'verētor', @aDep.active_voice_imperative_mood_future_tense_second_person_singular_number
42
+
43
+ # Infinitives
44
+
45
+ assert_equal 'verērī', @aDep.present_active_infinitive
46
+ assert @aDep.perfect_active_infinitive =~ /veritus.*esse/
47
+ assert @aDep.future_active_infinitive =~ /veritūrus.*esse/
48
+
49
+ # Participles
50
+ assert_equal 'verēns, verentis', @aDep.present_active_participle
51
+ assert @aDep.future_active_participle =~ %r'veritūrus,'
52
+ assert @aDep.perfect_active_participle =~ %r'veritus'
53
+ assert @aDep.future_passive_participle =~ %r'verendus'
54
+
55
+ # Gerund
56
+ assert @aDep.gerund =~ %r'verendī', "Was not #{@aDep.gerund}"
57
+
58
+ # Supine
59
+ assert_equal 'veritum', @aDep.supine[:accusative]
60
+ assert_equal 'veritū', @aDep.supine[:ablative]
61
+ end
62
+
63
+
64
+ end
@@ -0,0 +1,64 @@
1
+ # encoding: UTF-8
2
+
3
+ require "minitest/autorun"
4
+
5
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
6
+ require 'latinverb'
7
+ require 'linguistics/latin/verb/classification_types'
8
+
9
+ # Internal dependencies
10
+
11
+ class TestDeponentThirdConjugation < MiniTest::Unit::TestCase # :nodoc:
12
+ def setup
13
+ @aDep = Linguistics::Latin::Verb::LatinVerb.new 'sequor sequī secūtum'
14
+ end
15
+
16
+ def test_depo
17
+ assert_equal(Linguistics::Latin::Verb::VerbTypes::Deponent, @aDep.classification)
18
+
19
+ assert_equal 'sequor', @aDep.active_voice_indicative_mood_present_tense_first_person_singular_number
20
+ assert_equal 'sequeris', @aDep.active_voice_indicative_mood_present_tense_second_person_singular_number
21
+ assert_equal 'sequitur', @aDep.active_voice_indicative_mood_present_tense_third_person_singular_number
22
+ assert_equal 'sequimur', @aDep.active_voice_indicative_mood_present_tense_first_person_plural_number
23
+ assert_equal 'sequiminī', @aDep.active_voice_indicative_mood_present_tense_second_person_plural_number
24
+ assert_equal 'sequuntur', @aDep.active_voice_indicative_mood_present_tense_third_person_plural_number
25
+
26
+ assert_equal 'sequēbar', @aDep.active_voice_indicative_mood_imperfect_tense_first_person_singular_number
27
+ assert_equal 'sequar', @aDep.active_voice_indicative_mood_future_tense_first_person_singular_number
28
+ assert_equal 'secūtum sum', @aDep.active_voice_indicative_mood_perfect_tense_first_person_singular_number
29
+ assert_equal 'secūtum eram', @aDep.active_voice_indicative_mood_pastperfect_tense_first_person_singular_number
30
+ assert_equal 'secūtum erō', @aDep.active_voice_indicative_mood_futureperfect_tense_first_person_singular_number
31
+
32
+ # Subjunctives
33
+ assert_equal 'sequar', @aDep.active_voice_subjunctive_mood_present_tense_first_person_singular_number
34
+ assert_equal 'sequerer', @aDep.active_voice_subjunctive_mood_imperfect_tense_first_person_singular_number
35
+ assert @aDep.active_voice_subjunctive_mood_perfect_tense_first_person_singular_number =~ /secūtus.*sim/
36
+ assert @aDep.active_voice_subjunctive_mood_pastperfect_tense_first_person_singular_number =~ /secūtus.*essem/
37
+
38
+ # Imperatives
39
+ assert_equal 'sequere', @aDep.active_voice_imperative_mood_present_tense_second_person_singular_number
40
+ assert_equal 'sequiminī', @aDep.active_voice_imperative_mood_present_tense_second_person_plural_number
41
+ assert_equal 'sequitor', @aDep.active_voice_imperative_mood_future_tense_second_person_singular_number
42
+
43
+ # Infinitives
44
+
45
+ assert_equal 'sequī', @aDep.present_active_infinitive
46
+ assert @aDep.perfect_active_infinitive =~ /secūtus.*esse/
47
+ assert @aDep.future_active_infinitive =~ /secūtūrus.*esse/
48
+
49
+ # Participles
50
+ assert_equal 'sequens, sequentis', @aDep.present_active_participle
51
+ assert @aDep.future_active_participle =~ %r'secūtūrus,'
52
+ assert @aDep.perfect_active_participle =~ %r'secūtus'
53
+ assert @aDep.future_passive_participle =~ %r'sequendus'
54
+
55
+ # Gerund
56
+ assert @aDep.gerund =~ %r'sequendī', "Was not #{@aDep.gerund}"
57
+
58
+ # Supine
59
+ assert_equal 'secūtum', @aDep.supine[:accusative]
60
+ assert_equal 'secūtū', @aDep.supine[:ablative]
61
+ end
62
+
63
+
64
+ end
@@ -0,0 +1,64 @@
1
+ # encoding: UTF-8
2
+
3
+ require "minitest/autorun"
4
+
5
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
6
+ require 'latinverb'
7
+ require 'linguistics/latin/verb/classification_types'
8
+
9
+ # Internal dependencies
10
+
11
+ class TestDeponentThirdConjugation < MiniTest::Unit::TestCase # :nodoc:
12
+ def setup
13
+ @aDep = Linguistics::Latin::Verb::LatinVerb.new 'patior patī passum'
14
+ end
15
+
16
+ def test_depo
17
+ assert_equal(Linguistics::Latin::Verb::VerbTypes::Deponent, @aDep.classification)
18
+
19
+ assert_equal 'patior', @aDep.active_voice_indicative_mood_present_tense_first_person_singular_number
20
+ assert_equal 'pateris', @aDep.active_voice_indicative_mood_present_tense_second_person_singular_number
21
+ assert_equal 'patitur', @aDep.active_voice_indicative_mood_present_tense_third_person_singular_number
22
+ assert_equal 'patimur', @aDep.active_voice_indicative_mood_present_tense_first_person_plural_number
23
+ assert_equal 'patiminī', @aDep.active_voice_indicative_mood_present_tense_second_person_plural_number
24
+ assert_equal 'patiuntur', @aDep.active_voice_indicative_mood_present_tense_third_person_plural_number
25
+
26
+ assert_equal 'patiēbar', @aDep.active_voice_indicative_mood_imperfect_tense_first_person_singular_number
27
+ assert_equal 'patiar', @aDep.active_voice_indicative_mood_future_tense_first_person_singular_number
28
+ assert_equal 'passum sum', @aDep.active_voice_indicative_mood_perfect_tense_first_person_singular_number
29
+ assert_equal 'passum eram', @aDep.active_voice_indicative_mood_pastperfect_tense_first_person_singular_number
30
+ assert_equal 'passum erō', @aDep.active_voice_indicative_mood_futureperfect_tense_first_person_singular_number
31
+
32
+ # Subjunctives
33
+ assert_equal 'patiar', @aDep.active_voice_subjunctive_mood_present_tense_first_person_singular_number
34
+ assert_equal 'paterer', @aDep.active_voice_subjunctive_mood_imperfect_tense_first_person_singular_number
35
+ assert @aDep.active_voice_subjunctive_mood_perfect_tense_first_person_singular_number =~ /passus.*sim/
36
+ assert @aDep.active_voice_subjunctive_mood_pastperfect_tense_first_person_singular_number =~ /passus.*essem/
37
+
38
+ # Imperatives
39
+ assert_equal 'patere', @aDep.active_voice_imperative_mood_present_tense_second_person_singular_number
40
+ assert_equal 'patiminī', @aDep.active_voice_imperative_mood_present_tense_second_person_plural_number
41
+ assert_equal 'patitor', @aDep.active_voice_imperative_mood_future_tense_second_person_singular_number
42
+
43
+ # Infinitives
44
+
45
+ assert_equal 'patī', @aDep.present_active_infinitive
46
+ assert @aDep.perfect_active_infinitive =~ /passus.*esse/
47
+ assert @aDep.future_active_infinitive =~ /passūrus.*esse/
48
+
49
+ # Participles
50
+ assert_equal 'patiēns, patientis', @aDep.present_active_participle
51
+ assert @aDep.future_active_participle =~ %r'passūrus,'
52
+ assert @aDep.perfect_active_participle =~ %r'passus'
53
+ assert @aDep.future_passive_participle =~ %r'patiendus'
54
+
55
+ # Gerund
56
+ assert @aDep.gerund =~ %r'patiendī', "Was not #{@aDep.gerund}"
57
+
58
+ # Supine
59
+ assert_equal 'passum', @aDep.supine[:accusative]
60
+ assert_equal 'passū', @aDep.supine[:ablative]
61
+ end
62
+
63
+
64
+ end
@@ -0,0 +1,38 @@
1
+ # encoding: UTF-8
2
+
3
+ require "minitest/autorun"
4
+ require 'pp'
5
+
6
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
7
+ require 'latinverb'
8
+ require 'linguistics/latin/verb/latinverb/auxiliary_classes'
9
+
10
+
11
+ class TestDeserializeInfinitives < MiniTest::Unit::TestCase # :nodoc:
12
+ def test_deser_basic
13
+ json_string=<<EOJSON
14
+ {
15
+ "infinitives":{
16
+ "json_class": "Linguistics::Latin::Verb::InfinitiveBlock",
17
+ "data": {
18
+ "present_active_infinitive": "amāre",
19
+ "present_passive_infinitive": "amārī",
20
+
21
+ "perfect_active_infinitive": "amāvīsse",
22
+ "perfect_passive_infinitive": "amatum",
23
+
24
+ "future_active_infinitive ": "amatūrus esse",
25
+ "future_passive_infinitive": "amatum īri"
26
+ }
27
+ }
28
+ }
29
+ EOJSON
30
+
31
+ ds = JSON.parse json_string
32
+ ib = ds['infinitives']
33
+ assert_equal 6, ib.infinitive_methods.length
34
+ assert_equal 'amatum', ib.perfect_passive_infinitive
35
+ assert_equal 'amāre', ib.present_active_infinitive
36
+ end
37
+
38
+ end