Skip to main content

German-gender-finder

Find the gender of the German word.

You can use this script to find out what article your german word needs. Der, Die or Das

Usage

Finding the gender of the word "Besuch" directly from the command line (cmd):

image

Or from within a script

import find_gender
print(find_gender.get_gender_of_word('mutter'))
#{'word': 'mutter', 'definite_article': 'die', 'indefinite_article': 'eine', 'warning': 'Sure: Found in word list, highly reliable'}

Notes

  1. The script first searches a world list.
  2. If the script cannot find the word in the list it will use grammar rules to find its gender.
  3. All words that are exceptions to rules should be in the list.

return values

The script always returns a dictionary with a warning message detailing the reliability:

# very reliable
{
  'word': 'somewordyouchose', 
  'definite_article': 'die',
  'indefinite_article': 'eine',
  'warning': 'Sure: Found in word list, highly reliable'
}


# very reliable
{
    'word': 'somewordyouchose',
    'definite_article': 'der',
    'indefinite_article': 'ein',
    'warning': 'Sure: male due to masculine ending'
}

# not sure, see warning message!
{
     'word': 'somewordyouchose',
     'definite_article': 'der',
     'indefinite_article': 'ein',
     'warning': 'Unsure: However 80% of words ending in "en" are masculine'
}

# all messages you could get:

'warning': 'Sure: Found in word list',
'warning': 'Sure: male due to masculine ending',
'warning': 'Sure: female due to feminine ending',
'warning': 'Sure: neuter due to neuter ending',
'warning': 'Unsure: However 80% of words ending in "en" are masculine',
'warning': 'Unsure: However 60% of nouns ending in "el" are masculine',
'warning': 'Unsure: However 60% of nouns ending in "er" are masculine',
'warning': 'Unsure: However 90% of nouns ending in "e" are masculine',
'warning': 'Unsure: However 90% of nouns starting with "ge" are feminine',
'warning': 'Unsure: Most nouns ending in -t originating from verbs are feminine.',
'warning': 'Not_found: word not found',
 

The words in the word list are taken from:

https://github.com/mejutoco/german-grammar-statistics

I removed all words without a gender assigned.

Metadata

Release files for german-gender-finder 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for german-gender-finder 1.0.0
File Size Uploaded
german-gender-finder-1.0.0.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for german-gender-finder 1.0.0
File Interpreter ABI Platform
german_gender_finder-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.6 kB

Release files / german-gender-finder-1.0.0.tar.gz

Download URL german-gender-finder-1.0.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f2b407499dc254268b04ed11150c575165824061c06aeceb4a8731baa5bd591b
BLAKE2b-256 checksum
How to use checksums
8bb55bbc4a05061761e2d3480629ff2d6bbb1667c175eea3682c4b4ce993f27a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / german_gender_finder-1.0.0-py3-none-any.whl

Download URL german_gender_finder-1.0.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
095389c11dc019a8a0d220524f511de9816ddd96a7660e2c5aff26421bb4230a
BLAKE2b-256 checksum
How to use checksums
a8695962ca3af823bf4c9c9324a3aec7ea41500c4ecf1ed3bb5576933cda357f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page