Skip to main content

diki_translate

Moduł Python'a pozwalający na tłumaczenie z polskiego słownika diki.pl.

Instalacja

pip install diki_translate

Opis funkcji

Moduł zawiera klasę Diki z funkcją diki.translation(word, exact_word = 1)

word, akceptuje string, który masz zamiar przetłumaczyć.
exact_word, opcjonalny argument akceptujący int (domyślnie 1), określający czy funkcja ma zwrócić dokładne tłumaczenie słowa, np. czy dla słowa 'used' mają zostać wyświetlone tłumaczenia słowa 'use'.

Przykłady użycia

Wszystkie operacje są zaimplementowane w klasie Diki.
Wymaga ona podania języka, na który masz zamiar tłumaczyć.

from diki_translate import Diki

diki = Diki("english")

Wszystkie dozwolone języki to: "english", "german", "spanish", "italian", "french".

  • Przykłady tłumaczenia:
>>> list(diki.translation('used'))
['używany', 'przyzwyczajony', 'przywykły']
>>> list(diki.translation('used', 0))
['używany', 'przyzwyczajony', 'przywykły', 'używać', 'korzystać (np. z telefonu, toalety)', 'zużywać', 'wykorzystywać (np. kogoś do swoich celów)',...]


Funkcja zwraca iterator by nie żądać więcej wyników niż trzeba.

Metadata

Release files for diki-translate 1.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 diki-translate 1.0
File Size Uploaded
diki_translate-1.0.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for diki-translate 1.0
File Interpreter ABI Platform
diki_translate-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / diki_translate-1.0.tar.gz

Download URL diki_translate-1.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a4d0058e18546c700e74528b7a7ac30ea9a5be048f262633479a2f40451f8f8b
BLAKE2b-256 checksum
How to use checksums
39defb30525cc4edde6c5f17e86e66840f6f5dd5d0df6b4dee5fbf1fd3b8a545
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.2

Release files / diki_translate-1.0-py3-none-any.whl

Download URL diki_translate-1.0-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3a597c18031fe8b072bd9db39eb7883884b25e81c690f14666348e367997bdd
BLAKE2b-256 checksum
How to use checksums
1308aaf3dbf7aaf9bb47df5dec8feb9d53645471a44655331bb69c7be134b2fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.2

Release history Release notifications | RSS feed

This release

1.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