Jump to content

Wikifunctions:Type proposals/Grammatical gender (a/i)

From Wikifunctions

Summary

This enumeration represents the animate and inanimate grammatical gender for languages that have exactly these two genders.

Uses

  • Why should this exist?

To work with languages that have these two grammatical genders, such as Basque.

  • What kinds of functions would be created using this?

Mappings to Wikidata items, selecting the right adjective form, getting the grammatical gender of a noun, etc.

  • What standard concepts, if any, does this align with?

Grammars of the respective languages.

See List on Wikipedia.

Structure

This type is represented as an enumeration with two values. Like all enumeration types, it consists of a single key. The key is an identity key.

Values

There are three values.

  1. Animate
  2. Inanimate

Example values

Value

{
  "type": "Grammatical gender (a/i)",
  "value": "Animate"
}
{
  "Z1K1": "Znnnnn",
  "ZnnnnnK1": "Zmmmmm"
}

Validator

The validator ensures that:

  • the identity key points directly to a value of this enumeration

Identity

Two values are the same if their identity is the same ZID.

Converting to code

Python

We represent them as a String with their ZID.

JavaScript

We represent them as a String with their ZID.

Renderer

As for all enumerations, the renderer displays the label of the value object.

Parsers

As with all enumerations, there is no parser, but a selector based on pre-defined values.

Alternatives

  • Instead of an enumeration, this could be a type with a single key that has a Wikidata item reference pointing to the respective item
  • In the code conversion, we could represent them as Booleans or a Number. Both requires an arbitrary mapping that may be regarded as problematic.
  • In the code conversion, we could use a simple string "a" or "i".
  • We could skip this type and just have a single type collecting all grammatical genders.
  • We could skip this type and just use Wikidata items directly instead.

Comments

Discussion

Some of the discussion for this type and the related types (m/f/n, c/n and m/f) should probably be had in a single centralized place. I suggest Wikifunctions:Project chat#Natural language functions.

@Denny [replying to your unsigned comment]
That discussion is now archived at Wikifunctions:Project chat/Archive/2025/02#Natural language functions. We can always re-start the discussion, of course. --GrounderUK (talk) 13:07, 25 July 2025 (UTC)reply
@GrounderUK: Yes, I was thinking of creating this, but @VIGNERON's question about "is this really gender" was maybe still open, so I wasn't 100% sure. Happy to go on! --Denny (talk) 14:21, 25 July 2025 (UTC)reply
Yes, I’m not familiar with any languages that have animacy as a salient grammatical feature, so I’m not expressing a view either way. I just note that Wikidata classes animate (Q51927507) as an instance of animacy (Q1250335), a sub-class of grammatical gender (Q162378) (zero references), “said to be the same as” noun class (Q1598075). From my perspective, it is just a set of “atomic” Grammatical features and, like m/f and m/f/n genders, the degrees of animacy will not always be two. GrounderUK (talk) 14:59, 25 July 2025 (UTC)reply

I started to create this type, using the new lightweight enum types capability, but I don't find animate and inanimate instances of Grammatical gender on wikidata. Rather, I find these: masculine animate non-personal (Q52943193), masculine animate (Q54020116), masculine inanimate (Q52943434). Would it make sense to group those 3 into an enum type? Unsigned comment by User:DMartin_(WMF)

@User:DMartin_(WMF) animate (Q51927507) and inanimate (Q51927539) are used in a lot of lexemes across diverse languages. The problem of composite grammatical features is an “interesting” one in practice, when it comes to fetching Wikidata lexeme forms, because practice varies according to the language and (for all I know) within a language. See, for example, participles in English and French. Both languages have present and past participle forms, but the participle feature is used with a tense feature in French lexemes, whereas English uses present participle (Q10345583) and past participle (Q1230649).--GrounderUK (talk) 14:01, 25 July 2025 (UTC)reply