33 lines
540 B
Python
33 lines
540 B
Python
|
|
from dataclasses import dataclass
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass
|
||
|
|
class Wordform:
|
||
|
|
id: str
|
||
|
|
lemma_id: str
|
||
|
|
form: str
|
||
|
|
tags: list[str]
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass
|
||
|
|
class Sense:
|
||
|
|
id: str
|
||
|
|
lemma_id: str
|
||
|
|
sense_index: int
|
||
|
|
gloss: str
|
||
|
|
topics: list[str]
|
||
|
|
tags: list[str]
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass
|
||
|
|
class Lemma:
|
||
|
|
id: str
|
||
|
|
headword: str
|
||
|
|
language: str
|
||
|
|
pos_raw: str
|
||
|
|
pos_normalised: str | None
|
||
|
|
gender: str | None
|
||
|
|
tags: list[str]
|
||
|
|
senses: list[Sense] = field(default_factory=list)
|
||
|
|
wordforms: list[Wordform] = field(default_factory=list)
|