latinverb 0.2.0 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. data/.gitignore +0 -1
  2. data/Gemfile +1 -2
  3. data/README.markdown +54 -240
  4. data/etc/irreg_skel.json +104 -0
  5. data/{latinirb.gemspec → latinverb.gemspec} +4 -4
  6. data/lib/latinverb/chart.rb +94 -0
  7. data/lib/latinverb/version.rb +10 -0
  8. data/lib/latinverb.rb +710 -0
  9. data/lib/linguistics/latin/verb/classification_types.rb +59 -0
  10. data/lib/linguistics/latin/verb/constants.rb +201 -0
  11. data/lib/linguistics/latin/verb/deponent_tense_methods.rb +98 -0
  12. data/lib/linguistics/latin/verb/infinitives.rb +212 -0
  13. data/lib/linguistics/latin/verb/irregulars.rb +4393 -0
  14. data/lib/linguistics/latin/verb/latinverb/auxiliary_classes.rb +208 -0
  15. data/lib/linguistics/latin/verb/latinverb/classmethods.rb +215 -0
  16. data/lib/linguistics/latin/verb/latinverb/data.rb +90 -0
  17. data/lib/linguistics/latin/verb/latinverb/display.rb +23 -0
  18. data/lib/linguistics/latin/verb/latinverb/metaprogramming.rb +79 -0
  19. data/lib/linguistics/latin/verb/latinverb/validation.rb +66 -0
  20. data/lib/linguistics/latin/verb/participles.rb +202 -0
  21. data/lib/linguistics/latin/verb/phonographia.rb +109 -0
  22. data/lib/linguistics/latin/verb/supine.rb +42 -0
  23. data/lib/linguistics/latin/verb/tense_methods.rb +950 -0
  24. data/test/testAmbiguousLookups.rb +30 -0
  25. data/test/testClusterResolution.rb +20 -0
  26. data/test/testDataStructures.rb +29 -0
  27. data/test/testDefectSemiImp.rb +111 -0
  28. data/test/testDeponentFirstConjugation.rb +64 -0
  29. data/test/testDeponentFourthConjugation.rb +64 -0
  30. data/test/testDeponentSecondConjugation.rb +64 -0
  31. data/test/testDeponentThirdConjugation.rb +64 -0
  32. data/test/testDeponentThirdIOConjugation.rb +64 -0
  33. data/test/testDeserializeInfinitives.rb +38 -0
  34. data/test/testFirstConjugation.rb +388 -0
  35. data/test/testFourthConjugation.rb +190 -0
  36. data/test/testFreakishVerbs.rb +93 -0
  37. data/test/testImperativeBlock.rb +27 -0
  38. data/test/testIrregularSum.rb +22 -0
  39. data/test/testIrregulars.rb +652 -0
  40. data/test/testLatinVerb.rb +195 -0
  41. data/test/testMacronRules.rb +19 -0
  42. data/test/testSecondConjugation.rb +189 -0
  43. data/test/testThirdConjugation.rb +190 -0
  44. data/test/testThirdIOConjugation.rb +190 -0
  45. metadata +70 -18
  46. data/bin/latinirb.rb +0 -7
  47. data/latinverb.rb +0 -544
  48. data/lib/LatinIRB.rb +0 -172
  49. data/lib/latinirb/paradigmatic_verbs.rb +0 -17
  50. data/lib/latinirb/version.rb +0 -10
  51. data/lib/latirb.rb +0 -20
data/.gitignore CHANGED
@@ -1,5 +1,4 @@
1
1
  pkg/*
2
- .DS_*
3
2
  *.gem
4
3
  *.sw?
5
4
  *.vim
data/Gemfile CHANGED
@@ -1,6 +1,5 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- # Specify your gem's dependencies in latinirb.gemspec
3
+ # Specify your gem's dependencies in latinverb.gemspec
4
4
  gemspec
5
5
  macronconversions
6
- latinverb
data/README.markdown CHANGED
@@ -1,249 +1,63 @@
1
- # LatinIRB
1
+ # LatinVerb
2
2
 
3
3
  ## DESCRIPTION
4
4
 
5
- LatinIRB is an IRB session in which a user can interact with paradigmatic
6
- Latin verbs (`@aFirst`, `@aSecond`, `@aThird`, `@aThirdIO`, `@aFourth`) as
7
- calculated heuristically by the LatinVerb library.
5
+ ### SUMMARY
8
6
 
9
- The methods of chief interest will be those that are _vectors_ within the
10
- LatinVerb parlance i.e. methods that uniquely identify a specific conjugated
11
- form of a verb.
7
+ LatinVerb is a library, written in Ruby, that is used to make dealing with
8
+ verb objects, and in particular Latin verbs, easier. By providing a
9
+ definitional string like: `amō amāre amāvī amatum`, LatinVerb will generate
10
+ the 100+ forms and allow you to access them via method calls like
11
+ `passive_voice_subjunctive_mood_imperfect_tense_third_person_singular_number`
12
+ and get back `amaretur`.
12
13
 
13
- An primary use case would be:
14
-
15
- @aFirst.active\_voice\_indicative\_mood\_present\_tense\_first\_person\_singular\_number #=> amō
16
-
17
- Upon opening the script, the student may play with verbs offered for
18
- exploration. These are the standard paradigmatics verbs presented in
19
- Wheelock:
20
-
21
- <table>
22
- <tr><th>Varible </th> <th>Parts </th> <th> Meaning</th></tr>
23
- <tr><td>@aFirst </td> <td>amō amāre amāvī amatum </td> <td> to love / like</td></tr>
24
- <tr><td>@aSecond </td> <td>moneō monēre monvī monitum</td> <td> to warn / advise</td></tr>
25
- <tr><td>@aThird </td> <td>agō agere ēgī actum </td> <td> to do / lead / undertake</td></tr>
26
- <tr><td>@aThirdIO</td> <td>capiō capere cēpī captum </td> <td> to grab / seize</td></tr>
27
- <tr><td>@aFourth </td> <td>audiō audīre audīvī auditum</td> <td> to hear</td></tr>
28
- </table>
29
-
30
- ## INSTANTIATING
31
-
32
- Because LatinVerb attempts to preserve the phonographic data of a Latin verb,
33
- the quantity of the vowels, the LatinVerb-definining string _must_ contain the
34
- macron data so that the heuristics work. To this end, you may use
35
- MacronConversions to convert ASCII TeX-style transliterations of macronized
36
- vowels to produce the correct string:
37
-
38
- lv = LatinVerb.new(Text::Latex::Util::Macronconversions.convert('am\={o} am\={a}re am\={a}v\={i} amatum', :mc))
39
- lv.active\_voice\_indicative\_mood\_present\_tense\_first\_person\_singular\_number #=> amō
40
-
41
- ## VIEWING
42
-
43
- The environment takes advantage of Ruby's UTF-8 support to display the verbs
44
- with macrons (notation representing the quantity of the vowels). I recommend
45
- that you use urxvt or Apple's Terminal.app for viewing these entries.
46
-
47
- ## GENERATING VERBS
48
-
49
- Typically, in the code I have used the macron-ized character because Textmate and my Terminal of choice
50
- both understand it.
51
-
52
- LatinVerb.new %w(amō amāre amāvī amatum)
53
-
54
- ## EXECUTING METHODS
55
-
56
- Every verb in latin is a "vector" comprised of the voice / mood / tense /
57
- number / and person
58
-
59
- ### CHART VIEW
60
-
61
- *Currently Unimplemented: 1 June 2011: Implementation underway*
62
-
63
- To view the chart of a verb, use LatinVerb.chart\_display. This is a basic
64
- chart that will look familiar to students.
65
-
66
- ### SINGULAR VECTOR
67
-
68
- As such methods are of the form
69
-
70
- (active|passive)\_voice\_(indicative|subjunctive)\_mood\_(present|imperfect|perfect|pastperfect|futureperfect|etc.)tense\_first\_person\_singular\_number
71
-
72
- This will return a single value. Where the result is ambiguous (e.g. 'number' is not provided) multiple values are returned.
73
- an exhaustive list of options follows below.
74
-
75
- ### MULTIPLEX VECTORS
76
-
77
- Several convenience methods exist which load multiple tenses at the same time such as "present system" or "perfect system". These
78
- methods load the tenses into the @collections iVar associated with the LatinVerb. This value can be accessed as @collections
79
- is shared per attr\_reader
80
-
81
-
82
- ### Comprehensive List of Singular Vectors
83
-
84
- * LatinVerb.active\_voice\_indicative\_mood\_present\_tense\_first\_person\_singular\_number
85
- * LatinVerb.active\_voice\_indicative\_mood\_present\_tense\_second\_person\_singular\_number
86
- * LatinVerb.active\_voice\_indicative\_mood\_present\_tense\_third\_person\_singular\_number
87
- * LatinVerb.active\_voice\_indicative\_mood\_present\_tense\_first\_person\_plural\_number
88
- * LatinVerb.active\_voice\_indicative\_mood\_present\_tense\_second\_person\_plural\_number
89
- * LatinVerb.active\_voice\_indicative\_mood\_present\_tense\_third\_person\_plural\_number
90
-
91
- * LatinVerb.active\_voice\_indicative\_mood\_imperfect\_tense\_first\_person\_singular\_number
92
- * LatinVerb.active\_voice\_indicative\_mood\_imperfect\_tense\_second\_person\_singular\_number
93
- * LatinVerb.active\_voice\_indicative\_mood\_imperfect\_tense\_third\_person\_singular\_number
94
- * LatinVerb.active\_voice\_indicative\_mood\_imperfect\_tense\_first\_person\_plural\_number
95
- * LatinVerb.active\_voice\_indicative\_mood\_imperfect\_tense\_second\_person\_plural\_number
96
- * LatinVerb.active\_voice\_indicative\_mood\_imperfect\_tense\_third\_person\_plural\_number
97
-
98
- * LatinVerb.active\_voice\_indicative\_mood\_future\_tense\_first\_person\_singular\_number
99
- * LatinVerb.active\_voice\_indicative\_mood\_future\_tense\_second\_person\_singular\_number
100
- * LatinVerb.active\_voice\_indicative\_mood\_future\_tense\_third\_person\_singular\_number
101
- * LatinVerb.active\_voice\_indicative\_mood\_future\_tense\_first\_person\_plural\_number
102
- * LatinVerb.active\_voice\_indicative\_mood\_future\_tense\_second\_person\_plural\_number
103
- * LatinVerb.active\_voice\_indicative\_mood\_future\_tense\_third\_person\_plural\_number
104
-
105
- * LatinVerb.active\_voice\_indicative\_mood\_perfect\_tense\_first\_person\_singular\_number
106
- * LatinVerb.active\_voice\_indicative\_mood\_perfect\_tense\_second\_person\_singular\_number
107
- * LatinVerb.active\_voice\_indicative\_mood\_perfect\_tense\_third\_person\_singular\_number
108
- * LatinVerb.active\_voice\_indicative\_mood\_perfect\_tense\_first\_person\_plural\_number
109
- * LatinVerb.active\_voice\_indicative\_mood\_perfect\_tense\_second\_person\_plural\_number
110
- * LatinVerb.active\_voice\_indicative\_mood\_perfect\_tense\_third\_person\_plural\_number
111
-
112
- * LatinVerb.active\_voice\_indicative\_mood\_pastperfect\_tense\_first\_person\_singular\_number
113
- * LatinVerb.active\_voice\_indicative\_mood\_pastperfect\_tense\_second\_person\_singular\_number
114
- * LatinVerb.active\_voice\_indicative\_mood\_pastperfect\_tense\_third\_person\_singular\_number
115
- * LatinVerb.active\_voice\_indicative\_mood\_pastperfect\_tense\_first\_person\_plural\_number
116
- * LatinVerb.active\_voice\_indicative\_mood\_pastperfect\_tense\_second\_person\_plural\_number
117
- * LatinVerb.active\_voice\_indicative\_mood\_pastperfect\_tense\_third\_person\_plural\_number
118
-
119
- * LatinVerb.active\_voice\_indicative\_mood\_futureperfect\_tense\_first\_person\_singular\_number
120
- * LatinVerb.active\_voice\_indicative\_mood\_futureperfect\_tense\_second\_person\_singular\_number
121
- * LatinVerb.active\_voice\_indicative\_mood\_futureperfect\_tense\_third\_person\_singular\_number
122
- * LatinVerb.active\_voice\_indicative\_mood\_futureperfect\_tense\_first\_person\_plural\_number
123
- * LatinVerb.active\_voice\_indicative\_mood\_futureperfect\_tense\_second\_person\_plural\_number
124
- * LatinVerb.active\_voice\_indicative\_mood\_futureperfect\_tense\_third\_person\_plural\_number
125
-
126
- * LatinVerb.passive\_voice\_indicative\_mood\_present\_tense\_first\_person\_singular\_number
127
- * LatinVerb.passive\_voice\_indicative\_mood\_present\_tense\_second\_person\_singular\_number
128
- * LatinVerb.passive\_voice\_indicative\_mood\_present\_tense\_third\_person\_singular\_number
129
- * LatinVerb.passive\_voice\_indicative\_mood\_present\_tense\_first\_person\_plural\_number
130
- * LatinVerb.passive\_voice\_indicative\_mood\_present\_tense\_second\_person\_plural\_number
131
- * LatinVerb.passive\_voice\_indicative\_mood\_present\_tense\_third\_person\_plural\_number
132
-
133
- * LatinVerb.passive\_voice\_indicative\_mood\_imperfect\_tense\_first\_person\_singular\_number
134
- * LatinVerb.passive\_voice\_indicative\_mood\_imperfect\_tense\_second\_person\_singular\_number
135
- * LatinVerb.passive\_voice\_indicative\_mood\_imperfect\_tense\_third\_person\_singular\_number
136
- * LatinVerb.passive\_voice\_indicative\_mood\_imperfect\_tense\_first\_person\_plural\_number
137
- * LatinVerb.passive\_voice\_indicative\_mood\_imperfect\_tense\_second\_person\_plural\_number
138
- * LatinVerb.passive\_voice\_indicative\_mood\_imperfect\_tense\_third\_person\_plural\_number
139
-
140
- * LatinVerb.passive\_voice\_indicative\_mood\_future\_tense\_first\_person\_singular\_number
141
- * LatinVerb.passive\_voice\_indicative\_mood\_future\_tense\_second\_person\_singular\_number
142
- * LatinVerb.passive\_voice\_indicative\_mood\_future\_tense\_third\_person\_singular\_number
143
- * LatinVerb.passive\_voice\_indicative\_mood\_future\_tense\_first\_person\_plural\_number
144
- * LatinVerb.passive\_voice\_indicative\_mood\_future\_tense\_second\_person\_plural\_number
145
- * LatinVerb.passive\_voice\_indicative\_mood\_future\_tense\_third\_person\_plural\_number
146
-
147
- * LatinVerb.passive\_voice\_indicative\_mood\_perfect\_tense\_first\_person\_singular\_number
148
- * LatinVerb.passive\_voice\_indicative\_mood\_perfect\_tense\_second\_person\_singular\_number
149
- * LatinVerb.passive\_voice\_indicative\_mood\_perfect\_tense\_third\_person\_singular\_number
150
- * LatinVerb.passive\_voice\_indicative\_mood\_perfect\_tense\_first\_person\_plural\_number
151
- * LatinVerb.passive\_voice\_indicative\_mood\_perfect\_tense\_second\_person\_plural\_number
152
- * LatinVerb.passive\_voice\_indicative\_mood\_perfect\_tense\_third\_person\_plural\_number.to\_s)
153
-
154
- * LatinVerb.passive\_voice\_indicative\_mood\_pastperfect\_tense\_first\_person\_singular\_number
155
- * LatinVerb.passive\_voice\_indicative\_mood\_pastperfect\_tense\_second\_person\_singular\_number
156
- * LatinVerb.passive\_voice\_indicative\_mood\_pastperfect\_tense\_third\_person\_singular\_number
157
- * LatinVerb.passive\_voice\_indicative\_mood\_pastperfect\_tense\_first\_person\_plural\_number
158
- * LatinVerb.passive\_voice\_indicative\_mood\_pastperfect\_tense\_second\_person\_plural\_number
159
- * LatinVerb.passive\_voice\_indicative\_mood\_pastperfect\_tense\_third\_person\_plural\_number.to\_s)
160
-
161
- * LatinVerb.passive\_voice\_indicative\_mood\_futureperfect\_tense\_first\_person\_singular\_number
162
- * LatinVerb.passive\_voice\_indicative\_mood\_futureperfect\_tense\_second\_person\_singular\_number
163
- * LatinVerb.passive\_voice\_indicative\_mood\_futureperfect\_tense\_third\_person\_singular\_number
164
- * LatinVerb.passive\_voice\_indicative\_mood\_futureperfect\_tense\_first\_person\_plural\_number
165
- * LatinVerb.passive\_voice\_indicative\_mood\_futureperfect\_tense\_second\_person\_plural\_number
166
- * LatinVerb.passive\_voice\_indicative\_mood\_futureperfect\_tense\_third\_person\_plural\_number
167
-
168
-
169
- * LatinVerb.active\_voice\_subjunctive\_mood\_present\_tense\_first\_person\_singular\_number
170
- * LatinVerb.active\_voice\_subjunctive\_mood\_present\_tense\_second\_person\_singular\_number
171
- * LatinVerb.active\_voice\_subjunctive\_mood\_present\_tense\_third\_person\_singular\_number
172
- * LatinVerb.active\_voice\_subjunctive\_mood\_present\_tense\_first\_person\_plural\_number
173
- * LatinVerb.active\_voice\_subjunctive\_mood\_present\_tense\_second\_person\_plural\_number
174
- * LatinVerb.active\_voice\_subjunctive\_mood\_present\_tense\_third\_person\_plural\_number
175
-
176
- * LatinVerb.active\_voice\_subjunctive\_mood\_imperfect\_tense\_first\_person\_singular\_number
177
- * LatinVerb.active\_voice\_subjunctive\_mood\_imperfect\_tense\_second\_person\_singular\_number
178
- * LatinVerb.active\_voice\_subjunctive\_mood\_imperfect\_tense\_third\_person\_singular\_number
179
- * LatinVerb.active\_voice\_subjunctive\_mood\_imperfect\_tense\_first\_person\_plural\_number
180
- * LatinVerb.active\_voice\_subjunctive\_mood\_imperfect\_tense\_second\_person\_plural\_number
181
- * LatinVerb.active\_voice\_subjunctive\_mood\_imperfect\_tense\_third\_person\_plural\_number
182
-
183
- * LatinVerb.active\_voice\_subjunctive\_mood\_perfect\_tense\_first\_person\_singular\_number
184
- * LatinVerb.active\_voice\_subjunctive\_mood\_perfect\_tense\_second\_person\_singular\_number
185
- * LatinVerb.active\_voice\_subjunctive\_mood\_perfect\_tense\_third\_person\_singular\_number
186
- * LatinVerb.active\_voice\_subjunctive\_mood\_perfect\_tense\_first\_person\_plural\_number
187
- * LatinVerb.active\_voice\_subjunctive\_mood\_perfect\_tense\_second\_person\_plural\_number
188
- * LatinVerb.active\_voice\_subjunctive\_mood\_perfect\_tense\_third\_person\_plural\_number
189
-
190
- * LatinVerb.active\_voice\_subjunctive\_mood\_pastperfect\_tense\_first\_person\_singular\_number
191
- * LatinVerb.active\_voice\_subjunctive\_mood\_pastperfect\_tense\_second\_person\_singular\_number
192
- * LatinVerb.active\_voice\_subjunctive\_mood\_pastperfect\_tense\_third\_person\_singular\_number
193
- * LatinVerb.active\_voice\_subjunctive\_mood\_pastperfect\_tense\_first\_person\_plural\_number
194
- * LatinVerb.active\_voice\_subjunctive\_mood\_pastperfect\_tense\_second\_person\_plural\_number
195
- * LatinVerb.active\_voice\_subjunctive\_mood\_pastperfect\_tense\_third\_person\_plural\_number
196
-
197
- * LatinVerb.passive\_voice\_subjunctive\_mood\_present\_tense\_first\_person\_singular\_number
198
- * LatinVerb.passive\_voice\_subjunctive\_mood\_present\_tense\_second\_person\_singular\_number
199
- * LatinVerb.passive\_voice\_subjunctive\_mood\_present\_tense\_third\_person\_singular\_number
200
- * LatinVerb.passive\_voice\_subjunctive\_mood\_present\_tense\_first\_person\_plural\_number
201
- * LatinVerb.passive\_voice\_subjunctive\_mood\_present\_tense\_second\_person\_plural\_number
202
- * LatinVerb.passive\_voice\_subjunctive\_mood\_present\_tense\_third\_person\_plural\_number
203
-
204
- * LatinVerb.passive\_voice\_subjunctive\_mood\_imperfect\_tense\_first\_person\_singular\_number
205
- * LatinVerb.passive\_voice\_subjunctive\_mood\_imperfect\_tense\_second\_person\_singular\_number
206
- * LatinVerb.passive\_voice\_subjunctive\_mood\_imperfect\_tense\_third\_person\_singular\_number
207
- * LatinVerb.passive\_voice\_subjunctive\_mood\_imperfect\_tense\_first\_person\_plural\_number
208
- * LatinVerb.passive\_voice\_subjunctive\_mood\_imperfect\_tense\_second\_person\_plural\_number
209
- * LatinVerb.passive\_voice\_subjunctive\_mood\_imperfect\_tense\_third\_person\_plural\_number
210
-
211
- * LatinVerb.passive\_voice\_subjunctive\_mood\_perfect\_tense\_first\_person\_singular\_number
212
- * LatinVerb.passive\_voice\_subjunctive\_mood\_perfect\_tense\_second\_person\_singular\_number
213
- * LatinVerb.passive\_voice\_subjunctive\_mood\_perfect\_tense\_third\_person\_singular\_number
214
- * LatinVerb.passive\_voice\_subjunctive\_mood\_perfect\_tense\_first\_person\_plural\_number
215
- * LatinVerb.passive\_voice\_subjunctive\_mood\_perfect\_tense\_second\_person\_plural\_number
216
- * LatinVerb.passive\_voice\_subjunctive\_mood\_perfect\_tense\_third\_person\_plural\_number
217
-
218
- * LatinVerb.passive\_voice\_subjunctive\_mood\_pastperfect\_tense\_first\_person\_singular\_number
219
- * LatinVerb.passive\_voice\_subjunctive\_mood\_pastperfect\_tense\_second\_person\_singular\_number
220
- * LatinVerb.passive\_voice\_subjunctive\_mood\_pastperfect\_tense\_third\_person\_singular\_number
221
- * LatinVerb.passive\_voice\_subjunctive\_mood\_pastperfect\_tense\_first\_person\_plural\_number
222
- * LatinVerb.passive\_voice\_subjunctive\_mood\_pastperfect\_tense\_second\_person\_plural\_number
223
- * LatinVerb.passive\_voice\_subjunctive\_mood\_pastperfect\_tense\_third\_person\_plural\_number
224
-
225
- * LatinVerb.imperatives[0]
226
- * LatinVerb.imperatives[1]
227
-
228
- * LatinVerb.present\_active\_participle
229
- * LatinVerb.future\_active\_participle
230
- * LatinVerb.perfect\_passive\_participle
231
- * LatinVerb.future\_passive\_participle
232
-
233
- * LatinVerb.present\_active\_infinitive
234
- * LatinVerb.perfect\_active\_infinitive
235
- * LatinVerb.future\_active\_infinitive
236
- * LatinVerb.present\_passive\_infinitive
237
- * LatinVerb.perfect\_passive\_infinitive)
14
+ ### HANDLING AMBIGUITY
238
15
 
239
- ## AUTHOR
16
+ LatinVerb also has tolerances for ambiguity. Where
17
+ passive\_voice\_subjunctive\_mood\_imperfect\_tense\_third\_person\_singular\_number
18
+ is considered a "full" vector that uniquely identifies one value, it is
19
+ possible to pass "incomplete" vectors such as
20
+ `passive\_voice\_subjunctive\_mood\_imperfect\_tense\_third\_person` which
21
+ would return two values (`amārētur` and `amārentur`). Similarly, the person
22
+ could be dropped and the number included and three values would be returned:
23
+ `amārētur`, `amārēris`, and `amārer`.
24
+
25
+ ### PHONETICS / PHONOGRAPHICS
26
+
27
+ This library deals with some particularities of Latin verbs:
28
+
29
+ * Handling Unicode storage of characters with a long sound (macron)
30
+ * Handling of macron removal as according to the pronunciation rules of Latin
31
+ (before repeated vowel, before certain consonants at end of word, etc.)
32
+ * Resolving certain vectors of specified forms: person, number, voice, mood, and
33
+ tense.
34
+
35
+ ### DYNAMICITY
36
+
37
+ Importantly, none of the values shown for the verbs are statically defined
38
+ (save irregulars). Rather, each and every conjugated verb form is generated on
39
+ the fly as a result of applying a heuristic transformation to the verb (i.e.
40
+ "take the stem and add such-and-such ending(s) to it").
41
+
42
+ ### IRREGULAR / DEPONENT SUPPORT
240
43
 
241
- Steven G. Harms (http://stevengharms.com)
44
+ LatinVerb also supports *irregular* and *deponent* verbs. It also handles
45
+ some of the "odder" types of verb (perfect only, impersonal, present only).
242
46
 
243
- ## THANKS
47
+ ### IMPROVEMENTS
48
+
49
+ This is a complete overhaul of my earlier "LatinVerb" library. The (1)
50
+ iteration did not have support for deponents or irregulars, nor was its
51
+ metaprogrammatic model as tight nor were various components properly
52
+ modularized.
53
+
54
+ ### THANKS
55
+
56
+ * Prof. James Burleson for teaching me Latin
57
+ * Lauren Roth for everything but most of all her patience
58
+ * Mike Perham for "meaning" idea to a TenseBlock
59
+
60
+
61
+ ## AUTHOR
244
62
 
245
- Thanks to the Austin Ruby coders group who answered questions that helped me put this all together. Thanks also
246
- to the Reject^{2} conference at the Lone Star Ruby Conference 2008 who helped me think through some of the
247
- metaprogrammatic approaches. Thanks to Professor James Burleson of Austin Community College who insisted,
248
- old-style, of a mastery of the rote basics of Latin. Thanks also to Lauren Roth ( http://www.laurennroth.com)
249
- for her support and encouragement and understanding of my pre-dawn hack sessions.
63
+ Steven G. Harms (github@sgharms.oib.com)
@@ -0,0 +1,104 @@
1
+ IRREGULAR_NAME=
2
+ {
3
+ "active_voice_imperative_mood_present_tense": null,
4
+ "active_voice_indicative_mood_future_tense": {
5
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
6
+ "data": [
7
+ ]
8
+ },
9
+ "active_voice_indicative_mood_futureperfect_tense": {
10
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
11
+ "data": [
12
+ ]
13
+ },
14
+ "active_voice_indicative_mood_imperfect_tense": {
15
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
16
+ "data": [
17
+ ]
18
+ },
19
+ "active_voice_indicative_mood_pastperfect_tense": {
20
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
21
+ "data": [
22
+ ]
23
+ },
24
+ "active_voice_indicative_mood_perfect_tense": {
25
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
26
+ "data": [
27
+ ]
28
+ },
29
+ "active_voice_indicative_mood_present_tense": {
30
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
31
+ "data": [
32
+ ]
33
+ },
34
+ "active_voice_subjunctive_mood_imperfect_tense": {
35
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
36
+ "data": [
37
+ ]
38
+ },
39
+ "active_voice_subjunctive_mood_pastperfect_tense": {
40
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
41
+ "data": [
42
+ ]
43
+ },
44
+ "active_voice_subjunctive_mood_perfect_tense": {
45
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
46
+ "data": [
47
+ ]
48
+ },
49
+ "active_voice_subjunctive_mood_present_tense": {
50
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
51
+ "data": [
52
+ ]
53
+ },
54
+ "passive_voice_indicative_mood_future_tense": {
55
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
56
+ "data": [
57
+ ]
58
+ },
59
+ "passive_voice_indicative_mood_futureperfect_tense": {
60
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
61
+ "data": [
62
+ ]
63
+ },
64
+ "passive_voice_indicative_mood_imperfect_tense": {
65
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
66
+ "data": [
67
+ ]
68
+ },
69
+ "passive_voice_indicative_mood_pastperfect_tense": {
70
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
71
+ "data": [
72
+ ]
73
+ },
74
+ "passive_voice_indicative_mood_perfect_tense": {
75
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
76
+ "data": [
77
+ ]
78
+ },
79
+ "passive_voice_indicative_mood_present_tense": {
80
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
81
+ "data": [
82
+ ]
83
+ },
84
+ "passive_voice_subjunctive_mood_imperfect_tense": {
85
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
86
+ "data": [
87
+ ]
88
+ },
89
+ "passive_voice_subjunctive_mood_pastperfect_tense": {
90
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
91
+ "data": [
92
+ ]
93
+ },
94
+ "passive_voice_subjunctive_mood_perfect_tense": {
95
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
96
+ "data": [
97
+ ]
98
+ },
99
+ "passive_voice_subjunctive_mood_present_tense": {
100
+ "json_class": "Linguistics::Latin::Verb::TenseBlock",
101
+ "data": [
102
+ ]
103
+ }
104
+ }
@@ -1,16 +1,16 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
- require "latinirb/version"
3
+ require "latinverb/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "latinverb"
7
- s.version = Linguistics::Latin::Util::LatinIRB::VERSION
7
+ s.version = Linguistics::Latin::Verb::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Steven G. Harms"]
10
10
  s.email = ["steven.harms@gmail.com"]
11
11
  s.homepage = "http://rubygems.org/gems/latinverb"
12
- s.summary = %q{Gem designed to explore verbs created by LatinVerb}
13
- s.description = %q{This gem takes initial data describing a LatinVerb and allows this is be instantiated into an IRB session. Here the verb can be queried or displayed.}
12
+ s.summary = %q{Gem designed to fully conjugate Latin verbs}
13
+ s.description = %q{This gem takes the four principal parts of a standard Latin verb and then fully conjugates that verb based on the heristics of the Latin language.}
14
14
 
15
15
 
16
16
  s.rubyforge_project = "latinverb"
@@ -0,0 +1,94 @@
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
@@ -0,0 +1,10 @@
1
+ # encoding: UTF-8
2
+ module Linguistics
3
+ module Latin
4
+ module Verb
5
+ VERSION = "0.9.2" # :nodoc:
6
+ class LatinVerb # :nodoc:
7
+ end
8
+ end
9
+ end
10
+ end