• Stars
    star
    14
  • Rank 1,438,076 (Top 29 %)
  • Language
    Crystal
  • License
    MIT License
  • Created over 8 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Google Translate client for Crystal

Crystal GoogleTranslate Build Status

Crystal client for GoogleTranslate

Installation

Add this to your application's shard.yml:

dependencies:
  google_translate:
    github: greyblake/crystal-google_translate

Usage

require "google_translate"

Example

The following code translates german word tanzen with a typo(double n) and prints the result:

client = GoogleTranslate::Client.new
tr = client.translate("de", "en", "tanzenn")

puts "#{tr.source_lang} -> #{tr.target_lang}"
puts "Query: #{tr.query}"
puts "Corrected query: #{tr.corrected_query}"
puts "Text: #{tr.text}"
tr.variants.each do |word_class, words|
  puts word_class
  words.each do |word|
    puts "  #{word}"
  end
end

Output:

de -> en
Query: tanzenn
Corrected query: tanzen
Text: dance
verb
  dance
  hop
  spin
  bob
  foot

Development

To run specs:

crystal spec

Contributors

  • greyblake Sergey Potapov - creator, maintainer

More Repositories

1

nutype

Rust newtype with guarantees 🇺🇦 🦀
Rust
1,068
star
2

whatlang-rs

Natural language detection library for Rust. Try demo online: https://whatlang.org/
Rust
926
star
3

ta-rs

Technical analysis library for Rust language
Rust
584
star
4

vim-preview

Vim plugin for previewing markup files(markdown,rdoc,textile,html)
Vim Script
209
star
5

envconfig-rs

Build a config structure from environment variables in Rust without boilerplate
Rust
186
star
6

blogo

Mountable blog engine for Ruby on Rails
Ruby
101
star
7

kinded

Generate Rust enum variants without associated data
Rust
81
star
8

cargo-testify

Watches changes in a rust project, runs test and shows friendly notification
Rust
80
star
9

awesome-programming-books

List of good programming books for beginners and professionals
80
star
10

mago

Magic numbers detector for Ruby source code
Ruby
58
star
11

humble-investing

List of resources that I use for investing research
41
star
12

jsonpath-rs

JSONPath for Rust
Rust
37
star
13

from-typescript-to-rescript

Frontend of https://Inhyped.com written in TypeScript and rewritten in ReScript
TypeScript
29
star
14

telebot

Ruby client for Telegram bot API
Ruby
28
star
15

fast_seeder

Speed up seeding your Rails application using multiple SQL inserts!
Ruby
25
star
16

xplan

Visualizes dependencies between tasks
Rust
22
star
17

dm-rspec

RSpec matchers for DataMapper
Ruby
19
star
18

hellcheck

HTTP health checker implemented in Rust
Rust
19
star
19

vim-esperanto

Vim plugin for typing Esperanto language in any way (Esperanto keyboard, h, x, ^)
Vim Script
15
star
20

hail

HTTP load testing tool powered by Rust
Rust
14
star
21

crystal-magma

Crystal interpreter
Crystal
13
star
22

poloniex-rs

Rust client for Poloniex API
Rust
9
star
23

whatlang-ffi

C bindings for whatlang Rust library
C
9
star
24

rustcast

Code for RustCast screencast episodes (https://www.youtube.com/channel/UCZSy_LFJOtOPPcsE64KxDkw)
Rust
8
star
25

crystal-aitk

Artificial Intelligence Tool Kit for Crystal lang
Crystal
8
star
26

tokipona

Ruby library to process constructed language Toki Pona
Ruby
8
star
27

rails3_pg_deferred_constraints

Rails 3 engine which provides a hack to avoid RI_ConstraintTrigger Error bug.
Ruby
7
star
28

dotvim

My .vim
Vim Script
4
star
29

conway-rs

Conway's Game of Life implemented in Rust.
Rust
4
star
30

arbitrary_ext

Provides a way to derive Arbitrary trait but set custom implementation for single fields if necessary.
Rust
4
star
31

crystal-glosbe

Crystal Client for Glosbe API
Crystal
3
star
32

rails_markdown

Allows you to use markdown templates with placeholders in rails application}
Ruby
3
star
33

vim-smartdict

Vim plugin to use translate words (dictionary).
Vim Script
3
star
34

dot-nvim

My nvim config
Vim Script
2
star
35

crystal-cossack

Simple and flexible HTTP client for Crystal with middleware and test support.
2
star
36

enum_param-rs

Rust
2
star
37

beep-alarm

Alarm written in bash and based on beep tool
2
star
38

crystal-delemma

Lemmatization tool for German language.implemented in Crystal
Crystal
2
star
39

crystal-telegram_bot

Crystal
2
star
40

whatlang-website

Website for whatlang (whatlang.org)
JavaScript
2
star
41

crystal-icr

Interactive console for Crystal programming language
2
star
42

envconfig-rs-old

An easy way to build a config structure form environment variables in Rust without boilerplate.
Rust
1
star
43

greyblake.github.com

My blog
HTML
1
star
44

talks

Public talks / presentations
Vue
1
star
45

alis

Tool to create more flexible aliases.
Ruby
1
star
46

rustcast-travis-demo

Rust
1
star
47

gync

Synchronize data of desktop applications with Git
Ruby
1
star
48

dm-enum

Enumerated models for DataMapper
Ruby
1
star
49

deutscher_bot

Telegram Bot that helps to learn German, implemented in Crystal
Crystal
1
star
50

crystal-jwt

JWT implementation in Crystal
1
star