A list of ~98,000 German nouns and their grammatical properties compiled from WiktionaryDE as CSV file. Plus a module to look up the data and parse compound words.
Project description
German nouns
A comma seperated list of ~98 thousand German nouns and their grammatical properties (tense, number, gender) as CSV file. Plus a module to look up the data and parse compound words. Compiled from the WiktionaryDE.
The list can be found here: german_nouns/nouns.csv
Lookup words
from pprint import pprint
from german_nouns.lookup import Nouns
nouns = Nouns()
# Lookup a word
word = nouns['Fahrrad']
pprint(word)
# Output:
[{'flexion': {'akkusativ plural': 'Fahrräder',
'akkusativ singular': 'Fahrrad',
'dativ plural': 'Fahrrädern',
'dativ singular': 'Fahrrad',
'dativ singular*': 'Fahrrade',
'genitiv plural': 'Fahrräder',
'genitiv singular': 'Fahrrades',
'genitiv singular*': 'Fahrrads',
'nominativ plural': 'Fahrräder',
'nominativ singular': 'Fahrrad'},
'genus': 'n',
'lemma': 'Fahrrad',
'pos': ['Substantiv']}]
# parse compound word
words = nouns.parse_compound('Vermögensbildung')
print(words)
# Output:
['Vermögen', 'Bildung'] # Now lookup nouns['Vermögen'] etc.
Compiling the list
To compile the list yourself, you need Python 3.8+ and Poetry installed.
1. Clone the repository and install dependencies with Poetry:
$ git clone https://github.com/gambolputty/german-nouns
$ cd german-nouns
$ poetry install
2. Compile the list of nouns from a Wiktionary XML file:
Find the latest XML-dump files here: https://dumps.wikimedia.org/dewiktionary/latest, for example this one and download it. Then execute:
$ poetry run python -m german_nouns.parse_dump /path-to-xml-dump-file.xml.bz2
The CSV file will be saved here: german_nouns/nouns.csv.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file german-nouns-1.2.0.tar.gz
.
File metadata
- Download URL: german-nouns-1.2.0.tar.gz
- Upload date:
- Size: 2.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.8.10 Linux/5.4.72-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2fc5346193118bd4c89ab6fa34b5a3f2f43772211641f6d16eb30f7c9cf9ec2 |
|
MD5 | 9a5ebb94a6d9fc0bba5e9f1c1dde2be0 |
|
BLAKE2b-256 | c3728ae14e97b23a963a26d52e27d1288a8f1309d3595028687e84dc37afe7f3 |
File details
Details for the file german_nouns-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: german_nouns-1.2.0-py3-none-any.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.8.10 Linux/5.4.72-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d5b8e36f2a65adcb13e885c67bb898dd4c2a1cdb194db29812bd25007efecdb |
|
MD5 | c4a5c970bc9fd0b6afb5b7f7972e5611 |
|
BLAKE2b-256 | 9929e80db3683ad51e5b586dfdbdb9ace9408e819c30dc0ab340f4092cbd017c |