Skip to main content

Get English translations of foreign word with Wiktionary

Project description

wiktionary_translate

Get English translations of foreign word with Wiktionary

ko-fi

Usage

You can only get the English definitions of foreign words

from wiktionary_translate.wiktionary_translate import WiktionaryResult

if __name__ == "__main__":

    wr = WiktionaryResult()
    if wr.query(word="essen", lang="de"):
        print(wr.definitions)  # ['to eat']
        print(wr.partOfSpeech)  # Verb
        print(wr.definitionList[0].parsedExamples)  # {'Er isst gern Schokolade.': 'He likes eating chocolate.', '...}
        print(wr.definitionList[0].examples)  # ['Er isst gern Schokolade.', 'Ich esse einen Apfel.']
        print(wr.definitionList[0].definition)  # to eat
        print(wr.rawResult)  # {'other': [{'partOfSpeech': 'Verb', 'language': 'Alemannic German', ...

 

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

wiktionary_translate-0.1.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

wiktionary_translate-0.1.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file wiktionary_translate-0.1.1.tar.gz.

File metadata

  • Download URL: wiktionary_translate-0.1.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for wiktionary_translate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a33b741cfa59e41d65ebca5bc0e55478efba01dcd88d45821fdbcfc2e2ddf08c
MD5 e11034a89c63b1b458fac1d2e4329635
BLAKE2b-256 bef384793d45ef95922a17808e7fdb8849b2ed47e39a4a6496a6b5bce4daefa1

See more details on using hashes here.

File details

Details for the file wiktionary_translate-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for wiktionary_translate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8a30f645c3a951f8c72ce3bc3babf7a5fbe6db5302a391e1015cd78a7cb9de59
MD5 42c9bb90e492a31d4526863776f70c25
BLAKE2b-256 2a39eec6ae76ff5f1e4c8963ecc9b01bbc86028b2f1b9e2aa52f63227efccb25

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page