You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

diki-translate

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diki-translate

A module for translating words using diki.pl dictionary.

1.0
PyPI
Maintainers
1

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.

Keywords

translation

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts