Verba v0.4.0 Verba.Adjective
Link to this section Summary
Types
Holds the information necessary to properly decline adjectives
Regular Latin adjectives belong to one of two declension groups
Regular third declension adjectives can have one, two, or three terminations
Functions
Provides the declined form of an adjective for a specified number, case, and gender
Returns the declension group and number of terminations of an adjective()
or the dictionary form of an adjective. If the declension group cannot be
determined, nil is returned
Like regular
this function creates a Latin adjective from a dictionary form
However, first and second declension adjectives created with this function
will decline with irregular singular dative and genitive forms
Creates a regular first and second declension Latin adjective
Like regular
this function creates a regular Latin adjective. However,
third declension adjectives created with this function will decline as
consonant-stems instead of i-stems
Return the stem of an adjective()
if it can be determined, otherwise nil is
returned
Link to this section Types
adjective() (opaque)
Holds the information necessary to properly decline adjectives.
:declension
: Holds the singular nominative form for all genders. These are used to decline the adjective.:attr
: Holds special attributes for an adjectives.
Attributes
:c_stem
: Third declension adjectives can have a consonant stem or an i-stem, which changes a way it declines in a few cases. If attr contains the key :c_stem, then the adjective is a c-stem, otherwise it's an i-stem.`:ius_genitive_ending: Nine first and second declension adjectives have distinctive -īus singular genitive and -ī singular dative endings for all three genders. Those adjectives are: ūllus, ūlla, ūllum nūllus, nūlla, nūllum uter, utra, utrum sōlus, sōla, sōlum neuter, neutra, neutrum alius, alia, aliud ūnus, ūna, ūnum tōtus, tōta, tōtum alter, altera, alterum Adding this key to an adjective's attr map will cause it to decline in the manner of these nine adjectives.
group()
group() :: :first_second | :third
group() :: :first_second | :third
Regular Latin adjectives belong to one of two declension groups.
termination()
termination() :: :one | :two | :three
termination() :: :one | :two | :three
Regular third declension adjectives can have one, two, or three terminations.
Link to this section Functions
decline(adjective, grammatical_number, grammatical_case, grammatical_gender)
decline(
adjective(),
Verba.Decline.grammatical_number(),
Verba.Decline.grammatical_case(),
Verba.Decline.grammatical_gender()
) :: [String.t()]
decline( adjective(), Verba.Decline.grammatical_number(), Verba.Decline.grammatical_case(), Verba.Decline.grammatical_gender() ) :: [String.t()]
Provides the declined form of an adjective for a specified number, case, and gender.
Latin adjectives are declined for number, case, and gender. There are six cases; nominative, genitive, dative, accusative, ablative, and vocative; two two numbers; singular and plural; and three genders; masculine feminine, and neuter.
Example
iex> {:ok, adjective} = Verba.Adjective.regular(["altus", "alta", "altum"])
{:ok,
%Verba.Adjective{
attr: %{},
declension: %{
singular: %{
nominative: %{
feminine: ["alta"],
masculine: ["altus"],
neuter: ["altum"]
}
}
}
}}
iex> Verba.Adjective.decline(adjective, :plural, :genitive, :masculine)
["altōrum"]
group(adjective)
group(adjective() | [String.t()]) :: {group(), termination()} | nil
group(adjective() | [String.t()]) :: {group(), termination()} | nil
Returns the declension group and number of terminations of an adjective()
or the dictionary form of an adjective. If the declension group cannot be
determined, nil is returned.
Examples
iex> Verba.Adjective.group(["altus", "alta", "altum"])
{:first_second, :three}
iex> Verba.Adjective.group(["atrōx", "atrōcis"])
{:third, :one}
iex> {:ok, adjective} = Verba.Adjective.regular(["altus", "alta", "altum"])
{:ok,
%Verba.Adjective{
attr: %{},
declension: %{
singular: %{
nominative: %{
feminine: ["alta"],
masculine: ["altus"],
neuter: ["altum"]
}
}
}
}}
iex> Verba.Adjective.group(adjective)
{:first_second, :three}
irregular_ius_genitive(dict)
Like regular
this function creates a Latin adjective from a dictionary form
However, first and second declension adjectives created with this function
will decline with irregular singular dative and genitive forms.
There are nine adjectives of the first and second declension group that decline differently from other first and second declension adjectives. These Tadjectives, commonly referred to by the acronym ŪNUS NAUTA are:
ūllus, ūlla, ūllum nūllus, nūlla, nūllum uter, utra, utrum sōlus, sōla, sōlum neuter, neutra, neutrum alius, alia, aliud ūnus, ūna, ūnum tōtus, tōta, tōtum alter, altera, alterum
Use this function when creating these adjectives.
Example
iex> {:ok, adjective} = Verba.Adjective.irregular_ius_genitive(["ūllus", "ūlla", "ūllum"])
{:ok,
%Verba.Adjective{
attr: %{ius_genitive_ending: nil},
declension: %{
singular: %{
nominative: %{
feminine: ["ūlla"],
masculine: ["ūllus"],
neuter: ["ūllum"]
}
}
}
}}
iex> Verba.Adjective.decline(adjective, :singular, :genitive, :masculine)
["ūllīus"]
iex> Verba.Adjective.decline(adjective, :singular, :dative, :masculine)
["ūllī"]
regular(dict)
Creates a regular first and second declension Latin adjective.
The dictionary form of a regular first and second declension Latin adjective consists of the singular nominative form for all three genders. For example, for the first and second declension adjecive altus (high, tall) the dictionary form would be altus, alta, altum.
This dictionary form of regular third declension adjectives depends on whether the adjective has one, two, or three terminations. Third declension adjectives with one termination require the singular nominative and genitive forms. For example, for the adjective atrōx (terrible) the dictionary form would be atrōx, atrōcis.
Third declension adjectives with two terminations consists of two forms: the masculine and feminine singular nominative and the neuter singular nominative. For example, for the adjective agilis (swift) the dictionary form would be agilis, agile.
Third declension adjectives with three terminations consist of three forms: the masculine, feminine, and neuter singular nominatives. For example, for the adjective alacer (lively) the dictionary form would be alacer, alacris, alacre.
This function takes the dictionary form of a regular Latin adjective. Depending on the form passed in, it will return a first and second declension adjective or a third declension adjective with one, two, or three three terminations.
Warning
Third declension adjectives can be either consonant-stem or i-stem. Third
declension adjectives created with this function will decline as i-stems.
When creating a third declension consonant-stem adjective, use
regular_c_stem
instead.
Example
iex> {:ok, adjective} = Verba.Adjective.regular(["altus", "alta", "altum"])
{:ok,
%Verba.Adjective{
attr: %{},
declension: %{
singular: %{
nominative: %{
feminine: ["alta"],
masculine: ["altus"],
neuter: ["altum"]
}
}
}
}}
iex> Verba.Adjective.decline(adjective, :singular, :dative, :masculine)
["altō"]
regular_c_stem(dict)
Like regular
this function creates a regular Latin adjective. However,
third declension adjectives created with this function will decline as
consonant-stems instead of i-stems.
Most third declension adjectives decline the same way as i-stem nouns. However, there are a handful of third declension adjectives with one termination that decline like consonant stem nouns. For example, the singular ablative of most third declension adjectives with one termination ends in -ī but consonant stem adjectives such as vetus, veteris end in -e.
Example
iex> {:ok, adjective} = Verba.Adjective.regular_c_stem(["vertus", "verteris"])
{:ok,
%Verba.Adjective{
attr: %{c_stem: nil},
declension: %{
singular: %{
genitive: %{
feminine: ["verteris"],
masculine: ["verteris"],
neuter: ["verteris"]
},
nominative: %{
feminine: ["vertus"],
masculine: ["vertus"],
neuter: ["vertus"]
}
}
}
}}
iex> Verba.Adjective.decline(adjective, :plural, :genitive, :masculine)
["verterum"]
stem(adjective)
Return the stem of an adjective()
if it can be determined, otherwise nil is
returned.
Example
iex> {:ok, adjective} = Verba.Adjective.regular(["altus", "alta", "altum"])
{:ok,
%Verba.Adjective{
attr: %{},
declension: %{
singular: %{
nominative: %{
feminine: ["alta"],
masculine: ["altus"],
neuter: ["altum"]
}
}
}
}}
iex> Verba.Adjective.stem(adjective)
"alt"