latinverb 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. data/Gemfile +4 -1
  2. data/Gemfile.lock +24 -0
  3. data/Guardfile +10 -0
  4. data/README.markdown +1 -1
  5. data/Rakefile +12 -9
  6. data/latinverb.gemspec +4 -0
  7. data/lib/latinverb/chart.rb +5 -5
  8. data/lib/latinverb/version.rb +1 -1
  9. data/lib/latinverb.rb +266 -534
  10. data/lib/linguistics/latin/verb/classification_types.rb +19 -17
  11. data/lib/linguistics/latin/verb/constants.rb +14 -14
  12. data/lib/linguistics/latin/verb/deponent_tense_methods.rb +8 -21
  13. data/lib/linguistics/latin/verb/imperative_block.rb +118 -0
  14. data/lib/linguistics/latin/verb/infinitive_block.rb +39 -0
  15. data/lib/linguistics/latin/verb/infinitives.rb +181 -181
  16. data/lib/linguistics/latin/verb/irregulars.rb +74 -74
  17. data/lib/linguistics/latin/verb/latinverb/classmethods.rb +36 -117
  18. data/lib/linguistics/latin/verb/latinverb/data.rb +12 -15
  19. data/lib/linguistics/latin/verb/latinverb/defective_checker.rb +17 -0
  20. data/lib/linguistics/latin/verb/latinverb/deponent.rb +159 -0
  21. data/lib/linguistics/latin/verb/latinverb/display.rb +1 -2
  22. data/lib/linguistics/latin/verb/latinverb/impersonal.rb +34 -0
  23. data/lib/linguistics/latin/verb/latinverb/irregular.rb +83 -0
  24. data/lib/linguistics/latin/verb/latinverb/latin_verb_type_evaluator.rb +32 -0
  25. data/lib/linguistics/latin/verb/latinverb/latinverb_classifier.rb +100 -0
  26. data/lib/linguistics/latin/verb/latinverb/latinverb_input_sanitizer.rb +32 -0
  27. data/lib/linguistics/latin/verb/latinverb/latinverb_pp_extractor.rb +106 -0
  28. data/lib/linguistics/latin/verb/latinverb/metaprogramming.rb +30 -29
  29. data/lib/linguistics/latin/verb/latinverb/semideponent.rb +28 -0
  30. data/lib/linguistics/latin/verb/latinverb/validation.rb +5 -29
  31. data/lib/linguistics/latin/verb/latinverb/verbvector_description.rb +50 -0
  32. data/lib/linguistics/latin/verb/participle_block.rb +36 -0
  33. data/lib/linguistics/latin/verb/participles.rb +25 -25
  34. data/lib/linguistics/latin/verb/phonographia.rb +51 -51
  35. data/lib/linguistics/latin/verb/supine.rb +6 -6
  36. data/lib/linguistics/latin/verb/tense_block.rb +227 -0
  37. data/lib/linguistics/latin/verb/tense_definitions/first.rb +92 -0
  38. data/lib/linguistics/latin/verb/tense_definitions/fourth.rb +92 -0
  39. data/lib/linguistics/latin/verb/tense_definitions/impersonal.rb +25 -0
  40. data/lib/linguistics/latin/verb/tense_definitions/invariant.rb +613 -0
  41. data/lib/linguistics/latin/verb/tense_definitions/irregular.rb +82 -0
  42. data/lib/linguistics/latin/verb/tense_definitions/second.rb +97 -0
  43. data/lib/linguistics/latin/verb/tense_definitions/third.rb +86 -0
  44. data/lib/linguistics/latin/verb/tense_definitions/third_io.rb +91 -0
  45. data/test/testClusterResolution.rb +0 -1
  46. data/test/testDataStructures.rb +8 -5
  47. data/test/testDefectSemiImp.rb +9 -10
  48. data/test/testDeponentFirstConjugation.rb +2 -2
  49. data/test/testDeponentFourthConjugation.rb +2 -2
  50. data/test/testDeponentSecondConjugation.rb +2 -2
  51. data/test/testDeponentThirdConjugation.rb +2 -2
  52. data/test/testDeponentThirdIOConjugation.rb +2 -2
  53. data/test/testDeserializeInfinitives.rb +2 -4
  54. data/test/testFirstConjugation.rb +53 -53
  55. data/test/testFourthConjugation.rb +11 -11
  56. data/test/testFreakishVerbs.rb +12 -11
  57. data/test/testIrregulars.rb +24 -23
  58. data/test/testLatinVerb.rb +46 -55
  59. data/test/testSecondConjugation.rb +27 -27
  60. data/test/testThirdConjugation.rb +14 -14
  61. data/test/testThirdIOConjugation.rb +13 -13
  62. metadata +95 -53
  63. data/lib/linguistics/latin/verb/latinverb/auxiliary_classes.rb +0 -208
  64. data/lib/linguistics/latin/verb/tense_methods.rb +0 -950
@@ -3,9 +3,9 @@
3
3
  require 'latinverb'
4
4
  require 'linguistics/latin/verb/phonographia'
5
5
 
6
- module Linguistics
7
- module Latin
8
- module Verb
6
+ module Linguistics
7
+ module Latin
8
+ module Verb
9
9
  ##
10
10
  # == NAME
11
11
  #
@@ -24,189 +24,189 @@ module Linguistics
24
24
  #
25
25
  # 1. The Infinitive is strictly the locative case of an abstract
26
26
  # noun, expressing the action of the verb (cf. sec. 451)
27
- #
27
+ #
28
28
  #
29
29
  ##
30
30
  module Infinitives
31
31
 
32
- ##########################################
33
- # Infinitives
34
- ##########################################
35
- # Some very handy getter and setters, for serialization
36
- ##
32
+ ##########################################
33
+ # Infinitives
34
+ ##########################################
35
+ # Some very handy getter and setters, for serialization
36
+ ##
37
37
 
38
- def infinitives
39
- return {
40
- :present_active_infinitive => present_active_infinitive,
41
- :perfect_active_infinitive => perfect_active_infinitive,
42
- :future_active_infinitive => future_active_infinitive,
43
- :present_passive_infinitive => present_passive_infinitive,
44
- :perfect_passive_infinitive => perfect_passive_infinitive,
45
- :future_passive_infinitive => future_passive_infinitive
46
- }
47
- end
38
+ def infinitives
39
+ return {
40
+ :present_active_infinitive => present_active_infinitive,
41
+ :perfect_active_infinitive => perfect_active_infinitive,
42
+ :future_active_infinitive => future_active_infinitive,
43
+ :present_passive_infinitive => present_passive_infinitive,
44
+ :perfect_passive_infinitive => perfect_passive_infinitive,
45
+ :future_passive_infinitive => future_passive_infinitive
46
+ }
47
+ end
48
48
 
49
- ##
50
- #
51
- # === GRAMMATICAL FUNCTION
52
- #
53
- # A&G, 157,d:
54
- #
55
- # The Infinitive is used chiefly as an indeclinable noun, as the subject
56
- # or complement of another ver ( 452, 456.n)
57
- #
58
- # "To X"
59
- #
60
- # === ARGUMENTS
61
- #
62
- # None
63
- #
64
- # === RETURNS
65
- #
66
- # Array of participles
67
- #
68
- ###
69
- def present_active_infinitive
70
- return @pres_act_inf
71
- end
72
-
73
- ##
74
- #
75
- # === GRAMMATICAL FUNCTION
76
- #
77
- # A&G, 157,d:
78
- #
79
- # The Infinitive is used chiefly as an indeclinable noun, as the subject
80
- # or complement of another ver ( 452, 456.n)
81
- #
82
- # "To have X-d"
83
- #
84
- # === ARGUMENTS
85
- #
86
- # None
87
- #
88
- # === RETURNS
89
- #
90
- # Array of participles
91
- #
92
- ###
93
- def perfect_active_infinitive
94
- return @first_pers_perf+"sse"
95
- end
96
-
97
- ##
98
- #
99
- # === GRAMMATICAL FUNCTION
100
- #
101
- # A&G, 157,d:
102
- #
103
- # The Infinitive is used chiefly as an indeclinable noun, as the subject
104
- # or complement of another ver ( 452, 456.n)
105
- #
106
- # "To be about to X"
107
- #
108
- # === ARGUMENTS
109
- #
110
- # None
111
- #
112
- # === RETURNS
113
- #
114
- # Array of participles
115
- #
116
- ###
117
- def future_active_infinitive
118
- return future_active_participle.sub(/,.*/,'') + " esse"
119
- end
120
-
121
- ##
122
- #
123
- # === GRAMMATICAL FUNCTION
124
- #
125
- # A&G, 157,d:
126
- #
127
- # The Infinitive is used chiefly as an indeclinable noun, as the subject
128
- # or complement of another ver ( 452, 456.n)
129
- #
130
- # "To be X-d"
131
- #
132
- # === ARGUMENTS
133
- #
134
- # None
135
- #
136
- # === RETURNS
137
- #
138
- # Array of participles
139
- #
140
- ###
141
- def present_passive_infinitive
142
- if @classification == Linguistics::Latin::Verb::VerbTypes::First
143
- return @pres_act_inf.gsub(/(.*)e$/,"\\1\xc4\xab")
144
- end
145
- if @classification == Linguistics::Latin::Verb::VerbTypes::Second
146
- return @pres_act_inf.gsub(/(.*)e$/,"\\1\xc4\xab")
147
- end
148
- if @classification == Linguistics::Latin::Verb::VerbTypes::ThirdIO
149
- return @pres_act_inf.gsub(/(.*)ere$/,"\\1\xc4\xab")
150
- end
151
- if @classification == Linguistics::Latin::Verb::VerbTypes::Third
152
- return @pres_act_inf.gsub(/(.*)ere$/,"\\1\xc4\xab")
153
- end
154
- if @classification == Linguistics::Latin::Verb::VerbTypes::Fourth
155
- return @pres_act_inf.gsub(/(.*)e$/,"\\1\xc4\xab")
156
- end
157
- end
158
-
159
- ##
160
- #
161
- # === GRAMMATICAL FUNCTION
162
- #
163
- # A&G, 157,d:
164
- #
165
- # The Infinitive is used chiefly as an indeclinable noun, as the subject
166
- # or complement of another ver ( 452, 456.n)
167
- #
168
- # "To have been X-d"
169
- #
170
- # === ARGUMENTS
171
- #
172
- # None
173
- #
174
- # === RETURNS
175
- #
176
- # Array of participles
177
- #
178
- ###
179
- def perfect_passive_infinitive
180
- return perfect_passive_participle + " esse"
181
- end
49
+ ##
50
+ #
51
+ # === GRAMMATICAL FUNCTION
52
+ #
53
+ # A&G, 157,d:
54
+ #
55
+ # The Infinitive is used chiefly as an indeclinable noun, as the subject
56
+ # or complement of another ver ( 452, 456.n)
57
+ #
58
+ # "To X"
59
+ #
60
+ # === ARGUMENTS
61
+ #
62
+ # None
63
+ #
64
+ # === RETURNS
65
+ #
66
+ # Array of participles
67
+ #
68
+ ###
69
+ def present_active_infinitive
70
+ return @present_active_infinitive
71
+ end
182
72
 
183
- ##
184
- #
185
- # === GRAMMATICAL FUNCTION
186
- #
187
- # A&G, 157,d:
188
- #
189
- # The Infinitive is used chiefly as an indeclinable noun, as the subject
190
- # or complement of another ver ( 452, 456.n)
191
- #
192
- # "To be about to be X-d"
193
- #
194
- # <b>Note:</b> This form is exceedingly rare. Wheelock notes that
195
- # Romans preferred to use the 4th principal part + <b>fore</b>.
196
- #
197
- # === ARGUMENTS
198
- #
199
- # None
200
- #
201
- # === RETURNS
202
- #
203
- # Array of participles
204
- #
205
- ###
206
- def future_passive_infinitive
207
- return supine[:accusative] + " īrī"
208
- end
209
- end
210
- end
211
- end
73
+ ##
74
+ #
75
+ # === GRAMMATICAL FUNCTION
76
+ #
77
+ # A&G, 157,d:
78
+ #
79
+ # The Infinitive is used chiefly as an indeclinable noun, as the subject
80
+ # or complement of another ver ( 452, 456.n)
81
+ #
82
+ # "To have X-d"
83
+ #
84
+ # === ARGUMENTS
85
+ #
86
+ # None
87
+ #
88
+ # === RETURNS
89
+ #
90
+ # Array of participles
91
+ #
92
+ ###
93
+ def perfect_active_infinitive
94
+ return @first_person_perfect+"sse"
95
+ end
96
+
97
+ ##
98
+ #
99
+ # === GRAMMATICAL FUNCTION
100
+ #
101
+ # A&G, 157,d:
102
+ #
103
+ # The Infinitive is used chiefly as an indeclinable noun, as the subject
104
+ # or complement of another ver ( 452, 456.n)
105
+ #
106
+ # "To be about to X"
107
+ #
108
+ # === ARGUMENTS
109
+ #
110
+ # None
111
+ #
112
+ # === RETURNS
113
+ #
114
+ # Array of participles
115
+ #
116
+ ###
117
+ def future_active_infinitive
118
+ return future_active_participle.sub(/,.*/,'') + " esse"
119
+ end
120
+
121
+ ##
122
+ #
123
+ # === GRAMMATICAL FUNCTION
124
+ #
125
+ # A&G, 157,d:
126
+ #
127
+ # The Infinitive is used chiefly as an indeclinable noun, as the subject
128
+ # or complement of another ver ( 452, 456.n)
129
+ #
130
+ # "To be X-d"
131
+ #
132
+ # === ARGUMENTS
133
+ #
134
+ # None
135
+ #
136
+ # === RETURNS
137
+ #
138
+ # Array of participles
139
+ #
140
+ ###
141
+ def present_passive_infinitive
142
+ if verb_type == Linguistics::Latin::Verb::VerbTypes::First
143
+ return @present_active_infinitive.gsub(/(.*)e$/,"\\1ī")
144
+ end
145
+ if verb_type == Linguistics::Latin::Verb::VerbTypes::Second
146
+ return @present_active_infinitive.gsub(/(.*)e$/,"\\1ī")
147
+ end
148
+ if verb_type == Linguistics::Latin::Verb::VerbTypes::ThirdIO
149
+ return @present_active_infinitive.gsub(/(.*)ere$/,"\\1ī")
150
+ end
151
+ if verb_type == Linguistics::Latin::Verb::VerbTypes::Third
152
+ return @present_active_infinitive.gsub(/(.*)ere$/,"\\1ī")
153
+ end
154
+ if verb_type == Linguistics::Latin::Verb::VerbTypes::Fourth
155
+ return @present_active_infinitive.gsub(/(.*)e$/,"\\1ī")
156
+ end
157
+ end
158
+
159
+ ##
160
+ #
161
+ # === GRAMMATICAL FUNCTION
162
+ #
163
+ # A&G, 157,d:
164
+ #
165
+ # The Infinitive is used chiefly as an indeclinable noun, as the subject
166
+ # or complement of another ver ( 452, 456.n)
167
+ #
168
+ # "To have been X-d"
169
+ #
170
+ # === ARGUMENTS
171
+ #
172
+ # None
173
+ #
174
+ # === RETURNS
175
+ #
176
+ # Array of participles
177
+ #
178
+ ###
179
+ def perfect_passive_infinitive
180
+ return perfect_passive_participle + " esse"
181
+ end
182
+
183
+ ##
184
+ #
185
+ # === GRAMMATICAL FUNCTION
186
+ #
187
+ # A&G, 157,d:
188
+ #
189
+ # The Infinitive is used chiefly as an indeclinable noun, as the subject
190
+ # or complement of another ver ( 452, 456.n)
191
+ #
192
+ # "To be about to be X-d"
193
+ #
194
+ # <b>Note:</b> This form is exceedingly rare. Wheelock notes that
195
+ # Romans preferred to use the 4th principal part + <b>fore</b>.
196
+ #
197
+ # === ARGUMENTS
198
+ #
199
+ # None
200
+ #
201
+ # === RETURNS
202
+ #
203
+ # Array of participles
204
+ #
205
+ ###
206
+ def future_passive_infinitive
207
+ return supine[:accusative] + " īrī"
208
+ end
209
+ end
210
+ end
211
+ end
212
212
  end