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,93 @@
1
+ #encoding: UTF-8
2
+
3
+ require 'minitest/autorun'
4
+ require 'json'
5
+
6
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
7
+ require 'latinverb'
8
+ require 'linguistics/latin/verb/classification_types'
9
+
10
+ # Internal dependencies
11
+
12
+ class TestFreakishVerbs < MiniTest::Unit::TestCase # :nodoc:
13
+ def test_present_only
14
+ v = Linguistics::Latin::Verb::LatinVerb.new 'maerō maēre maīvī maestum'
15
+ assert v.present_only
16
+ assert_equal 6, v.active_voice_indicative_mood_perfect_tense.length
17
+ assert_equal '', v.active_voice_indicative_mood_perfect_tense_first_person_singular_number
18
+ end
19
+ def test_present_only_from_sing
20
+ v = Linguistics::Latin::Verb::LatinVerb.new 'aiō'
21
+ assert v.present_only
22
+
23
+ # Primary use of this verb
24
+ assert_equal 'ait', v.active_voice_indicative_mood_present_tense_third_person_singular_number
25
+
26
+ end
27
+
28
+ def test_very_odd_verbs
29
+ choices = %w( quaesō ovāre )
30
+
31
+ choices.each do |v|
32
+ vi = Linguistics::Latin::Verb::LatinVerb.new v
33
+ assert vi.present_only
34
+ end
35
+ end
36
+
37
+ def test_impersonal
38
+ v = Linguistics::Latin::Verb::LatinVerb.new 'pluit'
39
+ assert_equal Linguistics::Latin::Verb::VerbTypes::Impersonal, v.classification
40
+ assert_equal 'pluit', v.active_voice_indicative_mood_present_tense_third_person_singular_number
41
+ end
42
+
43
+ =begin rdoc
44
+ * 191 - Irregular deponent verbs
45
+
46
+ This section in A&G says that the following are irregular deponents,
47
+ nevertheless a preliminary test on fruor did not show that. I'm storing
48
+ these here for reference, but do not believe this is a real issue to be
49
+ addressed.
50
+
51
+ adsentior, -īrī, adsēnsus, assent
52
+ oblīvīscor, -ī, oblītus, forget.
53
+ apīscor, (-ip-), -ī, aptus (-eptus), get
54
+ opperior, -īrī, oppertus, await.
55
+ dēfetīscor, -ī, -fessus, faint
56
+ órdior, -īrī, órsus, begin.
57
+ expergīscor, -ī, -perrēctus, rouse
58
+ orior, -īrī, ortus (oritūrus), rise (3d
59
+ experior, -īrī, expertus, try
60
+ conjugation in most forms).
61
+ fateor, -ērī, fassus, confess
62
+ pacīscor, -ī, pactus, bargain.
63
+ fruor, -ī, frūctus (fruitus), enjoy
64
+ patior (-petior), -ī, passus (-pessus),
65
+ fungor, -ī, fūnctus, fulfil
66
+ gradior (-gredior), -ī, gressus, step
67
+ -plector, -ī, -plexus, clasp.
68
+ īrāscor, -ī, īrātus, be angry
69
+ proficīscor, -ī, profectus, set out.
70
+ lābor, -ī, lāpsus, fall
71
+ queror, -ī, questus, complain.
72
+ loquor, -ī, locūtus, speak
73
+ reor, rērī, ratus, think.
74
+ mētior, -īrī, mēnsus, measure
75
+ revertor, -ī, reversus, return.
76
+ -minīscor, -ī, -mentus, think
77
+ ringor, -ī, rictus, snarl.
78
+ morior, -ī, (-īrī), mortuus (moritūrus), die
79
+ sequor, -ī, secūtus, follow.
80
+ nancīscor, -ī, nactus (nānctus), find
81
+ tueor, -ērī, tuitus (tūtus), defend.
82
+ nāscor, -ī, nātus, be born
83
+ ulcīscor, -ī, ultus, avenge.
84
+ nītor, -ī, nīsus (nīxus), strive
85
+ ūtor, -ī, ūsus, use, employ.
86
+ =end
87
+
88
+ def test_irregular_deponents
89
+ v = Linguistics::Latin::Verb::LatinVerb.new 'fruor fruī frūctus '
90
+ assert 'fruitur', v.active_voice_indicative_mood_present_tense_third_person_singular_number
91
+
92
+ end
93
+ end
@@ -0,0 +1,27 @@
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 TestImperfectBlock < MiniTest::Unit::TestCase # :nodoc:
11
+ def setup
12
+ @aFirst = Linguistics::Latin::Verb::LatinVerb.new 'amō amāre amāvī amatum'
13
+ end
14
+
15
+ def test_basic
16
+ require 'pp'
17
+ assert @aFirst.active_voice_indicative_mood_present_tense_second_person_plural_number
18
+ assert "amāte", @aFirst.active_voice_imperative_mood_present_tense_second_person_plural_number
19
+ assert "amā", @aFirst.active_voice_imperative_mood_present_tense_second_person_singular_number
20
+
21
+ assert "amāte", @aFirst.active_voice_imperative_mood_future_tense_second_person_plural_number
22
+ assert "amā", @aFirst.active_voice_imperative_mood_future_tense_second_person_singular_number
23
+
24
+ assert "amāte", @aFirst.active_voice_imperative_mood_future_tense_third_person_plural_number
25
+ assert "amā", @aFirst.active_voice_imperative_mood_future_tense_third_person_singular_number
26
+ end
27
+ end
@@ -0,0 +1,22 @@
1
+ #encoding: UTF-8
2
+
3
+ require 'minitest/autorun'
4
+ require 'json'
5
+
6
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
7
+ require 'latinverb'
8
+ require 'linguistics/latin/verb/classification_types'
9
+
10
+ # Internal dependencies
11
+
12
+ class TestIrregularSum < MiniTest::Unit::TestCase # :nodoc:
13
+ def setup
14
+ @toBe = Linguistics::Latin::Verb::LatinVerb.new 'sum esse fuī futūrus'
15
+ end
16
+ def test_essential_irregular_qualities
17
+ assert_equal(true, @toBe.irregular?)
18
+ assert @toBe.active_voice_indicative_mood_present_tense_first_person_singular_number
19
+ assert_equal('sum', @toBe.active_voice_indicative_mood_present_tense_first_person_singular_number)
20
+ assert_equal('sim', @toBe.active_voice_subjunctive_mood_present_tense_first_person_singular_number)
21
+ end
22
+ end