Bỏ qua

GenderGenerator generator

Warning

The current page still doesn't have a translation for this language.

But you can help translating it: Contributing.

Generate female, male, or other values using configurable quotas.

Why: Use GenderGenerator when demographic fixtures require explicit female, male, and other proportions; use a source value when categories or quotas come from governed production data.

Category: person.

Output: str.

1
<key name="value" generator="GenderGenerator(female_quota=0.49, other_gender_quota=0.02)"/>

Parameters

  • female_quota: float | null; Default None — Probability assigned to the female category.
  • other_gender_quota: float | null; Default None — Probability assigned to the other category; the remainder is male.