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,227 +0,0 @@
1
- # encoding: UTF-8
2
-
3
- require 'linguistics/latin/verb/phonographia'
4
-
5
- module Linguistics
6
- module Latin
7
- module Verb
8
- ##
9
- # == NAME
10
- #
11
- # TenseBlock
12
- #
13
- # == DESCRIPTION
14
- #
15
- # As per the LatinVerb documentation, LatinVerbs decorate themselves with
16
- # the method which loads up a voice/tense/mood black box. That black box
17
- # is a TenseBlock. The TenseBlock, in turn, responds to getting the final
18
- # two components of the fully-qualified vector back (person and number).
19
- # It also has Array-like behaviors (e.g. +[]+) based on the 2 * 3 matrix.
20
- #
21
- # == INTERNALS
22
- #
23
- # Internally, a Tenseblock is effectively an Array of the arguments passed
24
- # in during TenseBlock.initialize. These are assumed to be
25
- # first/singular, second/singular, third/singular and then
26
- # first/plural, second/plural, third/plural.
27
- #
28
- # Syntactic sugar methods are added to access this array. Thus, in a
29
- # LatinVerb a fully-qualified vectors first 3/5 data resolve to a
30
- # TenseBlock. The last 2/5 of resolution occurs within the TenseBlock
31
- # (effectively pulling the contents of the Array). Therefore, when a
32
- # LatinVerb is accessed with the quinpartite fully-qualified vector it can
33
- # return the unique value. The mechanics of this hook through (surprise!)
34
- # method_missing.
35
- #
36
- #
37
- ##
38
-
39
- class TenseBlock
40
- include Linguistics::Latin::Phonographia
41
- @tb_canonical_accessors = []
42
- @tb_alias_accessors = []
43
- @tb_accessors = []
44
-
45
- class << self
46
- def null_tense_block
47
- return self.new [ '', '', '', '', '', '']
48
- end
49
- end
50
-
51
- ##
52
- #--
53
- # TODO: I dream of this being generated dynamically through the
54
- # VerbvectorGenerator for more dynamicity. This would require a richer DSL in
55
- # VerbvectorGenerator, but would be totally awesome if we could describe this
56
- # language in a DSL.
57
- #++
58
- ##
59
-
60
- ##
61
- # --
62
- # This structure is used to define the methods that will be allowed to
63
- # access the @results array. The key is the "canonical" name:
64
- # (person)(number). This needs to be flexibly supported. This key
65
- # map to a hash that contains the keys :aliases (for aliases to that
66
- # particular "canonical") method as well as a Proc that should return
67
- # the proper value for the "canonical" method (and therefore, by means
68
- # of alias, also to the "aliased" methods). "Canonical" methods will
69
- # be added to an array accessed by "tb_canonical_accessors." Aliases
70
- # will be accesed by "tb_noncanonical_accessors." The aggregate is
71
- # accesed by "tb_accessors."
72
- #++
73
- ##
74
-
75
- # Describes the methods that are to be provided to instances as means
76
- # for accessing the contents of the @results hash.
77
- ACCESSOR_HASH = {
78
- :first_person_singular_number => {
79
- :aliases => [:singular_number_first_person],
80
- :returns => lambda{ @results[0] }
81
- },
82
- :second_person_singular_number => {
83
- :aliases => [:singular_number_second_person],
84
- :returns => lambda{ @results[1] }
85
- },
86
- :third_person_singular_number => {
87
- :aliases => [:singular_number_third_person],
88
- :returns => lambda{ @results[2] }
89
- },
90
- :first_person_plural_number => {
91
- :aliases => [:plural_number_first_person],
92
- :returns => lambda{ @results[3] }
93
- },
94
- :second_person_plural_number => {
95
- :aliases => [:plural_number_second_person],
96
- :returns => lambda{ @results[4] }
97
- },
98
- :third_person_plural_number => {
99
- :aliases => [:plural_number_third_person],
100
- :returns => lambda{ @results[5] }
101
- }
102
- }
103
-
104
- def self.add_acc_canonical(s); @tb_canonical_accessors << s; end # :nodoc:
105
- def self.add_acc_alias(s); @tb_alias_accessors << s; end # :nodoc:
106
-
107
- ACCESSOR_HASH.each_pair do |k,h|
108
- define_method k, h[:returns]
109
- self.add_acc_canonical k
110
- h[:aliases].each{|a| alias_method a, k; self.add_acc_alias a}
111
- end
112
-
113
- @tb_accessors = @tb_canonical_accessors + @tb_alias_accessors
114
-
115
-
116
- # Idea from Mike Perham (6/1/2011): Add a way to leave a note that
117
- # describes, in English, the signification of the given tense. Good
118
- # idea.
119
-
120
- attr_reader :meaning
121
-
122
- # === ARGUMENTS
123
- #
124
- # *r:* :: An Array (or something that can respond to to_a) containing 0-6
125
- # elements that will be mapped into the 2*3 matrix of Latin verb person /
126
- # number specifications.
127
- # === RETURNS
128
- #
129
- # Nothing
130
- ##
131
- def initialize(r, opts={})
132
- begin
133
- unless r.class.is_a? Array
134
- raise if r.nil?
135
- r = r.to_a
136
- end
137
- @results = r.map{|v| Linguistics::Latin::Phonographia.fix_macrons v}
138
- @meaning = opts[:meaning] if opts[:meaning]
139
- rescue => e
140
- raise e, "TenseBlock failed to initialize correctly. passed #{r.nil?}"
141
- end
142
- end
143
-
144
- ##
145
- #
146
- # Required for serialization
147
- #
148
- ##
149
- def to_json(*a)
150
- {
151
- 'json_class' => self.class.name,
152
- 'data' => @results.map{|i| i.to_json}
153
- }.to_json(*a)
154
- end
155
-
156
- ##
157
- #
158
- # Required for deserialization
159
- #
160
- ##
161
- def TenseBlock.json_create(o)
162
- new(o['data'])
163
- end
164
-
165
- ##
166
- #
167
- # Provides Array-like interface to the collection of results.
168
- #
169
- ##
170
- def [](arg)
171
- @results[arg]
172
- end
173
-
174
- ##
175
- #
176
- # To Array, useful in serialization
177
- #
178
- ##
179
- def to_a
180
- return @results
181
- end
182
-
183
- ##
184
- #
185
- # Add array compatibility support
186
- #
187
- ##
188
- def length; return @results.length; end
189
-
190
- ##
191
- # Add array empty? compatibility
192
- #
193
- ##
194
- def empty?; return @results.empty?; end
195
-
196
- ##
197
- #
198
- # Add a sensible string display
199
- #
200
- ##
201
- def to_s; return self.to_a.to_s; end
202
-
203
- ##
204
- # Return whether the result arrays is empty of words
205
- ##
206
- def wordless?
207
- !@results.all?{ |r| r =~ /\w/ }
208
- end
209
-
210
- ##
211
- #
212
- # Provide a method_missing so that ambiguous cases can be resolved
213
- #
214
- ##
215
- def method_missing(symbol, *args)
216
- returnArray = []
217
- self.class.class_eval{@tb_canonical_accessors}.grep(/#{symbol.to_s}/) do |s|
218
- returnArray.push(send s)
219
- end
220
- return returnArray unless returnArray.empty?
221
- raise
222
- end
223
- end
224
- end
225
- end
226
- end
227
-
@@ -1,92 +0,0 @@
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 First
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
- endings_coll = ['m', Linguistics::Latin::Verb::LatinVerb::AP_FIRST_AND_SECOND_CONJUG_PERS_ENDINGS].flatten!
36
- collection = endings_coll.map{ |ending| asp_base + ending }
37
- TenseBlock.new( collection ,
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
- fp_stem = stem+"bi"
44
- standards = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG[2..-1].map{|x| fp_stem + x}
45
- standards.pop
46
- fp_stem.sub!(/.$/,'u')
47
- members =
48
- [ stem + "b\xc5\x8dr",
49
- stem + "beris",
50
- standards,
51
- fp_stem+Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.last].flatten!
52
-
53
- TenseBlock.new(
54
- members,
55
- { :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_future_tense] }
56
- )
57
- end
58
-
59
- def passive_voice_indicative_mood_imperfect_tense
60
- imperfect_stem = stem + "b\xc4\x81"
61
- members = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.map{|x| imperfect_stem+x}
62
- return TenseBlock.new(
63
- members,
64
- { :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_imperfect_tense] }
65
- )
66
- end
67
-
68
- def passive_voice_indicative_mood_present_tense
69
- local_pe = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.clone
70
- return TenseBlock.new(
71
- [first_person_singular.to_s + "r",
72
- local_pe[1..-1].map{|x| @stem + x}].flatten!,
73
- { :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_present_tense] }
74
- )
75
- end
76
-
77
- def passive_voice_subjunctive_mood_present_tense
78
- key = verb_type.to_s.split(/::/).last.to_sym
79
- short_base =
80
- Linguistics::Latin::Verb::LatinVerb::ACTIVE_PRESENT_SUBJUNCTIVE_ENDINGS[key].call(stem[0..-2])
81
- members = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.map { |ending| short_base + ending }
82
- TenseBlock.new(
83
- members,
84
- { :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_subjunctive_mood_present_tense] }
85
- )
86
- end
87
- end
88
- end
89
- end
90
- end
91
- end
92
-
@@ -1,92 +0,0 @@
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 Fourth
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 do |x|
19
- stem + "i" + x end ].flatten!,
20
- { :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_imperfect_tense] }
21
- )
22
- end
23
-
24
- def active_voice_indicative_mood_present_tense
25
- return TenseBlock.new(
26
- [ first_person_singular,
27
- Linguistics::Latin::Verb::LatinVerb::AP_THIRDIO_CONJG_PERS_ENDINGS.collect{ |ending| stem + ending }
28
- ].flatten!,
29
- { :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_present_tense] }
30
- )
31
- end
32
-
33
- def active_voice_subjunctive_mood_present_tense
34
- key = verb_type.to_s.split(/::/).last.to_sym
35
- asp_base = Linguistics::Latin::Verb::LatinVerb::ACTIVE_PRESENT_SUBJUNCTIVE_ENDINGS[key].call(stem[0..-1])
36
- elems = ['m',
37
- Linguistics::Latin::Verb::LatinVerb::AP_FIRST_AND_SECOND_CONJUG_PERS_ENDINGS].flatten!.map do |ending|
38
- asp_base + ending
39
- end
40
-
41
- TenseBlock.new(
42
- elems,
43
- { :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_subjunctive_mood_present_tense] }
44
- )
45
- end
46
-
47
- def passive_voice_indicative_mood_future_tense
48
- ie_base = stem+"iē"
49
- elems = [stem+"ia"+Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG[0],
50
- Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG[1..-1].map{|x| ie_base + x}].flatten!
51
- TenseBlock.new(
52
- elems,
53
- { :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_future_tense] }
54
- )
55
- end
56
-
57
- def passive_voice_indicative_mood_imperfect_tense
58
- base = stem+"iēbā"
59
- elems = [Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.map{|x| base + x}].flatten!
60
- return TenseBlock.new(
61
- elems,
62
- { :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_imperfect_tense] }
63
- )
64
- end
65
-
66
- def passive_voice_indicative_mood_present_tense
67
- base = @stem+"ī"
68
- elems = [first_person_singular+"r",
69
- Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG[1..-2].map{|x| base + x},
70
- base+Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_OTHER[-1]].flatten!
71
- return TenseBlock.new(
72
- elems,
73
- { :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_present_tense] }
74
- )
75
- end
76
-
77
- def passive_voice_subjunctive_mood_present_tense
78
- subjunctive_stem = stem + "iā"
79
- elems = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.map do |ending|
80
- subjunctive_stem + ending
81
- end
82
- TenseBlock.new(
83
- elems,
84
- { :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_subjunctive_mood_present_tense] }
85
- )
86
- end
87
- end
88
- end
89
- end
90
- end
91
- end
92
-
@@ -1,25 +0,0 @@
1
- module Linguistics
2
- module Latin
3
- module Verb
4
- module TenseDefinitions
5
- module Impersonal
6
- def self.included(inclusor)
7
- impersonal_handler
8
- end
9
- def impersonal_handler
10
- singleton_class.class_eval do
11
- def active_voice_indicative_mood_present_tense
12
- TenseBlock.new ["", "", @original_string,
13
- "", "", ""]
14
- end
15
- def active_voice_indicative_mood_present_tense_third_person_singular_number
16
- return active_voice_indicative_mood_present_tense[2]
17
- end
18
- end
19
- end
20
- end
21
- end
22
- end
23
- end
24
- end
25
-