latinverb 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +28 -6
- data/README.markdown +1 -1
- data/Rakefile +1 -0
- data/latinverb.gemspec +5 -3
- data/lib/latinverb/components/chart_presenter.rb +81 -0
- data/lib/latinverb/components/classifier/strategies/defective_verb_classification_strategy.rb +19 -0
- data/lib/latinverb/components/classifier/strategies/deponent_verb_classification_strategy.rb +19 -0
- data/lib/latinverb/components/classifier/strategies/impersonal_verb_classification_strategy.rb +19 -0
- data/lib/latinverb/components/classifier/strategies/irregular_verb_classification_strategy.rb +19 -0
- data/lib/latinverb/components/classifier/strategies/present_only_verb_classification_strategy.rb +21 -0
- data/lib/latinverb/components/classifier/strategies/regular_verb_classification_strategy.rb +19 -0
- data/lib/latinverb/components/classifier/strategies/semideponent_verb_classification_strategy.rb +19 -0
- data/lib/latinverb/components/classifier/strategies/verb_classification_strategy.rb +31 -0
- data/lib/latinverb/components/classifier/strategies/very_irregular_verb_classification_strategy.rb +20 -0
- data/lib/latinverb/components/classifier.rb +76 -0
- data/lib/latinverb/components/imperatives_handler.rb +40 -0
- data/lib/latinverb/components/infinitivizer.rb +50 -0
- data/lib/latinverb/components/participler.rb +58 -0
- data/lib/latinverb/components/passive_infinitive_factory.rb +42 -0
- data/lib/latinverb/components/present_only_checker.rb +32 -0
- data/lib/latinverb/components/principal_parts_extractor.rb +35 -0
- data/lib/latinverb/components/stem_deriver.rb +81 -0
- data/lib/latinverb/components/type_evaluator.rb +35 -0
- data/lib/latinverb/components/validator.rb +33 -0
- data/lib/latinverb/components.rb +9 -0
- data/lib/latinverb/dynamic_method_resolver.rb +41 -0
- data/lib/latinverb/errors.rb +10 -0
- data/lib/latinverb/imperative_block/imperative_rule_factory.rb +35 -0
- data/lib/latinverb/imperative_block.rb +71 -0
- data/lib/latinverb/paradigmatic_verbs.rb +21 -0
- data/lib/latinverb/serialization/hash.rb +17 -0
- data/lib/latinverb/serialization/json.rb +41 -0
- data/lib/latinverb/serialization/yaml.rb +15 -0
- data/lib/latinverb/serialization.rb +3 -0
- data/lib/latinverb/tense_block/null_tense_block.rb +12 -0
- data/lib/latinverb/tense_block/vector_resolution_delegate.rb +89 -0
- data/lib/latinverb/tense_block.rb +52 -0
- data/lib/latinverb/tense_method_applicator/defective_checker.rb +21 -0
- data/lib/{linguistics/latin/verb/latinverb/classmethods.rb → latinverb/tense_method_applicator/deponent_string_deriver.rb} +15 -69
- data/lib/latinverb/tense_method_applicator/first_builder.rb +98 -0
- data/lib/latinverb/tense_method_applicator/fourth.rb +100 -0
- data/lib/latinverb/tense_method_applicator/fourth_builder.rb +100 -0
- data/lib/latinverb/tense_method_applicator/irregular_builder.rb +117 -0
- data/lib/latinverb/tense_method_applicator/mutator_for_classification_factory.rb +38 -0
- data/lib/latinverb/tense_method_applicator/mutator_for_verb_type.rb +38 -0
- data/lib/latinverb/tense_method_applicator/mutators/deponent/imperative_mutator.rb +49 -0
- data/lib/latinverb/tense_method_applicator/mutators/deponent/infinitive_mutator.rb +42 -0
- data/lib/latinverb/tense_method_applicator/mutators/deponent/participle_mutator.rb +47 -0
- data/lib/latinverb/tense_method_applicator/mutators/deponent/tense_block_mutator.rb +55 -0
- data/lib/latinverb/tense_method_applicator/mutators/deponent.rb +41 -0
- data/lib/latinverb/tense_method_applicator/mutators/impersonal.rb +27 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_imperative_mood_future_tense_strategy.rb +29 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_imperative_mood_present_tense_strategy.rb +29 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_future_tense_strategy.rb +35 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_futureperfect_tense_strategy.rb +28 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_imperfect_tense_strategy.rb +24 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_pastperfect_tense_strategy.rb +28 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_perfect_tense_strategy.rb +29 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_indicative_mood_present_tense_strategy.rb +24 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_subjunctive_mood_imperfect_tense_strategy.rb +29 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_subjunctive_mood_pastperfect_tense_strategy.rb +30 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_subjunctive_mood_perfect_tense_strategy.rb +30 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/active_voice_subjunctive_mood_present_tense_strategy.rb +24 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/imperatives.rb +53 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_future_tense_strategy.rb +24 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_futureperfect_tense_strategy.rb +27 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_imperfect_tense_strategy.rb +24 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_pastperfect_tense_strategy.rb +27 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_perfect_tense_strategy.rb +27 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_present_tense_strategy.rb +24 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_subjunctive_mood_imperfect_tense_strategy.rb +30 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_subjunctive_mood_pastperfect_tense_strategy.rb +33 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_subjunctive_mood_perfect_tense_strategy.rb +33 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_subjunctive_mood_present_tense_strategy.rb +24 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant/triplicate_and_pluralize_formatters.rb +26 -0
- data/lib/latinverb/tense_method_applicator/mutators/invariant.rb +65 -0
- data/lib/latinverb/tense_method_applicator/mutators/irregular/infinitives_builder.rb +35 -0
- data/lib/latinverb/tense_method_applicator/mutators/irregular/json_deserializer.rb +52 -0
- data/lib/latinverb/tense_method_applicator/mutators/irregular/json_revivifier.rb +48 -0
- data/lib/latinverb/tense_method_applicator/mutators/irregular/participles_builder.rb +35 -0
- data/lib/latinverb/tense_method_applicator/mutators/irregular/present_only_irregular_mask.rb +37 -0
- data/lib/latinverb/tense_method_applicator/mutators/irregular.rb +25 -0
- data/lib/latinverb/tense_method_applicator/mutators/present_only.rb +18 -0
- data/lib/latinverb/tense_method_applicator/mutators/regular.rb +17 -0
- data/lib/latinverb/tense_method_applicator/mutators/semideponent.rb +88 -0
- data/lib/latinverb/tense_method_applicator/perfect_tense_remover.rb +26 -0
- data/lib/latinverb/tense_method_applicator/second_builder.rb +105 -0
- data/lib/latinverb/tense_method_applicator/tense_methods_vectorizer.rb +73 -0
- data/lib/latinverb/tense_method_applicator/third_builder.rb +93 -0
- data/lib/latinverb/tense_method_applicator/thirdio_builder.rb +100 -0
- data/lib/latinverb/tense_method_applicator.rb +55 -0
- data/lib/latinverb/version.rb +2 -3
- data/lib/latinverb.rb +63 -419
- data/test/{testDeponentFirstConjugation.rb → integration/deponent_first_conjugation_test.rb} +1 -1
- data/test/{testDeponentFourthConjugation.rb → integration/deponent_fourth_conjugation_test.rb} +1 -1
- data/test/{testDeponentSecondConjugation.rb → integration/deponent_second_conjugation_test.rb} +1 -1
- data/test/{testDeponentThirdConjugation.rb → integration/deponent_third_conjugation_test.rb} +2 -2
- data/test/{testDeponentThirdIOConjugation.rb → integration/deponent_third_io_conjugation_test.rb} +1 -1
- data/test/{testFirstConjugation.rb → integration/first_conjugation_test.rb} +3 -7
- data/test/{testFreakishVerbs.rb → integration/freakish_vs.rb_test.rb} +4 -4
- data/test/{testIrregularSum.rb → integration/irregular_sum_test.rb} +1 -1
- data/test/{testIrregulars.rb → integration/irregulars_test.rb} +1 -1
- data/test/{testLatinVerb.rb → integration/latin_verb_test.rb} +5 -25
- data/test/{testThirdConjugation.rb → integration/third_conjugation_test.rb} +19 -21
- data/test/unit/latinverb_accessible_reader_test.rb +18 -0
- data/test/unit/principal_parts_extractor_test.rb +33 -0
- metadata +151 -79
- data/lib/latinverb/chart.rb +0 -94
- data/lib/linguistics/latin/verb/classification_types.rb +0 -61
- data/lib/linguistics/latin/verb/constants.rb +0 -201
- data/lib/linguistics/latin/verb/deponent_tense_methods.rb +0 -85
- data/lib/linguistics/latin/verb/imperative_block.rb +0 -118
- data/lib/linguistics/latin/verb/infinitive_block.rb +0 -39
- data/lib/linguistics/latin/verb/infinitives.rb +0 -212
- data/lib/linguistics/latin/verb/irregulars.rb +0 -4393
- data/lib/linguistics/latin/verb/latinverb/data.rb +0 -87
- data/lib/linguistics/latin/verb/latinverb/defective_checker.rb +0 -17
- data/lib/linguistics/latin/verb/latinverb/deponent.rb +0 -159
- data/lib/linguistics/latin/verb/latinverb/display.rb +0 -22
- data/lib/linguistics/latin/verb/latinverb/impersonal.rb +0 -34
- data/lib/linguistics/latin/verb/latinverb/irregular.rb +0 -83
- data/lib/linguistics/latin/verb/latinverb/latin_verb_type_evaluator.rb +0 -32
- data/lib/linguistics/latin/verb/latinverb/latinverb_classifier.rb +0 -100
- data/lib/linguistics/latin/verb/latinverb/latinverb_input_sanitizer.rb +0 -32
- data/lib/linguistics/latin/verb/latinverb/latinverb_pp_extractor.rb +0 -106
- data/lib/linguistics/latin/verb/latinverb/metaprogramming.rb +0 -80
- data/lib/linguistics/latin/verb/latinverb/semideponent.rb +0 -28
- data/lib/linguistics/latin/verb/latinverb/validation.rb +0 -42
- data/lib/linguistics/latin/verb/latinverb/verbvector_description.rb +0 -50
- data/lib/linguistics/latin/verb/participle_block.rb +0 -36
- data/lib/linguistics/latin/verb/participles.rb +0 -202
- data/lib/linguistics/latin/verb/phonographia.rb +0 -109
- data/lib/linguistics/latin/verb/supine.rb +0 -42
- data/lib/linguistics/latin/verb/tense_block.rb +0 -227
- data/lib/linguistics/latin/verb/tense_definitions/first.rb +0 -92
- data/lib/linguistics/latin/verb/tense_definitions/fourth.rb +0 -92
- data/lib/linguistics/latin/verb/tense_definitions/impersonal.rb +0 -25
- data/lib/linguistics/latin/verb/tense_definitions/invariant.rb +0 -613
- data/lib/linguistics/latin/verb/tense_definitions/irregular.rb +0 -82
- data/lib/linguistics/latin/verb/tense_definitions/second.rb +0 -97
- data/lib/linguistics/latin/verb/tense_definitions/third.rb +0 -86
- data/lib/linguistics/latin/verb/tense_definitions/third_io.rb +0 -91
- data/test/testDeserializeInfinitives.rb +0 -36
- /data/test/{testAmbiguousLookups.rb → integration/ambiguous_lookups_test.rb} +0 -0
- /data/test/{testClusterResolution.rb → integration/cluster_resolution_test.rb} +0 -0
- /data/test/{testDataStructures.rb → integration/data_structures_test.rb} +0 -0
- /data/test/{testDefectSemiImp.rb → integration/defect_semi_imp_test.rb} +0 -0
- /data/test/{testFourthConjugation.rb → integration/fourth_conjugation_test.rb} +0 -0
- /data/test/{testImperativeBlock.rb → integration/imperative_block_test.rb} +0 -0
- /data/test/{testMacronRules.rb → integration/macron_rules_test.rb} +0 -0
- /data/test/{testSecondConjugation.rb → integration/second_conjugation_test.rb} +0 -0
- /data/test/{testThirdIOConjugation.rb → integration/third_io_conjugation_test.rb} +0 -0
@@ -1,97 +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 Second
|
9
|
-
def active_voice_indicative_mood_future_tense
|
10
|
-
return TenseBlock.new(
|
11
|
-
[Linguistics::Latin::Verb::LatinVerb::AF_ONE_TWO_ENDINGS.collect{|x| stem + x}].flatten,
|
12
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_future_tense] }
|
13
|
-
)
|
14
|
-
end
|
15
|
-
|
16
|
-
def active_voice_indicative_mood_imperfect_tense
|
17
|
-
return TenseBlock.new(
|
18
|
-
[Linguistics::Latin::Verb::LatinVerb::AI_FIRST_AND_SECOND_CONJUG_PERS_ENDINGS.collect{|x| stem + x}].flatten,
|
19
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_imperfect_tense] }
|
20
|
-
)
|
21
|
-
end
|
22
|
-
|
23
|
-
def active_voice_indicative_mood_present_tense
|
24
|
-
return TenseBlock.new(
|
25
|
-
[ first_person_singular,
|
26
|
-
Linguistics::Latin::Verb::LatinVerb::AP_FIRST_AND_SECOND_CONJUG_PERS_ENDINGS.collect{ |ending| stem + ending}
|
27
|
-
].flatten!,
|
28
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_present_tense] }
|
29
|
-
)
|
30
|
-
end
|
31
|
-
|
32
|
-
def active_voice_subjunctive_mood_present_tense
|
33
|
-
key = verb_type.to_s.split(/::/).last.to_sym
|
34
|
-
asp_base = Linguistics::Latin::Verb::LatinVerb::ACTIVE_PRESENT_SUBJUNCTIVE_ENDINGS[key].call(stem[0..-2])
|
35
|
-
elements = ['m',
|
36
|
-
Linguistics::Latin::Verb::LatinVerb::AP_FIRST_AND_SECOND_CONJUG_PERS_ENDINGS].flatten!.map do |ending|
|
37
|
-
asp_base + ending
|
38
|
-
end
|
39
|
-
|
40
|
-
TenseBlock.new(
|
41
|
-
elements,
|
42
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_subjunctive_mood_present_tense] }
|
43
|
-
)
|
44
|
-
end
|
45
|
-
|
46
|
-
def passive_voice_indicative_mood_future_tense
|
47
|
-
fp_stem = stem+"bi"
|
48
|
-
standards = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG[2..-1].map{|x| fp_stem + x}
|
49
|
-
standards.pop
|
50
|
-
fp_stem.sub!(/.$/,'u')
|
51
|
-
elements = [stem + "b\xc5\x8dr",
|
52
|
-
stem + "beris",
|
53
|
-
standards,
|
54
|
-
fp_stem+Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.last].flatten!
|
55
|
-
TenseBlock.new(
|
56
|
-
elements,
|
57
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_future_tense] }
|
58
|
-
)
|
59
|
-
end
|
60
|
-
|
61
|
-
def passive_voice_indicative_mood_imperfect_tense
|
62
|
-
imperfect_stem = stem + "b\xc4\x81"
|
63
|
-
elements = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.map{|x| imperfect_stem+x}
|
64
|
-
return TenseBlock.new(
|
65
|
-
elements,
|
66
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_imperfect_tense] }
|
67
|
-
)
|
68
|
-
end
|
69
|
-
|
70
|
-
def passive_voice_indicative_mood_present_tense
|
71
|
-
local_pe = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.clone
|
72
|
-
elements = [first_person_singular.to_s + "r",
|
73
|
-
local_pe[1..-1].map{|x| @stem + x}].flatten!
|
74
|
-
return TenseBlock.new(
|
75
|
-
elements,
|
76
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_present_tense] }
|
77
|
-
)
|
78
|
-
end
|
79
|
-
|
80
|
-
def passive_voice_subjunctive_mood_present_tense
|
81
|
-
key = verb_type.to_s.split(/::/).last.to_sym
|
82
|
-
short_base =
|
83
|
-
Linguistics::Latin::Verb::LatinVerb::ACTIVE_PRESENT_SUBJUNCTIVE_ENDINGS[key].call(stem[0..-2])
|
84
|
-
elems = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.map do |ending|
|
85
|
-
short_base + ending
|
86
|
-
end
|
87
|
-
TenseBlock.new(
|
88
|
-
elems,
|
89
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_subjunctive_mood_present_tense] }
|
90
|
-
)
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
@@ -1,86 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
# vim: set fdm=marker tw=80 sw=2:
|
3
|
-
|
4
|
-
module Linguistics
|
5
|
-
module Latin
|
6
|
-
module Verb
|
7
|
-
module TenseDefinitions
|
8
|
-
module Third
|
9
|
-
def active_voice_indicative_mood_future_tense
|
10
|
-
return TenseBlock.new(
|
11
|
-
[Linguistics::Latin::Verb::LatinVerb::AF_OTHER_ENDINGS.collect{|x| stem + x}].flatten,
|
12
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_future_tense] }
|
13
|
-
)
|
14
|
-
end
|
15
|
-
|
16
|
-
def active_voice_indicative_mood_imperfect_tense
|
17
|
-
return TenseBlock.new(
|
18
|
-
[Linguistics::Latin::Verb::LatinVerb::AI_THIRD_CONJUG_PERS_ENDINGS.collect{|x| stem + x}].flatten,
|
19
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_imperfect_tense] }
|
20
|
-
)
|
21
|
-
end
|
22
|
-
|
23
|
-
def active_voice_indicative_mood_present_tense
|
24
|
-
return TenseBlock.new(
|
25
|
-
[ Linguistics::Latin::Verb::LatinVerb::AP_THIRD_CONJUG_PERS_ENDINGS.collect{ |ending| stem + ending } ].flatten!,
|
26
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_present_tense] }
|
27
|
-
)
|
28
|
-
end
|
29
|
-
|
30
|
-
def active_voice_subjunctive_mood_present_tense
|
31
|
-
key = verb_type.to_s.split(/::/).last.to_sym
|
32
|
-
asp_base = Linguistics::Latin::Verb::LatinVerb::ACTIVE_PRESENT_SUBJUNCTIVE_ENDINGS[key].call(stem[0..-1])
|
33
|
-
elems = ['m',
|
34
|
-
Linguistics::Latin::Verb::LatinVerb::AP_FIRST_AND_SECOND_CONJUG_PERS_ENDINGS].flatten!.map do |ending|
|
35
|
-
asp_base + ending
|
36
|
-
end
|
37
|
-
|
38
|
-
TenseBlock.new(
|
39
|
-
elems,
|
40
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_subjunctive_mood_present_tense] }
|
41
|
-
)
|
42
|
-
end
|
43
|
-
|
44
|
-
def passive_voice_indicative_mood_future_tense
|
45
|
-
fp_stem = stem+"ē"
|
46
|
-
standards = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG[1..-1].map{|x| fp_stem + x}
|
47
|
-
elems = [stem + "ar", standards].flatten!
|
48
|
-
TenseBlock.new(
|
49
|
-
elems,
|
50
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_future_tense] }
|
51
|
-
)
|
52
|
-
end
|
53
|
-
|
54
|
-
def passive_voice_indicative_mood_imperfect_tense
|
55
|
-
ministem = stem + "ēbā"
|
56
|
-
elems = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.map{|x| ministem + x}
|
57
|
-
return TenseBlock.new(
|
58
|
-
elems,
|
59
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_imperfect_tense] }
|
60
|
-
)
|
61
|
-
end
|
62
|
-
|
63
|
-
def passive_voice_indicative_mood_present_tense
|
64
|
-
return TenseBlock.new(
|
65
|
-
[first_person_singular+"r",
|
66
|
-
Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_OTHER[1..-1].map{|x| stem + x}].flatten!,
|
67
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_present_tense] }
|
68
|
-
)
|
69
|
-
end
|
70
|
-
|
71
|
-
def passive_voice_subjunctive_mood_present_tense
|
72
|
-
subjunctive_stem = verb_type.to_s =~ /O$/i ? stem + "iā" : stem + "ā"
|
73
|
-
elems = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.map do |ending|
|
74
|
-
subjunctive_stem + ending
|
75
|
-
end
|
76
|
-
TenseBlock.new(
|
77
|
-
elems,
|
78
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_subjunctive_mood_present_tense] }
|
79
|
-
)
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
@@ -1,91 +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 ThirdIO
|
9
|
-
def active_voice_indicative_mood_future_tense
|
10
|
-
return TenseBlock.new(
|
11
|
-
[Linguistics::Latin::Verb::LatinVerb::AF_OTHER_ENDINGS.collect{|x| stem + "i" + x}].flatten,
|
12
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_future_tense] }
|
13
|
-
)
|
14
|
-
end
|
15
|
-
|
16
|
-
def active_voice_indicative_mood_imperfect_tense
|
17
|
-
return TenseBlock.new(
|
18
|
-
[Linguistics::Latin::Verb::LatinVerb::AI_THIRD_CONJUG_PERS_ENDINGS.collect{ |x| stem + "i" + x } ].flatten!,
|
19
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_imperfect_tense] }
|
20
|
-
)
|
21
|
-
end
|
22
|
-
|
23
|
-
def active_voice_indicative_mood_present_tense
|
24
|
-
return TenseBlock.new(
|
25
|
-
[ first_person_singular, Linguistics::Latin::Verb::LatinVerb::AP_THIRDIO_CONJG_PERS_ENDINGS.collect{ |ending| stem + ending } ].flatten!,
|
26
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_indicative_mood_present_tense] }
|
27
|
-
)
|
28
|
-
end
|
29
|
-
|
30
|
-
def active_voice_subjunctive_mood_present_tense
|
31
|
-
key = verb_type.to_s.split(/::/).last.to_sym
|
32
|
-
|
33
|
-
TenseBlock.new(
|
34
|
-
['m',
|
35
|
-
Linguistics::Latin::Verb::LatinVerb::AP_FIRST_AND_SECOND_CONJUG_PERS_ENDINGS].flatten!.map do |ending|
|
36
|
-
Linguistics::Latin::Verb::LatinVerb::ACTIVE_PRESENT_SUBJUNCTIVE_ENDINGS[key].call(@stem) + ending
|
37
|
-
end,
|
38
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:active_voice_subjunctive_mood_present_tense] }
|
39
|
-
)
|
40
|
-
end
|
41
|
-
|
42
|
-
def passive_voice_indicative_mood_future_tense
|
43
|
-
ie_base = stem+"iē"
|
44
|
-
elems = [
|
45
|
-
stem+"ia"+Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG[0],
|
46
|
-
Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG[1..-1].map{|x| ie_base + x}
|
47
|
-
].flatten!
|
48
|
-
TenseBlock.new(
|
49
|
-
elems,
|
50
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_future_tense] }
|
51
|
-
)
|
52
|
-
end
|
53
|
-
|
54
|
-
def passive_voice_indicative_mood_imperfect_tense
|
55
|
-
base = stem+"iēbā"
|
56
|
-
elems = [Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.map{|x| base + x}].flatten!
|
57
|
-
return TenseBlock.new(
|
58
|
-
elems,
|
59
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_imperfect_tense] }
|
60
|
-
)
|
61
|
-
end
|
62
|
-
|
63
|
-
def passive_voice_indicative_mood_present_tense
|
64
|
-
base = stem+"i"
|
65
|
-
elems = [
|
66
|
-
first_person_singular+"r",
|
67
|
-
Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_OTHER[1..-2].map{|x| stem + x},
|
68
|
-
base+Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_OTHER[-1]
|
69
|
-
].flatten!
|
70
|
-
return TenseBlock.new(
|
71
|
-
elems,
|
72
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_indicative_mood_present_tense] }
|
73
|
-
)
|
74
|
-
end
|
75
|
-
|
76
|
-
def passive_voice_subjunctive_mood_present_tense
|
77
|
-
subjunctive_stem = verb_type.to_s =~ /O$/i ? stem + "iā" : stem + "ā"
|
78
|
-
elems = Linguistics::Latin::Verb::LatinVerb::PASSIVE_ENDINGS_FIRST_AND_SECOND_CONJG.map do |ending|
|
79
|
-
subjunctive_stem + ending
|
80
|
-
end
|
81
|
-
TenseBlock.new(
|
82
|
-
elems,
|
83
|
-
{ :meaning => Linguistics::Latin::Verb::LatinVerb::MEANINGS[:passive_voice_subjunctive_mood_present_tense] }
|
84
|
-
)
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
@@ -1,36 +0,0 @@
|
|
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 TestDeserializeInfinitives < MiniTest::Unit::TestCase # :nodoc:
|
10
|
-
def test_deser_basic
|
11
|
-
json_string=<<EOJSON
|
12
|
-
{
|
13
|
-
"infinitives":{
|
14
|
-
"json_class": "Linguistics::Latin::Verb::InfinitiveBlock",
|
15
|
-
"data": {
|
16
|
-
"present_active_infinitive": "amāre",
|
17
|
-
"present_passive_infinitive": "amārī",
|
18
|
-
|
19
|
-
"perfect_active_infinitive": "amāvīsse",
|
20
|
-
"perfect_passive_infinitive": "amatum",
|
21
|
-
|
22
|
-
"future_active_infinitive ": "amatūrus esse",
|
23
|
-
"future_passive_infinitive": "amatum īri"
|
24
|
-
}
|
25
|
-
}
|
26
|
-
}
|
27
|
-
EOJSON
|
28
|
-
|
29
|
-
ds = JSON.parse json_string
|
30
|
-
ib = ds['infinitives']
|
31
|
-
assert_equal 6, ib.infinitive_methods.length
|
32
|
-
assert_equal 'amatum', ib.perfect_passive_infinitive
|
33
|
-
assert_equal 'amāre', ib.present_active_infinitive
|
34
|
-
end
|
35
|
-
|
36
|
-
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|