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?

[ Hits: 5.764 ]

Por: Fábio Berbert de Paula em 06/01/2016 | Blog: https://www.instagram.com/alexabolada/


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
1 definition found

From Portuguese-English FreeDict Dictionary ver. 0.1.1 [fd-por-eng]:

  saúde
   1. well-being
   2. health
   3. toast

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:

dict byte
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

Algumas palavras não possuem tradução, mas podem possuir definição, como é o caso de:

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

   

Páginas do artigo
   1. Introdução
Outros artigos deste autor

Assumindo o controle do teu Android com ADB

Diversão e Entretenimento no Linux

cpulimit - Limitando o uso da CPU por processo

A forma correta de se instalar módulos Perl

Informativo: novos recursos no fórum

Leitura recomendada

Guia Introdutório do Linux II

Gerenciamento de pacotes Debian - principais comandos LPIC-1

CD repositório para o aptitude

Guia básico de como usar comandos no Linux

Todos os atalhos do Cinnamon

  
Comentários
[1] Comentário enviado por matiasalexsandro em 06/01/2016 - 08:34h

Muito bom o artigo!
/* Isso também passa! */

[2] Comentário enviado por Jarm1s0n em 06/01/2016 - 16:21h

Muito bom, man.
Funcionou direitinho no Linux Mint. Obrigado!

[3] Comentário enviado por removido em 06/01/2016 - 17:04h

Show de bola cara! Muito bom mesmo.

Uma pena que não tem espanhol/português, nem francês/português.

Mesmo assim, obrigado pela dica.

[4] Comentário enviado por iagolira em 07/01/2016 - 01:15h

Muito bom! Parece um sonho :'( :) ... Parabéns pelo artigo.
Nome: Francisco Iago Lira Passos
Curso: Bacharelado em Física

[5] Comentário enviado por removido em 07/01/2016 - 12:58h

+1
Cara, você nem imagina a mão na roda que esse tradutor vai ser! Obrigado!
--------------------
Primeiro você se adapta ao Linux; depois, o Linux se adapta a você.

[6] Comentário enviado por gongo.soco em 08/01/2016 - 11:08h

Com os pacotes instalados: dict dictd dict-freedict-eng-por dict-freedict-por-en libmaa - na distribuição Lx-Pup - só consigo as definições das palavras (em inglês), não as traduções.

[7] Comentário enviado por thiagosabo em 11/01/2016 - 07:08h

Oloko, artigo de ótima utilidade. Tradutor via shell estava faltando mesmo! Como não pensei nisso antes.... hehe

[8] Comentário enviado por brsan7 em 12/01/2016 - 12:58h

ontem eu estava procurando aqui no fórum como enviar comando para o terminal via java... vou colocar na lista de tarefas um tradutor em java! os tradutores em nuvens bagunçam o texto quando é técnico! obrigado pela dica irmão!

[9] Comentário enviado por brsan7 em 12/01/2016 - 13:11h

hoje eu estava na briga para fazer o jTextField receber uma double... eu já tenho o filtro! a tradução vai ficar limpa! quando eu terminar eu posto aqui para os irmãos!

[10] Comentário enviado por xGrind em 15/01/2016 - 22:24h

Muito bom o artigo. No Mageia não existe esse dict no repositório, mas encontrei o StarDict que é parecido e com interface gráfica. Vai ajudar muito :)


Contribuir com comentário




Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts