LexData.language

This module simply contains a few common Languages with their language-codes and QIDs for easier use.

class LexData.language.Language(short: str, qid: str)

Bases: object

Dataclass representing a language

Parameters
  • short (str) – Wikimedia Language code (Example: “en”)

  • qid (str) – Id of the wikidata item specifying the language (Example: “Q1860”)

qid: str = None
short: str = None
@dataclass
class Language:
    """Dataclass representing a language

    :param short: Wikimedia Language code (Example: "en")
    :type  short: str
    :param qid: Id of the wikidata item specifying the language (Example: "Q1860")
    :type  qid: str
    """

    short: str
    qid: str


# feel free to add more languages
en = Language("en", "Q1860")
de = Language("de", "Q188")
fr = Language("fr", "Q150")