Abstract
Abstract
I created a system for inflecting Latin parts of speech. This system includes nouns of all five declensions, adjectives in all three declensions, and verbs in all four conjugations. It also includes some useful helper functions. I intend to package this system into a handful of related and easy-to-use functions in the Wolfram Function Repository.
Nouns
Nouns
This function displays a table of all the forms of a given noun. As a side note, in America we are taught Latin with cases in this order, but Britain follows this order: Nominative, Vocative, Accusative, Genitive, Dative, Ablative.
In[]:=
LatinCases[ukq_]:=If[ukq,{"Nominative","Vocative","Accusative","Genitive","Dative","Ablative"},{"Nominative","Genitive","Dative","Accusative","Ablative","Vocative"}]
Display a table form in either UK or American order of cases for an arbitrary noun inflection function:
In[]:=
LatinNounTable[func_,root_,ukq_:False]:=With[{cases=LatinCases[ukq]},TableForm[Table[func[root,case,pluralq],{case,cases},{pluralq,{False,True}}],TableHeadings{cases,{"Singular","Plural"}}]]
Some convenience functions to deal with macrons:
In[]:=
macron=<|"a""ā","e""ē","i""ī","o""ō","u""ū"|>
Out[]=
aā,eē,iī,oō,uū
In[]:=
rmacron=AssociationMap[Reverse,macron]
Out[]=
āa,ēe,īi,ōo,ūu
First Declension
First Declension
First declension nouns end in "a" and have the fewest exceptions. Most are feminine nouns, but there are a few masculine nouns.
Checking to make sure the noun ends in "a", append the right ending onto the stem depending on the case and number:
In[]:=
LatinFirstDeclension[root_/;StringEndsQ[root,"a"],case_,pluralq_]:=If[pluralq,Switch[case,"Nominative",root<>"e","Genitive",StringDrop[root,-1]<>"ārum","Dative",StringDrop[root,-1]<>"īs","Accusative",StringDrop[root,-1]<>"ās","Ablative",StringDrop[root,-1]<>"īs","Vocative",root<>"e"],Switch[case,"Nominative",root,"Genitive",root<>"e","Dative",root<>"e","Accusative",root<>"m","Ablative",StringDrop[root,-1]<>"ā","Vocative",root]]
The user inputs the most common form of a noun, the nominative singular, and specifies which form they want:
In[]:=
LatinNounTable[LatinFirstDeclension,"femina"]
Out[]//TableForm=
Singular | Plural | |
Nominative | femina | feminae |
Genitive | feminae | feminārum |
Dative | feminae | feminīs |
Accusative | feminam | feminās |
Ablative | feminā | feminīs |
Vocative | femina | feminae |
Second Declension
Second Declension
Second declension nouns are masculine and neuter. These are more challenging because of the number of exceptions.
First, checking if the noun is one of the exceptions specified or ending in "us", then creating the stem and adding the endings:
In[]:=
LatinSecondDeclension[root_,case_,pluralq_]:=With[{newroot=StringDrop[root,If[StringEndsQ[root,"us"],-2,If[StringEndsQ[root,{"ager","aper","arbiter","auster","cancer","caper","coluber","conger","culter","faber","fiber","liber","magister,"minister","oleaster","onager","scomber"}],{-2},0]]]},If[pluralq,Switch[case,"Nominative",newroot<>"ī","Genitive",newroot<>"ōrum","Dative",newroot<>"īs","Accusative",newroot<>"ōs","Ablative",newroot<>"īs","Vocative",newroot<>"ī"],Switch[case,"Nominative",root,"Genitive",newroot<>"ī","Dative",newroot<>"ō","Accusative",newroot<>"um","Ablative",newroot<>"ō","Vocative",newroot<>"e"]]]
In[]:=
LatinSecondDeclension[root_/;StringEndsQ[root,"um"],case_,pluralq_]:=With[{drop=StringDrop[root,-2]},If[pluralq,Switch[case,"Nominative",drop<>"a","Genitive",drop<>"ōrum","Dative",drop<>"īs","Accusative",drop<>"a","Ablative",drop<>"īs","Vocative",drop<>"a"],Switch[case,"Nominative",root,"Genitive",drop<>"ī","Dative",drop<>"ō","Accusative",root,"Ablative",drop<>"ō","Vocative",root]]]
Here's an example:
In[]:=
LatinNounTable[LatinSecondDeclension,"deus"]
Out[]//TableForm=
Singular | Plural | |
Nominative | deus | deī |
Genitive | deī | deōrum |
Dative | deō | deīs |
Accusative | deum | deōs |
Ablative | deō | deīs |
Vocative | dee | deī |
Third Declension
Third Declension
As stated on The National Archives (UK), third declension nouns cannot be uniquely identified from the nominative because they have various forms and spellings, have endings that do not reveal their gender, and can be masculine, feminine, or neuter.
In addition, this declension has many exceptions. For those reasons, the code is not shown here.
In addition, this declension has many exceptions. For those reasons, the code is not shown here.
Here's an example:
In[]:=
LatinNounTable[LatinThirdDeclension,"dux"]
Out[]//TableForm=
Singular | Plural | |
Nominative | dux | ducēs |
Genitive | ducis | ducum |
Dative | ducī | ducibus |
Accusative | ducem | ducēs |
Ablative | duce | ducibus |
Vocative | dux | ducēs |
Fourth Declension
Fourth Declension
The fourth declension includes some nouns that are not declined in specific forms, but fortunately, the pattern-matching built in to the Wolfram Language makes each exception a one-liner.
Some example exceptions:
In[]:=
NounFourthMasculineEndings[root_,stem_,"Dative",True]:=stem<>"ubus"NounFourthMasculineEndings[root_,stem_,"Ablative",True]:=stem<>"ubus"NounFourthMasculineEndings[root_,stem_,case_,pluralq_]:=NounFourthMasculineEndings[root,stem,case,pluralq]
The table for the fourth declension noun genū (knee):
In[]:=
LatinNounTable[LatinFourthDeclension,"genū"]
Out[]//TableForm=
Singular | Plural | |
Nominative | genū | genua |
Genitive | genūs | genuum |
Dative | genū | genibus |
Accusative | genū | genua |
Ablative | genū | genibus |
Vocative | genū | genū |
Fifth Declension
Fifth Declension
The fifth declension nouns are generally feminine and also include some nouns without plural forms. In the Genitive and Dative singular, the most common ending is -ī, however it is sometimes declined with the -ē ending shown in parentheses.
The word declined below is an exception as it is not feminine:
In[]:=
LatinNounTable[LatinFifthDeclension,"merīdiēs"]
Out[]//TableForm=
Singular | Plural | |
Nominative | merīdiēs | merīdiēs |
Genitive | merīdiēī (-ē) | merīdiērum |
Dative | merīdiēī (-ē) | merīdiēbus |
Accusative | merīdiem | merīdiēs |
Ablative | merīdiē | merīdiēbus |
Vocative | merīdiēs | merīdiēs |
Adjectives
Adjectives
This function differs from the noun table because adjectives are most commonly declined in all three genders.
In[]:=
LatinAdjTable[func_,root_,ukq_]:=With[{cases=LatinCases[ukq]},TableForm[Table[StringRiffle[Table[func[root,case,gender,pluralq],{gender,{"Masculine","Feminine","Neuter"}}]," / "],{case,cases},{pluralq,{False,True}}],TableHeadings{cases,{"Singular","Plural"}}]]
First and Second Declension
First and Second Declension
There are a lot of intricate rules and exceptions here that require many interconnected sub-functions.
LatinAdjTable[LatinFirstSecondAdjectives,"miserum"]
Singular | Plural | |
Nominative | miserus / misera / miserum | miserī / miserae / misera |
Genitive | miserī / miserae / miserī | miserōrum / miserārum / miserōrum |
Dative | miserō / miserae / miserō | miserīs / miserīs / miserīs |
Accusative | miserum / miseram / miserum | miserōs / miserās / misera |
Ablative | miserō / miserā / miserō | miserīs / miserīs / miserīs |
Vocative | misere / misera / miserum | miserī / miserae / misera |
Third Declension
Third Declension
This declension of adjectives has a great deal of exceptions, similar to the third declension of nouns.
In[]:=
LatinAdjTable[LatinThirdAdjectives,"dives"]
Out[]//TableForm=
Singular | Plural | |
Nominative | dives / dives / dives | diveēs / diveēs / diveia |
Genitive | diveis / diveis / diveis | diveium / diveium / diveium |
Dative | diveī / diveī / diveī | diveibus / diveibus / diveibus |
Accusative | diveem / diveem / dives | diveīs (-ēs) / diveīs (-ēs) / diveia |
Ablative | diveī / diveī / diveī | diveibus / diveibus / diveibus |
Vocative | dives / dives / dives | diveēs / diveēs / diveia |
Comparative Adjectives
Comparative Adjectives
Comparative adjectives are relatively straight-forward as there is only one exception (plūs) to the general rules of declining them.
Plūs is not declined in masculine or feminine singular, hence an error message is printed.
Verbs
Verbs
Verbs have a greater amount of endings, including most combinations of mood and tense. The four moods are Indicative, Imperative, Infinitive, and Subjunctive.
First Conjugation
First Conjugation
This function takes the root (first person singular form), the person, plural/singular, mood, tense, and voice. The stem is calculated from the root.
Here's the code for conjugating the Future Infinitive in the passive voice:
Here's an example of amō conjugated in the Future Perfect Indicative in the passive voice:
Second Conjugation
Second Conjugation
Here's an example of monēo being conjugated in the third person plural form of the Imperfect Subjunctive in passive voice.
Third Conjugation
Third Conjugation
Here's an example of tegō conjugated in the first person singular form of the Present Subjunctive in active voice.
Third "io" Conjugation
Third "io" Conjugation
These third conjugation adjectives have i-stem endings sometimes.
Here's an example of capīo in the first person singular form of the Imperfect Indicative in active voice.
Fourth Conjugation
Fourth Conjugation
Here's an example of audiō conjugated in the third person plural of the Future Indicative form in the active voice.
Keywords
Keywords
◼
Latin
◼
Inflections
◼
Declensions
◼
Conjugations
Acknowledgements
Acknowledgements
Thank you to my mentor, Arben Kalziqi. Thank you, Stephen Wolfram, for the project idea and for your guidance.