Skip to content

kortirso/systran

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Systran

API Wrapper for SYSTRAN translation services with Elixir

Installation

If available in Hex, the package can be installed by adding systran to your list of dependencies in mix.exs:

def deps do
  [
    {:systran, "~> 0.1.0"}
  ]
end

Get access to API

Getting a SYSTRAN API KEY

To make api requests in Systran you must include access key in request params.

Instruction for getting access key is here

Configuration

The default behaviour is to configure using the application environment:

In config/config.exs, add:

config :systran, api_key: "API_KEY"

Translate services

Translation

Request for translating text is #translate.

Systran.Translate.translate(%{input: "Hello", source: "en", target: "ru"})

Options

key - access key, optional if key exists in config
input - text for translation, required
source - source language, ISO 639-1 format (like "en"), optional
target - target language, ISO 639-1 format (like "ru"), required

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kortirso/systran.

License

The package is available as open source under the terms of the MIT License.

Disclaimer

Use this package at your own peril and risk.

Documentation

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/systran.

About

API Wrapper for SYSTRAN translation services with Elixir

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages