latinverb 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +1 -0
  3. data/Gemfile.lock +28 -6
  4. data/README.markdown +1 -1
  5. data/Rakefile +1 -0
  6. data/latinverb.gemspec +5 -3
  7. data/lib/latinverb/components/chart_presenter.rb +81 -0
  8. data/lib/latinverb/components/classifier/strategies/defective_verb_classification_strategy.rb +19 -0
  9. data/lib/latinverb/components/classifier/strategies/deponent_verb_classification_strategy.rb +19 -0
  10. data/lib/latinverb/components/classifier/strategies/impersonal_verb_classification_strategy.rb +19 -0
  11. data/lib/latinverb/components/classifier/strategies/irregular_verb_classification_strategy.rb +19 -0
  12. data/lib/latinverb/components/classifier/strategies/present_only_verb_classification_strategy.rb +21 -0
  13. data/lib/latinverb/components/classifier/strategies/regular_verb_classification_strategy.rb +19 -0
  14. data/lib/latinverb/components/classifier/strategies/semideponent_verb_classification_strategy.rb +19 -0
  15. data/lib/latinverb/components/classifier/strategies/verb_classification_strategy.rb +31 -0
  16. data/lib/latinverb/components/classifier/strategies/very_irregular_verb_classification_strategy.rb +20 -0
  17. data/lib/latinverb/components/classifier.rb +76 -0
  18. data/lib/latinverb/components/imperatives_handler.rb +40 -0
  19. data/lib/latinverb/components/infinitivizer.rb +50 -0
  20. data/lib/latinverb/components/participler.rb +58 -0
  21. data/lib/latinverb/components/passive_infinitive_factory.rb +42 -0
  22. data/lib/latinverb/components/present_only_checker.rb +32 -0
  23. data/lib/latinverb/components/principal_parts_extractor.rb +35 -0
  24. data/lib/latinverb/components/stem_deriver.rb +81 -0
  25. data/lib/latinverb/components/type_evaluator.rb +35 -0
  26. data/lib/latinverb/components/validator.rb +33 -0
  27. data/lib/latinverb/components.rb +9 -0
  28. data/lib/latinverb/dynamic_method_resolver.rb +41 -0
  29. data/lib/latinverb/errors.rb +10 -0
  30. data/lib/latinverb/imperative_block/imperative_rule_factory.rb +35 -0
  31. data/lib/latinverb/imperative_block.rb +71 -0
  32. data/lib/latinverb/paradigmatic_verbs.rb +21 -0
  33. data/lib/latinverb/serialization/hash.rb +17 -0
  34. data/lib/latinverb/serialization/json.rb +41 -0
  35. data/lib/latinverb/serialization/yaml.rb +15 -0
  36. data/lib/latinverb/serialization.rb +3 -0
  37. data/lib/latinverb/tense_block/null_tense_block.rb +12 -0
  38. data/lib/latinverb/tense_block/vector_resolution_delegate.rb +89 -0
  39. data/lib/latinverb/tense_block.rb +52 -0
  40. data/lib/latinverb/tense_method_applicator/defective_checker.rb +21 -0
  41. data/lib/{linguistics/latin/verb/latinverb/classmethods.rb → latinverb/tense_method_applicator/deponent_string_deriver.rb} +15 -69
  42. data/lib/latinverb/tense_method_applicator/first_builder.rb +98 -0
  43. data/lib/latinverb/tense_method_applicator/fourth.rb +100 -0
  44. data/lib/latinverb/tense_method_applicator/fourth_builder.rb +100 -0
  45. data/lib/latinverb/tense_method_applicator/irregular_builder.rb +117 -0
  46. data/lib/latinverb/tense_method_applicator/mutator_for_classification_factory.rb +38 -0
  47. data/lib/latinverb/tense_method_applicator/mutator_for_verb_type.rb +38 -0
  48. data/lib/latinverb/tense_method_applicator/mutators/deponent/imperative_mutator.rb +49 -0
  49. data/lib/latinverb/tense_method_applicator/mutators/deponent/infinitive_mutator.rb +42 -0
  50. data/lib/latinverb/tense_method_applicator/mutators/deponent/participle_mutator.rb +47 -0
  51. data/lib/latinverb/tense_method_applicator/mutators/deponent/tense_block_mutator.rb +55 -0
  52. data/lib/latinverb/tense_method_applicator/mutators/deponent.rb +41 -0
  53. data/lib/latinverb/tense_method_applicator/mutators/impersonal.rb +27 -0
  54. data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_imperative_mood_future_tense_strategy.rb +29 -0
  55. data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_imperative_mood_present_tense_strategy.rb +29 -0
  56. data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_future_tense_strategy.rb +35 -0
  57. data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_futureperfect_tense_strategy.rb +28 -0
  58. data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_imperfect_tense_strategy.rb +24 -0
  59. data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_pastperfect_tense_strategy.rb +28 -0
  60. data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_perfect_tense_strategy.rb +29 -0
  61. data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_present_tense_strategy.rb +24 -0
  62. data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_subjunctive_mood_imperfect_tense_strategy.rb +29 -0
  63. data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_subjunctive_mood_pastperfect_tense_strategy.rb +30 -0
  64. data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_subjunctive_mood_perfect_tense_strategy.rb +30 -0
  65. data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_subjunctive_mood_present_tense_strategy.rb +24 -0
  66. data/lib/latinverb/tense_method_applicator/mutators/invariant/imperatives.rb +53 -0
  67. data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_future_tense_strategy.rb +24 -0
  68. data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_futureperfect_tense_strategy.rb +27 -0
  69. data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_imperfect_tense_strategy.rb +24 -0
  70. data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_pastperfect_tense_strategy.rb +27 -0
  71. data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_perfect_tense_strategy.rb +27 -0
  72. data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_present_tense_strategy.rb +24 -0
  73. data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_subjunctive_mood_imperfect_tense_strategy.rb +30 -0
  74. data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_subjunctive_mood_pastperfect_tense_strategy.rb +33 -0
  75. data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_subjunctive_mood_perfect_tense_strategy.rb +33 -0
  76. data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_subjunctive_mood_present_tense_strategy.rb +24 -0
  77. data/lib/latinverb/tense_method_applicator/mutators/invariant/triplicate_and_pluralize_formatters.rb +26 -0
  78. data/lib/latinverb/tense_method_applicator/mutators/invariant.rb +65 -0
  79. data/lib/latinverb/tense_method_applicator/mutators/irregular/infinitives_builder.rb +35 -0
  80. data/lib/latinverb/tense_method_applicator/mutators/irregular/json_deserializer.rb +52 -0
  81. data/lib/latinverb/tense_method_applicator/mutators/irregular/json_revivifier.rb +48 -0
  82. data/lib/latinverb/tense_method_applicator/mutators/irregular/participles_builder.rb +35 -0
  83. data/lib/latinverb/tense_method_applicator/mutators/irregular/present_only_irregular_mask.rb +37 -0
  84. data/lib/latinverb/tense_method_applicator/mutators/irregular.rb +25 -0
  85. data/lib/latinverb/tense_method_applicator/mutators/present_only.rb +18 -0
  86. data/lib/latinverb/tense_method_applicator/mutators/regular.rb +17 -0
  87. data/lib/latinverb/tense_method_applicator/mutators/semideponent.rb +88 -0
  88. data/lib/latinverb/tense_method_applicator/perfect_tense_remover.rb +26 -0
  89. data/lib/latinverb/tense_method_applicator/second_builder.rb +105 -0
  90. data/lib/latinverb/tense_method_applicator/tense_methods_vectorizer.rb +73 -0
  91. data/lib/latinverb/tense_method_applicator/third_builder.rb +93 -0
  92. data/lib/latinverb/tense_method_applicator/thirdio_builder.rb +100 -0
  93. data/lib/latinverb/tense_method_applicator.rb +55 -0
  94. data/lib/latinverb/version.rb +2 -3
  95. data/lib/latinverb.rb +63 -419
  96. data/test/{testDeponentFirstConjugation.rb → integration/deponent_first_conjugation_test.rb} +1 -1
  97. data/test/{testDeponentFourthConjugation.rb → integration/deponent_fourth_conjugation_test.rb} +1 -1
  98. data/test/{testDeponentSecondConjugation.rb → integration/deponent_second_conjugation_test.rb} +1 -1
  99. data/test/{testDeponentThirdConjugation.rb → integration/deponent_third_conjugation_test.rb} +2 -2
  100. data/test/{testDeponentThirdIOConjugation.rb → integration/deponent_third_io_conjugation_test.rb} +1 -1
  101. data/test/{testFirstConjugation.rb → integration/first_conjugation_test.rb} +3 -7
  102. data/test/{testFreakishVerbs.rb → integration/freakish_vs.rb_test.rb} +4 -4
  103. data/test/{testIrregularSum.rb → integration/irregular_sum_test.rb} +1 -1
  104. data/test/{testIrregulars.rb → integration/irregulars_test.rb} +1 -1
  105. data/test/{testLatinVerb.rb → integration/latin_verb_test.rb} +5 -25
  106. data/test/{testThirdConjugation.rb → integration/third_conjugation_test.rb} +19 -21
  107. data/test/unit/latinverb_accessible_reader_test.rb +18 -0
  108. data/test/unit/principal_parts_extractor_test.rb +33 -0
  109. metadata +151 -79
  110. data/lib/latinverb/chart.rb +0 -94
  111. data/lib/linguistics/latin/verb/classification_types.rb +0 -61
  112. data/lib/linguistics/latin/verb/constants.rb +0 -201
  113. data/lib/linguistics/latin/verb/deponent_tense_methods.rb +0 -85
  114. data/lib/linguistics/latin/verb/imperative_block.rb +0 -118
  115. data/lib/linguistics/latin/verb/infinitive_block.rb +0 -39
  116. data/lib/linguistics/latin/verb/infinitives.rb +0 -212
  117. data/lib/linguistics/latin/verb/irregulars.rb +0 -4393
  118. data/lib/linguistics/latin/verb/latinverb/data.rb +0 -87
  119. data/lib/linguistics/latin/verb/latinverb/defective_checker.rb +0 -17
  120. data/lib/linguistics/latin/verb/latinverb/deponent.rb +0 -159
  121. data/lib/linguistics/latin/verb/latinverb/display.rb +0 -22
  122. data/lib/linguistics/latin/verb/latinverb/impersonal.rb +0 -34
  123. data/lib/linguistics/latin/verb/latinverb/irregular.rb +0 -83
  124. data/lib/linguistics/latin/verb/latinverb/latin_verb_type_evaluator.rb +0 -32
  125. data/lib/linguistics/latin/verb/latinverb/latinverb_classifier.rb +0 -100
  126. data/lib/linguistics/latin/verb/latinverb/latinverb_input_sanitizer.rb +0 -32
  127. data/lib/linguistics/latin/verb/latinverb/latinverb_pp_extractor.rb +0 -106
  128. data/lib/linguistics/latin/verb/latinverb/metaprogramming.rb +0 -80
  129. data/lib/linguistics/latin/verb/latinverb/semideponent.rb +0 -28
  130. data/lib/linguistics/latin/verb/latinverb/validation.rb +0 -42
  131. data/lib/linguistics/latin/verb/latinverb/verbvector_description.rb +0 -50
  132. data/lib/linguistics/latin/verb/participle_block.rb +0 -36
  133. data/lib/linguistics/latin/verb/participles.rb +0 -202
  134. data/lib/linguistics/latin/verb/phonographia.rb +0 -109
  135. data/lib/linguistics/latin/verb/supine.rb +0 -42
  136. data/lib/linguistics/latin/verb/tense_block.rb +0 -227
  137. data/lib/linguistics/latin/verb/tense_definitions/first.rb +0 -92
  138. data/lib/linguistics/latin/verb/tense_definitions/fourth.rb +0 -92
  139. data/lib/linguistics/latin/verb/tense_definitions/impersonal.rb +0 -25
  140. data/lib/linguistics/latin/verb/tense_definitions/invariant.rb +0 -613
  141. data/lib/linguistics/latin/verb/tense_definitions/irregular.rb +0 -82
  142. data/lib/linguistics/latin/verb/tense_definitions/second.rb +0 -97
  143. data/lib/linguistics/latin/verb/tense_definitions/third.rb +0 -86
  144. data/lib/linguistics/latin/verb/tense_definitions/third_io.rb +0 -91
  145. data/test/testDeserializeInfinitives.rb +0 -36
  146. /data/test/{testAmbiguousLookups.rb → integration/ambiguous_lookups_test.rb} +0 -0
  147. /data/test/{testClusterResolution.rb → integration/cluster_resolution_test.rb} +0 -0
  148. /data/test/{testDataStructures.rb → integration/data_structures_test.rb} +0 -0
  149. /data/test/{testDefectSemiImp.rb → integration/defect_semi_imp_test.rb} +0 -0
  150. /data/test/{testFourthConjugation.rb → integration/fourth_conjugation_test.rb} +0 -0
  151. /data/test/{testImperativeBlock.rb → integration/imperative_block_test.rb} +0 -0
  152. /data/test/{testMacronRules.rb → integration/macron_rules_test.rb} +0 -0
  153. /data/test/{testSecondConjugation.rb → integration/second_conjugation_test.rb} +0 -0
  154. /data/test/{testThirdIOConjugation.rb → integration/third_io_conjugation_test.rb} +0 -0
@@ -1,13 +1,7 @@
1
1
  # encoding: UTF-8
2
2
  require 'macronconversions'
3
-
4
- # ...by others
5
3
  require "minitest/autorun"
6
4
 
7
- # Internal dependencies
8
- #require 'linguistics/latin/verb/latinverb/classmethods'
9
- #require 'linguistics/latin/verb/classification_types'
10
-
11
5
  $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
12
6
  require 'latinverb'
13
7
 
@@ -84,12 +78,7 @@ class TestLatinVerb < MiniTest::Unit::TestCase # :nodoc:
84
78
  def test_metaprogramming
85
79
  tc = Linguistics::Latin::Verb::LatinVerb.new 'amō amāre amāvī amatum'
86
80
 
87
- # Test the real method that comes by part of the extension
88
- assert_respond_to(tc, :latin_active_voice_indicative_mood_imperfect_tense_third_person_singular_number)
89
-
90
- # Test the facade method
91
81
  assert_respond_to tc, :active_voice_indicative_mood_imperfect_tense_third_person_singular_number
92
- assert_respond_to tc, :respondable_methods
93
82
 
94
83
  # Make sure that stuff that /shouldn't/ be respected is not respected
95
84
  assert not( tc.respond_to? :zabumiwhorter), "Should not respond to :zabumiwhorter"
@@ -98,17 +87,16 @@ class TestLatinVerb < MiniTest::Unit::TestCase # :nodoc:
98
87
  end
99
88
  end
100
89
 
101
- def test_verbvector
90
+ def test_vectors
102
91
  tc = Linguistics::Latin::Verb::LatinVerb.new 'amō amāre amāvī amatum'
92
+ tense_list = tc.methods.grep(/tense\z/)
103
93
  assert tc
104
- assert tc.tense_list
105
- assert tc.tense_list.length
106
- assert_equal 22, tc.tense_list.length
94
+ assert_equal 22, tense_list.length
95
+
107
96
  assert_respond_to(tc, :active_voice_indicative_mood_imperfect_tense_third_person_singular_number)
108
- tc.tense_list.each do |cluster_method|
97
+ tense_list.each do |cluster_method|
109
98
  assert tc.respond_to? cluster_method.to_sym
110
99
  end
111
- assert_equal 132, tc.vector_list.length
112
100
  end
113
101
 
114
102
  def test_defective_verbs
@@ -144,14 +132,6 @@ class TestLatinVerb < MiniTest::Unit::TestCase # :nodoc:
144
132
  end
145
133
  end
146
134
 
147
- def test_participial_stem_creation
148
- @verb_hash_utf8_style.each_pair do |k,v|
149
- a = v.split( /\s+/ )
150
- assert_equal(@verb_hash_participial_stems[k],
151
- Linguistics::Latin::Verb::LatinVerb.calculate_participial_stem(a[0], a[1]))
152
- end
153
- end
154
-
155
135
  # Tests to see if the string that was given was sufficient to successfully create a LatinVerb
156
136
  def test_construction_validity
157
137
  @verb_hash_utf8_style.each_pair do |k,s|
@@ -1,8 +1,6 @@
1
- # encoding: UTF-8
2
-
3
1
  require "minitest/autorun"
4
2
 
5
- $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
3
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. .. lib])
6
4
  require 'latinverb'
7
5
 
8
6
 
@@ -168,23 +166,23 @@ class TestLatinVerbThirdConj < MiniTest::Unit::TestCase # :nodoc:
168
166
  assert_equal("[ actī, actae, acta ] essētis", @aThird.passive_voice_subjunctive_mood_pastperfect_tense_second_person_plural_number.to_s)
169
167
  assert_equal("[ actī, actae, acta ] essent", @aThird.passive_voice_subjunctive_mood_pastperfect_tense_third_person_plural_number.to_s)
170
168
 
171
- # Imperatives
172
- assert_equal"age", @aThird.imperatives[0]
173
- assert_equal"agite", @aThird.imperatives[1]
174
-
175
- # Participles
176
- assert_equal"agens, agentis", @aThird.present_active_participle
177
- assert_equal"actūrus, actūra, actūrum", @aThird.future_active_participle
178
- assert_equal"actus, acta, actum", @aThird.perfect_passive_participle
179
- assert_equal"agendus, agenda, agendum", @aThird.future_passive_participle
180
-
181
- # Infinitves
182
- assert_equal "agere", @aThird.present_active_infinitive.to_s
183
- assert_equal "ēgīsse", @aThird.perfect_active_infinitive
184
- assert_equal "actūrus esse", @aThird.future_active_infinitive
185
- assert_equal "agī", @aThird.present_passive_infinitive
186
- assert_equal "actus, acta, actum esse", @aThird.perfect_passive_infinitive
187
- assert_equal "actum īrī", @aThird.future_passive_infinitive
188
- end
169
+ # Imperatives
170
+ assert_equal"age", @aThird.imperatives[0]
171
+ assert_equal"agite", @aThird.imperatives[1]
172
+
173
+ # Participles
174
+ assert_equal"agens, agentis", @aThird.present_active_participle
175
+ assert_equal"actūrus, actūra, actūrum", @aThird.future_active_participle
176
+ assert_equal"actus, acta, actum", @aThird.perfect_passive_participle
177
+ assert_equal"agendus, agenda, agendum", @aThird.future_passive_participle
178
+
179
+ # Infinitves
180
+ assert_equal "agere", @aThird.present_active_infinitive.to_s
181
+ assert_equal "ēgīsse", @aThird.perfect_active_infinitive
182
+ assert_equal "actūrus esse", @aThird.future_active_infinitive
183
+ assert_equal "agī", @aThird.present_passive_infinitive
184
+ assert_equal "actus, acta, actum esse", @aThird.perfect_passive_infinitive
185
+ assert_equal "actum īrī", @aThird.future_passive_infinitive
186
+ end
189
187
 
190
188
  end
@@ -0,0 +1,18 @@
1
+ require "minitest/autorun"
2
+ require "minitest/pride"
3
+
4
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
5
+ require 'latinverb'
6
+
7
+ class LatinVerbAccessibleReaderTest < MiniTest::Unit::TestCase
8
+ def setup
9
+ @aFirst = Linguistics::Latin::Verb::LatinVerb.new 'amō amāre amāvī amatum'
10
+ end
11
+
12
+ def test_accessor
13
+ assert_respond_to @aFirst, :original_string
14
+ assert_respond_to @aFirst, :classification
15
+ assert_respond_to @aFirst, :irregular?
16
+ assert_respond_to @aFirst, :stem
17
+ end
18
+ end
@@ -0,0 +1,33 @@
1
+ require 'minitest/autorun'
2
+ require 'minitest/pride'
3
+ require 'latinverb'
4
+
5
+ class PrincipalPartsExtractorTest < Minitest::Unit::TestCase
6
+ def setup
7
+ @verb_hash_utf8_style = {
8
+ :@aFirstString => 'amō amāre amāvī amatum',
9
+ :@aSecondString => 'moneō monēre monuī monitum',
10
+ :@aThirdString => 'agō agere ēgī actum',
11
+ :@aThirdIOString => 'capiō capere cēpī capitum',
12
+ :@aFourthString => 'audiō audīre audīvī auditum',
13
+ }
14
+ @verb_hash_participial_stems = {
15
+ :@aFirstString => "amā",
16
+ :@aSecondString => "monē",
17
+ :@aThirdString => "age",
18
+ :@aThirdIOString => "capiē",
19
+ :@aFourthString => "audiē"
20
+ }
21
+ end
22
+
23
+ def test_participial_stem_creation
24
+ @verb_hash_utf8_style.each_pair do |k,v|
25
+ a = v.split( /\s+/ )
26
+ stub_classifier = OpenStruct.new( deponent?: false, semideponent?: false, impersonal?: false, regular?: true)
27
+ stub_verb = OpenStruct.new( classifier: stub_classifier, present_active_infinitive: a[1], first_person_singular: a[0] )
28
+ result = Linguistics::Latin::Verb::LatinVerb::LatinverbStemDeriver.new(stub_verb).participial_stem
29
+ assert_equal(@verb_hash_participial_stems[k], result, "Should have extracted #{@verb_hash_participial_stems[k]} for #{v}")
30
+ end
31
+ end
32
+
33
+ end
metadata CHANGED
@@ -1,62 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: latinverb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
5
- prerelease:
4
+ version: 0.9.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Steven G. Harms
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-11-04 00:00:00.000000000 Z
11
+ date: 2013-10-22 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: macronconversions
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
- name: verbvector
28
+ name: linguistics_latin
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rdoc
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: activesupport
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
60
81
  - !ruby/object:Gem::Version
61
82
  version: '0'
62
83
  description: This gem takes the four principal parts of a standard Latin verb and
@@ -76,86 +97,137 @@ files:
76
97
  - etc/irreg_skel.json
77
98
  - latinverb.gemspec
78
99
  - lib/latinverb.rb
79
- - lib/latinverb/chart.rb
100
+ - lib/latinverb/components.rb
101
+ - lib/latinverb/components/chart_presenter.rb
102
+ - lib/latinverb/components/classifier.rb
103
+ - lib/latinverb/components/classifier/strategies/defective_verb_classification_strategy.rb
104
+ - lib/latinverb/components/classifier/strategies/deponent_verb_classification_strategy.rb
105
+ - lib/latinverb/components/classifier/strategies/impersonal_verb_classification_strategy.rb
106
+ - lib/latinverb/components/classifier/strategies/irregular_verb_classification_strategy.rb
107
+ - lib/latinverb/components/classifier/strategies/present_only_verb_classification_strategy.rb
108
+ - lib/latinverb/components/classifier/strategies/regular_verb_classification_strategy.rb
109
+ - lib/latinverb/components/classifier/strategies/semideponent_verb_classification_strategy.rb
110
+ - lib/latinverb/components/classifier/strategies/verb_classification_strategy.rb
111
+ - lib/latinverb/components/classifier/strategies/very_irregular_verb_classification_strategy.rb
112
+ - lib/latinverb/components/imperatives_handler.rb
113
+ - lib/latinverb/components/infinitivizer.rb
114
+ - lib/latinverb/components/participler.rb
115
+ - lib/latinverb/components/passive_infinitive_factory.rb
116
+ - lib/latinverb/components/present_only_checker.rb
117
+ - lib/latinverb/components/principal_parts_extractor.rb
118
+ - lib/latinverb/components/stem_deriver.rb
119
+ - lib/latinverb/components/type_evaluator.rb
120
+ - lib/latinverb/components/validator.rb
121
+ - lib/latinverb/dynamic_method_resolver.rb
122
+ - lib/latinverb/errors.rb
123
+ - lib/latinverb/imperative_block.rb
124
+ - lib/latinverb/imperative_block/imperative_rule_factory.rb
125
+ - lib/latinverb/paradigmatic_verbs.rb
126
+ - lib/latinverb/serialization.rb
127
+ - lib/latinverb/serialization/hash.rb
128
+ - lib/latinverb/serialization/json.rb
129
+ - lib/latinverb/serialization/yaml.rb
130
+ - lib/latinverb/tense_block.rb
131
+ - lib/latinverb/tense_block/null_tense_block.rb
132
+ - lib/latinverb/tense_block/vector_resolution_delegate.rb
133
+ - lib/latinverb/tense_method_applicator.rb
134
+ - lib/latinverb/tense_method_applicator/defective_checker.rb
135
+ - lib/latinverb/tense_method_applicator/deponent_string_deriver.rb
136
+ - lib/latinverb/tense_method_applicator/first_builder.rb
137
+ - lib/latinverb/tense_method_applicator/fourth.rb
138
+ - lib/latinverb/tense_method_applicator/fourth_builder.rb
139
+ - lib/latinverb/tense_method_applicator/irregular_builder.rb
140
+ - lib/latinverb/tense_method_applicator/mutator_for_classification_factory.rb
141
+ - lib/latinverb/tense_method_applicator/mutator_for_verb_type.rb
142
+ - lib/latinverb/tense_method_applicator/mutators/deponent.rb
143
+ - lib/latinverb/tense_method_applicator/mutators/deponent/imperative_mutator.rb
144
+ - lib/latinverb/tense_method_applicator/mutators/deponent/infinitive_mutator.rb
145
+ - lib/latinverb/tense_method_applicator/mutators/deponent/participle_mutator.rb
146
+ - lib/latinverb/tense_method_applicator/mutators/deponent/tense_block_mutator.rb
147
+ - lib/latinverb/tense_method_applicator/mutators/impersonal.rb
148
+ - lib/latinverb/tense_method_applicator/mutators/invariant.rb
149
+ - lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_imperative_mood_future_tense_strategy.rb
150
+ - lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_imperative_mood_present_tense_strategy.rb
151
+ - lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_future_tense_strategy.rb
152
+ - lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_futureperfect_tense_strategy.rb
153
+ - lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_imperfect_tense_strategy.rb
154
+ - lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_pastperfect_tense_strategy.rb
155
+ - lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_perfect_tense_strategy.rb
156
+ - lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_present_tense_strategy.rb
157
+ - lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_subjunctive_mood_imperfect_tense_strategy.rb
158
+ - lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_subjunctive_mood_pastperfect_tense_strategy.rb
159
+ - lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_subjunctive_mood_perfect_tense_strategy.rb
160
+ - lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_subjunctive_mood_present_tense_strategy.rb
161
+ - lib/latinverb/tense_method_applicator/mutators/invariant/imperatives.rb
162
+ - lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_future_tense_strategy.rb
163
+ - lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_futureperfect_tense_strategy.rb
164
+ - lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_imperfect_tense_strategy.rb
165
+ - lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_pastperfect_tense_strategy.rb
166
+ - lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_perfect_tense_strategy.rb
167
+ - lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_present_tense_strategy.rb
168
+ - lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_subjunctive_mood_imperfect_tense_strategy.rb
169
+ - lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_subjunctive_mood_pastperfect_tense_strategy.rb
170
+ - lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_subjunctive_mood_perfect_tense_strategy.rb
171
+ - lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_subjunctive_mood_present_tense_strategy.rb
172
+ - lib/latinverb/tense_method_applicator/mutators/invariant/triplicate_and_pluralize_formatters.rb
173
+ - lib/latinverb/tense_method_applicator/mutators/irregular.rb
174
+ - lib/latinverb/tense_method_applicator/mutators/irregular/infinitives_builder.rb
175
+ - lib/latinverb/tense_method_applicator/mutators/irregular/json_deserializer.rb
176
+ - lib/latinverb/tense_method_applicator/mutators/irregular/json_revivifier.rb
177
+ - lib/latinverb/tense_method_applicator/mutators/irregular/participles_builder.rb
178
+ - lib/latinverb/tense_method_applicator/mutators/irregular/present_only_irregular_mask.rb
179
+ - lib/latinverb/tense_method_applicator/mutators/present_only.rb
180
+ - lib/latinverb/tense_method_applicator/mutators/regular.rb
181
+ - lib/latinverb/tense_method_applicator/mutators/semideponent.rb
182
+ - lib/latinverb/tense_method_applicator/perfect_tense_remover.rb
183
+ - lib/latinverb/tense_method_applicator/second_builder.rb
184
+ - lib/latinverb/tense_method_applicator/tense_methods_vectorizer.rb
185
+ - lib/latinverb/tense_method_applicator/third_builder.rb
186
+ - lib/latinverb/tense_method_applicator/thirdio_builder.rb
80
187
  - lib/latinverb/version.rb
81
- - lib/linguistics/latin/verb/classification_types.rb
82
- - lib/linguistics/latin/verb/constants.rb
83
- - lib/linguistics/latin/verb/deponent_tense_methods.rb
84
- - lib/linguistics/latin/verb/imperative_block.rb
85
- - lib/linguistics/latin/verb/infinitive_block.rb
86
- - lib/linguistics/latin/verb/infinitives.rb
87
- - lib/linguistics/latin/verb/irregulars.rb
88
- - lib/linguistics/latin/verb/latinverb/classmethods.rb
89
- - lib/linguistics/latin/verb/latinverb/data.rb
90
- - lib/linguistics/latin/verb/latinverb/defective_checker.rb
91
- - lib/linguistics/latin/verb/latinverb/deponent.rb
92
- - lib/linguistics/latin/verb/latinverb/display.rb
93
- - lib/linguistics/latin/verb/latinverb/impersonal.rb
94
- - lib/linguistics/latin/verb/latinverb/irregular.rb
95
- - lib/linguistics/latin/verb/latinverb/latin_verb_type_evaluator.rb
96
- - lib/linguistics/latin/verb/latinverb/latinverb_classifier.rb
97
- - lib/linguistics/latin/verb/latinverb/latinverb_input_sanitizer.rb
98
- - lib/linguistics/latin/verb/latinverb/latinverb_pp_extractor.rb
99
- - lib/linguistics/latin/verb/latinverb/metaprogramming.rb
100
- - lib/linguistics/latin/verb/latinverb/semideponent.rb
101
- - lib/linguistics/latin/verb/latinverb/validation.rb
102
- - lib/linguistics/latin/verb/latinverb/verbvector_description.rb
103
- - lib/linguistics/latin/verb/participle_block.rb
104
- - lib/linguistics/latin/verb/participles.rb
105
- - lib/linguistics/latin/verb/phonographia.rb
106
- - lib/linguistics/latin/verb/supine.rb
107
- - lib/linguistics/latin/verb/tense_block.rb
108
- - lib/linguistics/latin/verb/tense_definitions/first.rb
109
- - lib/linguistics/latin/verb/tense_definitions/fourth.rb
110
- - lib/linguistics/latin/verb/tense_definitions/impersonal.rb
111
- - lib/linguistics/latin/verb/tense_definitions/invariant.rb
112
- - lib/linguistics/latin/verb/tense_definitions/irregular.rb
113
- - lib/linguistics/latin/verb/tense_definitions/second.rb
114
- - lib/linguistics/latin/verb/tense_definitions/third.rb
115
- - lib/linguistics/latin/verb/tense_definitions/third_io.rb
116
- - test/testAmbiguousLookups.rb
117
- - test/testClusterResolution.rb
118
- - test/testDataStructures.rb
119
- - test/testDefectSemiImp.rb
120
- - test/testDeponentFirstConjugation.rb
121
- - test/testDeponentFourthConjugation.rb
122
- - test/testDeponentSecondConjugation.rb
123
- - test/testDeponentThirdConjugation.rb
124
- - test/testDeponentThirdIOConjugation.rb
125
- - test/testDeserializeInfinitives.rb
126
- - test/testFirstConjugation.rb
127
- - test/testFourthConjugation.rb
128
- - test/testFreakishVerbs.rb
129
- - test/testImperativeBlock.rb
130
- - test/testIrregularSum.rb
131
- - test/testIrregulars.rb
132
- - test/testLatinVerb.rb
133
- - test/testMacronRules.rb
134
- - test/testSecondConjugation.rb
135
- - test/testThirdConjugation.rb
136
- - test/testThirdIOConjugation.rb
188
+ - test/integration/ambiguous_lookups_test.rb
189
+ - test/integration/cluster_resolution_test.rb
190
+ - test/integration/data_structures_test.rb
191
+ - test/integration/defect_semi_imp_test.rb
192
+ - test/integration/deponent_first_conjugation_test.rb
193
+ - test/integration/deponent_fourth_conjugation_test.rb
194
+ - test/integration/deponent_second_conjugation_test.rb
195
+ - test/integration/deponent_third_conjugation_test.rb
196
+ - test/integration/deponent_third_io_conjugation_test.rb
197
+ - test/integration/first_conjugation_test.rb
198
+ - test/integration/fourth_conjugation_test.rb
199
+ - test/integration/freakish_vs.rb_test.rb
200
+ - test/integration/imperative_block_test.rb
201
+ - test/integration/irregular_sum_test.rb
202
+ - test/integration/irregulars_test.rb
203
+ - test/integration/latin_verb_test.rb
204
+ - test/integration/macron_rules_test.rb
205
+ - test/integration/second_conjugation_test.rb
206
+ - test/integration/third_conjugation_test.rb
207
+ - test/integration/third_io_conjugation_test.rb
208
+ - test/unit/latinverb_accessible_reader_test.rb
209
+ - test/unit/principal_parts_extractor_test.rb
137
210
  homepage: http://rubygems.org/gems/latinverb
138
211
  licenses: []
212
+ metadata: {}
139
213
  post_install_message:
140
214
  rdoc_options: []
141
215
  require_paths:
142
216
  - lib
143
217
  required_ruby_version: !ruby/object:Gem::Requirement
144
- none: false
145
218
  requirements:
146
- - - ! '>='
219
+ - - '>='
147
220
  - !ruby/object:Gem::Version
148
221
  version: '0'
149
222
  required_rubygems_version: !ruby/object:Gem::Requirement
150
- none: false
151
223
  requirements:
152
- - - ! '>='
224
+ - - '>='
153
225
  - !ruby/object:Gem::Version
154
226
  version: '0'
155
227
  requirements: []
156
228
  rubyforge_project: latinverb
157
- rubygems_version: 1.8.23
229
+ rubygems_version: 2.0.2
158
230
  signing_key:
159
- specification_version: 3
231
+ specification_version: 4
160
232
  summary: Gem designed to fully conjugate Latin verbs
161
233
  test_files: []
@@ -1,94 +0,0 @@
1
- # encoding: UTF-8
2
- module Linguistics
3
- module Latin
4
- module Verb
5
- class LatinVerb # :nodoc:
6
- def c_prep(heading, rays, subtitles, format_string)
7
- puts heading
8
- puts '=' * heading.length + "\n"
9
- printf format_string, '', *subtitles
10
- underbars = subtitles.clone
11
- underbars.map!{|j| j.gsub! /./, '='}
12
- printf format_string, '', *underbars
13
- vertical_transform({
14
- :label => ['1st Sg.', '2nd Sg.', '3rd Sg.','1st Pl.', '2nd Pl.', '3rd Pl.'],
15
- :rays => rays
16
- }).each{|a| printf format_string, *a}
17
- end
18
-
19
- def chart
20
- f="%9s%15s%15s%15s\n"
21
- f_subjunctive="%9s%15s%15s%15s%15s\n"
22
- c_prep "Present System", [
23
- self.active_voice_indicative_mood_present_tense,
24
- self.active_voice_indicative_mood_imperfect_tense,
25
- self.active_voice_indicative_mood_future_tense
26
- ], %w/Present Imperfect Future/,f
27
- puts "\n"
28
- c_prep "Perfect System", [ self.active_voice_indicative_mood_perfect_tense,
29
- self.active_voice_indicative_mood_pastperfect_tense,
30
- self.active_voice_indicative_mood_futureperfect_tense
31
- ], %w/Perfect Past-Perfect Future-Perfect/,f
32
- puts "\n"
33
- c_prep "Passive Present System", [
34
- self.passive_voice_indicative_mood_present_tense,
35
- self.passive_voice_indicative_mood_imperfect_tense,
36
- self.passive_voice_indicative_mood_future_tense
37
- ], %w/Present Imperfect Future/,f
38
- puts "\n"
39
- c_prep "Passive Perfect System", [ self.passive_voice_indicative_mood_perfect_tense,
40
- self.passive_voice_indicative_mood_pastperfect_tense,
41
- self.passive_voice_indicative_mood_futureperfect_tense
42
- ], %w/Perfect Past-Perfect Future-Perfect/,f
43
- puts "\n"
44
-
45
-
46
- c_prep "Subjunctives", [ self.active_voice_subjunctive_mood_present_tense,
47
- self.active_voice_subjunctive_mood_imperfect_tense,
48
- self.active_voice_subjunctive_mood_perfect_tense,
49
- self.active_voice_subjunctive_mood_pastperfect_tense
50
- ], %w/Present Imperfect Perfect Past-Perfect/,f_subjunctive
51
- puts "\n"
52
- c_prep "Passive Subjunctives", [ self.active_voice_subjunctive_mood_present_tense,
53
- self.active_voice_subjunctive_mood_imperfect_tense,
54
- self.active_voice_subjunctive_mood_perfect_tense,
55
- self.active_voice_subjunctive_mood_pastperfect_tense
56
- ], %w/Present Imperfect Perfect Past-Perfect/,f_subjunctive
57
- puts "\n"
58
- puts "Participles"
59
- self.methods.grep(/_participle$/).each do |p|
60
- printf "%42s %42s\n", p.to_s.gsub('_', ' ').gsub(/\b\w/){$&.upcase}, self.send(p)
61
- end
62
- puts "\n"
63
- puts "Infinitives"
64
- self.methods.grep(/infinitive$/).each do |p|
65
- printf "%42s %42s\n", (p.to_s.gsub('_', ' ').gsub(/\b\w/){$&.upcase}), self.send(p)
66
- end
67
- return nil
68
- end
69
-
70
- alias_method :c, :chart
71
-
72
- def vertical_transform( opts = nil )
73
- # Get the length of the first array to be verticalized
74
- length = opts[:rays][0].length-1
75
-
76
- # Storage
77
- returnTemp = []
78
-
79
- # Verticalize
80
- 0.upto(length).each do |n|
81
- temp = []
82
- temp << opts[:label][n] unless opts[:label].empty?
83
- opts[:rays].collect do |r|
84
- temp << r[n]
85
- end
86
- returnTemp << temp
87
- end
88
-
89
- returnTemp
90
- end
91
- end
92
- end
93
- end
94
- end
@@ -1,61 +0,0 @@
1
- # encoding: UTF-8
2
- module Linguistics
3
- module Latin
4
- module Verb
5
- =begin rdoc
6
-
7
- == NAME
8
-
9
- VerbTypes
10
-
11
- == DESCRIPTION
12
-
13
- A VerbType is a parent, _conceptually abstract_ class for tracking
14
- classifications of verbs. At the present time it is an empty class. It is
15
- foreseeable, however, that in the future, it may be advantagous to associate
16
- specific behaviors to it. It is subclassed into the various types of Verbs
17
- identified in Latin pedagogy: First, Second, Third, ThirdIO, Fourth,
18
- Irregular, and Deponent. These classes, effectively, behave as strings as
19
- attributes to the classification attribute within a LatinVerb.
20
-
21
- VerbTypes, therefore, is the module containing these VerbTypes.
22
-
23
- =end
24
-
25
- module Classification
26
- class ClassificationType; end
27
- class Semideponent < ClassificationType; end
28
- class Deponent < ClassificationType; end
29
- class Irregular < ClassificationType; end
30
- class Impersonal < ClassificationType; end
31
- class Defective < ClassificationType; end
32
- class Regular < ClassificationType; end
33
- class PresentOnly < ClassificationType; end
34
-
35
- end
36
- module VerbTypes
37
- ##
38
- #--
39
- # == DESCRIPTION
40
- #
41
- # Abstract ancestor class that defines the various subclass Verb Types
42
- # ++
43
- #
44
- ##
45
- class VerbType # :nodoc:
46
- end
47
- class First < VerbType # :nodoc:
48
- end
49
- class Second < VerbType # :nodoc:
50
- end
51
- class Third < VerbType # :nodoc:
52
- end
53
- class ThirdIO < VerbType # :nodoc:
54
- end
55
- class Fourth < VerbType # :nodoc:
56
- end
57
- end
58
- end
59
- end
60
- end
61
-