Tradutor de palavras em vários idiomas via shell
Se você é adepto ao terminal assim como eu, esse post vai lhe agradar. Que tal ter um tradutor de palavras multilínguas em modo texto?
Introdução
Se você é adepto ao terminal assim como eu, esse post vai lhe agradar. Que tal ter um tradutor de palavras multilínguas em modo texto?
Os comandos aqui apresentados foram executados na distribuição Debian. Os nomes de pacotes e o processo de instalação podem variar de acordo com a distro utilizada.
Pra começar, vamos instalar o cliente e o servidor de dicionários:
sudo apt-get install dict dictd
Em seguida vamos instalar 2 dicionários, Português/Inglês e Inglês/Português:
sudo apt-get install dict-freedict-eng-por dict-freedict-por-eng
Sua utilização é simples ao extremo:
dict saúde
dict byte
dict Linux
Caso tenha interesse em dicionários de outras línguas, execute o seguinte comando:
apt-cache search dict-freedict
dict-freedict-afr-deu - Afrikaans-German dictionary for the dict server/client
dict-freedict-afr-eng - Afrikaans-English dictionary for the dict server/client
dict-freedict-all - meta-package to install or dictionary databases from the FreeDict project
dict-freedict-ara-eng - Arabic-English dictionary for the dict server/client
dict-freedict-bre-fra - Breton-French dictionary for the dict server/client
dict-freedict-ces-eng - Czech-English dictionary for the dict server/client
dict-freedict-ckb-kmr - Central Kurdish-Northern Kurdish dictionary for the dict server/client
dict-freedict-cym-eng - Welsh-English dictionary for the dict server/client
dict-freedict-dan-eng - Danish-English dictionary for the dict server/client
dict-freedict-deu-eng - German-English dictionary for the dict server/client
dict-freedict-deu-fra - German-French dictionary for the dict server/client
dict-freedict-deu-ita - German-Italian dictionary for the dict server/client
dict-freedict-deu-kur - German-Kurdish dictionary for the dict server/client
dict-freedict-deu-nld - German-Dutch dictionary for the dict server/client
dict-freedict-deu-por - German-Portuguese dictionary for the dict server/client
dict-freedict-deu-tur - German-Turkish dictionary for the dict server/client
dict-freedict-eng-afr - English-Afrikaans dictionary for the dict server/client
dict-freedict-eng-ara - English-Arabic dictionary for the dict server/client
dict-freedict-eng-ces - English-Czech dictionary for the dict server/client
dict-freedict-eng-cym - English-Welsh dictionary for the dict server/client
dict-freedict-eng-deu - English-German dictionary for the dict server/client
dict-freedict-eng-ell - English-Modern Greek (1453-) dictionary for the dict server/client
dict-freedict-eng-fra - English-French dictionary for the dict server/client
dict-freedict-eng-gle - English-Irish dictionary for the dict server/client
dict-freedict-eng-hin - English-Hindi dictionary for the dict server/client
dict-freedict-eng-hrv - English-Croatian dictionary for the dict server/client
dict-freedict-eng-hun - English-Hungarian dictionary for the dict server/client
dict-freedict-eng-ita - English-Italian dictionary for the dict server/client
dict-freedict-eng-lat - English-Latin dictionary for the dict server/client
dict-freedict-eng-lit - English-Lithuanian dictionary for the dict server/client
dict-freedict-eng-nld - English-Dutch dictionary for the dict server/client
dict-freedict-eng-pol - English-Polish dictionary for the dict server/client
dict-freedict-eng-por - English-Portuguese dictionary for the dict server/client
dict-freedict-eng-rom - English-Romany dictionary for the dict server/client
dict-freedict-eng-rus - English-Russian dictionary for the dict server/client
dict-freedict-eng-spa - English-Spanish dictionary for the dict server/client
dict-freedict-eng-srp - English-Serbian dictionary for the dict server/client
dict-freedict-eng-swe - English-Swedish dictionary for the dict server/client
dict-freedict-eng-swh - English-Swahili (individual language) dictionary for the dict server/client
dict-freedict-eng-tur - English-Turkish dictionary for the dict server/client
dict-freedict-fra-bre - French-Breton dictionary for the dict server/client
dict-freedict-fra-deu - French-German dictionary for the dict server/client
dict-freedict-fra-eng - French-English dictionary for the dict server/client
dict-freedict-fra-nld - French-Dutch dictionary for the dict server/client
dict-freedict-gla-deu - Scottish Gaelic-German dictionary for the dict server/client
dict-freedict-gle-eng - Irish-English dictionary for the dict server/client
dict-freedict-gle-pol - Irish-Polish dictionary for the dict server/client
dict-freedict-hrv-eng - Croatian-English dictionary for the dict server/client
dict-freedict-hun-eng - Hungarian-English dictionary for the dict server/client
dict-freedict-isl-eng - Icelandic-English dictionary for the dict server/client
dict-freedict-ita-deu - Italian-German dictionary for the dict server/client
dict-freedict-ita-eng - Italian-English dictionary for the dict server/client
dict-freedict-jpn-deu - Japanese-German dictionary for the dict server/client
dict-freedict-kha-deu - Khasi-German dictionary for the dict server/client
dict-freedict-kha-eng - Khasi-English dictionary for the dict server/client
dict-freedict-kur-deu - Kurdish-German dictionary for the dict server/client
dict-freedict-kur-eng - Kurdish-English dictionary for the dict server/client
dict-freedict-kur-tur - Kurdish-Turkish dictionary for the dict server/client
dict-freedict-lat-deu - Latin-German dictionary for the dict server/client
dict-freedict-lat-eng - Latin-English dictionary for the dict server/client
dict-freedict-lit-eng - Lithuanian-English dictionary for the dict server/client
dict-freedict-mkd-bul - Macedonian-Bulgarian dictionary for the dict server/client
dict-freedict-nld-deu - Dutch-German dictionary for the dict server/client
dict-freedict-nld-eng - Dutch-English dictionary for the dict server/client
dict-freedict-nld-fra - Dutch-French dictionary for the dict server/client
dict-freedict-nno-nob - Norwegian Nynorsk-Norwegian Bokmål dictionary for the dict server/client
dict-freedict-oci-cat - Occitan (post 1500)-Catalan dictionary for the dict server/client
dict-freedict-pol-gle - Polish-Irish dictionary for the dict server/client
dict-freedict-por-deu - Portuguese-German dictionary for the dict server/client
dict-freedict-por-eng - Portuguese-English dictionary for the dict server/client
dict-freedict-san-deu - Sanskrit-German dictionary for the dict server/client
dict-freedict-slk-eng - Slovak-English dictionary for the dict server/client
dict-freedict-spa-ast - Spanish-Asturian dictionary for the dict server/client
dict-freedict-spa-eng - Spanish-English dictionary for the dict server/client
dict-freedict-srp-eng - Serbian-English dictionary for the dict server/client
dict-freedict-swe-eng - Swedish-English dictionary for the dict server/client
dict-freedict-swh-eng - Swahili (individual language)-English dictionary for the dict server/client
dict-freedict-swh-pol - Swahili (individual language)-Polish dictionary for the dict server/client
dict-freedict-tur-deu - Turkish-German dictionary for the dict server/client
dict-freedict-tur-eng - Turkish-English dictionary for the dict server/client
dict-freedict-swa-eng - Dict package for Swahili-English Freedict dictionary
A lista é grande!
dict goodbye
Os comandos aqui apresentados foram executados na distribuição Debian. Os nomes de pacotes e o processo de instalação podem variar de acordo com a distro utilizada.
Pra começar, vamos instalar o cliente e o servidor de dicionários:
sudo apt-get install dict dictd
Em seguida vamos instalar 2 dicionários, Português/Inglês e Inglês/Português:
sudo apt-get install dict-freedict-eng-por dict-freedict-por-eng
Sua utilização é simples ao extremo:
dict saúde
Ele automaticamente detecta a língua utilizada. Ou melhor, ele mostra todas as ocorrências encontradas. Se a mesma palavra existir em outros idiomas, ele vai as mostrando sequencialmente. Exemplo:1 definition found From Portuguese-English FreeDict Dictionary ver. 0.1.1 [fd-por-eng]: saúde 1. well-being 2. health 3. toast
dict byte
Algumas palavras não possuem tradução, mas podem possuir definição, como é o caso de:2 definitions found From English-Portuguese FreeDict Dictionary ver. 0.2.2 [fd-eng-por]: byte /bait/ byte From Portuguese-English FreeDict Dictionary ver. 0.1.1 [fd-por-eng]: byte 1. byte 2. byte
dict Linux
1 definition found
From English-Portuguese FreeDict Dictionary ver. 0.2.2 [fd-eng-por]:
Linux
Sistema operacional semelhante ao UNIX sendo originalmente desenvolvido por Linus Torvalds a partir de 1991; e que; desde então; vem se evoluindo graças à cooperação de vários volutários e empresas através da Internet.
Caso tenha interesse em dicionários de outras línguas, execute o seguinte comando:
apt-cache search dict-freedict
dict-freedict-afr-deu - Afrikaans-German dictionary for the dict server/client
dict-freedict-afr-eng - Afrikaans-English dictionary for the dict server/client
dict-freedict-all - meta-package to install or dictionary databases from the FreeDict project
dict-freedict-ara-eng - Arabic-English dictionary for the dict server/client
dict-freedict-bre-fra - Breton-French dictionary for the dict server/client
dict-freedict-ces-eng - Czech-English dictionary for the dict server/client
dict-freedict-ckb-kmr - Central Kurdish-Northern Kurdish dictionary for the dict server/client
dict-freedict-cym-eng - Welsh-English dictionary for the dict server/client
dict-freedict-dan-eng - Danish-English dictionary for the dict server/client
dict-freedict-deu-eng - German-English dictionary for the dict server/client
dict-freedict-deu-fra - German-French dictionary for the dict server/client
dict-freedict-deu-ita - German-Italian dictionary for the dict server/client
dict-freedict-deu-kur - German-Kurdish dictionary for the dict server/client
dict-freedict-deu-nld - German-Dutch dictionary for the dict server/client
dict-freedict-deu-por - German-Portuguese dictionary for the dict server/client
dict-freedict-deu-tur - German-Turkish dictionary for the dict server/client
dict-freedict-eng-afr - English-Afrikaans dictionary for the dict server/client
dict-freedict-eng-ara - English-Arabic dictionary for the dict server/client
dict-freedict-eng-ces - English-Czech dictionary for the dict server/client
dict-freedict-eng-cym - English-Welsh dictionary for the dict server/client
dict-freedict-eng-deu - English-German dictionary for the dict server/client
dict-freedict-eng-ell - English-Modern Greek (1453-) dictionary for the dict server/client
dict-freedict-eng-fra - English-French dictionary for the dict server/client
dict-freedict-eng-gle - English-Irish dictionary for the dict server/client
dict-freedict-eng-hin - English-Hindi dictionary for the dict server/client
dict-freedict-eng-hrv - English-Croatian dictionary for the dict server/client
dict-freedict-eng-hun - English-Hungarian dictionary for the dict server/client
dict-freedict-eng-ita - English-Italian dictionary for the dict server/client
dict-freedict-eng-lat - English-Latin dictionary for the dict server/client
dict-freedict-eng-lit - English-Lithuanian dictionary for the dict server/client
dict-freedict-eng-nld - English-Dutch dictionary for the dict server/client
dict-freedict-eng-pol - English-Polish dictionary for the dict server/client
dict-freedict-eng-por - English-Portuguese dictionary for the dict server/client
dict-freedict-eng-rom - English-Romany dictionary for the dict server/client
dict-freedict-eng-rus - English-Russian dictionary for the dict server/client
dict-freedict-eng-spa - English-Spanish dictionary for the dict server/client
dict-freedict-eng-srp - English-Serbian dictionary for the dict server/client
dict-freedict-eng-swe - English-Swedish dictionary for the dict server/client
dict-freedict-eng-swh - English-Swahili (individual language) dictionary for the dict server/client
dict-freedict-eng-tur - English-Turkish dictionary for the dict server/client
dict-freedict-fra-bre - French-Breton dictionary for the dict server/client
dict-freedict-fra-deu - French-German dictionary for the dict server/client
dict-freedict-fra-eng - French-English dictionary for the dict server/client
dict-freedict-fra-nld - French-Dutch dictionary for the dict server/client
dict-freedict-gla-deu - Scottish Gaelic-German dictionary for the dict server/client
dict-freedict-gle-eng - Irish-English dictionary for the dict server/client
dict-freedict-gle-pol - Irish-Polish dictionary for the dict server/client
dict-freedict-hrv-eng - Croatian-English dictionary for the dict server/client
dict-freedict-hun-eng - Hungarian-English dictionary for the dict server/client
dict-freedict-isl-eng - Icelandic-English dictionary for the dict server/client
dict-freedict-ita-deu - Italian-German dictionary for the dict server/client
dict-freedict-ita-eng - Italian-English dictionary for the dict server/client
dict-freedict-jpn-deu - Japanese-German dictionary for the dict server/client
dict-freedict-kha-deu - Khasi-German dictionary for the dict server/client
dict-freedict-kha-eng - Khasi-English dictionary for the dict server/client
dict-freedict-kur-deu - Kurdish-German dictionary for the dict server/client
dict-freedict-kur-eng - Kurdish-English dictionary for the dict server/client
dict-freedict-kur-tur - Kurdish-Turkish dictionary for the dict server/client
dict-freedict-lat-deu - Latin-German dictionary for the dict server/client
dict-freedict-lat-eng - Latin-English dictionary for the dict server/client
dict-freedict-lit-eng - Lithuanian-English dictionary for the dict server/client
dict-freedict-mkd-bul - Macedonian-Bulgarian dictionary for the dict server/client
dict-freedict-nld-deu - Dutch-German dictionary for the dict server/client
dict-freedict-nld-eng - Dutch-English dictionary for the dict server/client
dict-freedict-nld-fra - Dutch-French dictionary for the dict server/client
dict-freedict-nno-nob - Norwegian Nynorsk-Norwegian Bokmål dictionary for the dict server/client
dict-freedict-oci-cat - Occitan (post 1500)-Catalan dictionary for the dict server/client
dict-freedict-pol-gle - Polish-Irish dictionary for the dict server/client
dict-freedict-por-deu - Portuguese-German dictionary for the dict server/client
dict-freedict-por-eng - Portuguese-English dictionary for the dict server/client
dict-freedict-san-deu - Sanskrit-German dictionary for the dict server/client
dict-freedict-slk-eng - Slovak-English dictionary for the dict server/client
dict-freedict-spa-ast - Spanish-Asturian dictionary for the dict server/client
dict-freedict-spa-eng - Spanish-English dictionary for the dict server/client
dict-freedict-srp-eng - Serbian-English dictionary for the dict server/client
dict-freedict-swe-eng - Swedish-English dictionary for the dict server/client
dict-freedict-swh-eng - Swahili (individual language)-English dictionary for the dict server/client
dict-freedict-swh-pol - Swahili (individual language)-Polish dictionary for the dict server/client
dict-freedict-tur-deu - Turkish-German dictionary for the dict server/client
dict-freedict-tur-eng - Turkish-English dictionary for the dict server/client
dict-freedict-swa-eng - Dict package for Swahili-English Freedict dictionary
A lista é grande!
dict goodbye
/* Isso também passa! */