Giter Site home page Giter Site logo

server's Introduction

This project is considered obsolete as the Torch framework is no longer maintained. If you are starting a new project, please use an alternative in the OpenNMT family: OpenNMT-tf (TensorFlow) or OpenNMT-py (PyTorch) depending on your requirements.

Build Status codecov

OpenNMT: Open-Source Neural Machine Translation

OpenNMT is a full-featured, open-source (MIT) neural machine translation system utilizing the Torch mathematical toolkit.

The system is designed to be simple to use and easy to extend, while maintaining efficiency and state-of-the-art translation accuracy. Features include:

  • Speed and memory optimizations for high-performance GPU training.
  • Simple general-purpose interface, only requires and source/target data files.
  • C++ implementation of the translator for easy deployment.
  • Extensions to allow other sequence generation tasks such as summarization and image captioning.

Installation

OpenNMT only requires a Torch installation with few dependencies.

  1. Install Torch
  2. Install additional packages:
luarocks install tds
luarocks install bit32 # if using LuaJIT

For other installation methods including Docker, visit the documentation.

Quickstart

OpenNMT consists of three commands:

  1. Preprocess the data.
th preprocess.lua -train_src data/src-train.txt -train_tgt data/tgt-train.txt -valid_src data/src-val.txt -valid_tgt data/tgt-val.txt -save_data data/demo
  1. Train the model.
th train.lua -data data/demo-train.t7 -save_model model
  1. Translate sentences.
th translate.lua -model model_final.t7 -src data/src-test.txt -output pred.txt

For more details, visit the documentation.

Citation

A technical report on OpenNMT is available. If you use the system for academic work, please cite:

@ARTICLE{2017opennmt,
  author = {{Klein}, G. and {Kim}, Y. and {Deng}, Y. and {Senellart}, J. and {Rush}, A.~M.},
  title = "{OpenNMT: Open-Source Toolkit for Neural Machine Translation}",
  journal = {ArXiv e-prints},
  eprint = {1701.02810}
}

Acknowledgments

Our implementation utilizes code from the following:

Additional resources

server's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

server's Issues

How to use the translation server?

Dear OpennMT Team,

Please excuse my asking. How can I actually run the server with a test model from the OpenNMT website and perform translations?

Thanks!

Rest Server issue: source text is sent but no translation is returned

Hi Alexander,

It took me a while to figure out how to run the Rest server and I used your Flask server http://github.com/OpenNMT/Server/

As you can see in the screen shot, it seems that the source text is sent, but no translation is returned either in the terminal or the web page. Any idea why?

I tested it first with source 'word', then the sentence "You can print all files directly.', but nothing is returned.

Here is a screen shot

https://www.dropbox.com/s/1b3k9a3nri6oj9w/opennmt.PNG?dl=0

Thanks in advance for your support.

Kind regards,
Mohamed

I hope my work could help you.

I have write one simple web app based on your code, and I hope it could help you now.
I'm not good at web, there are my rough project.
And maybe you could visit a sample here.

undefined symbol: lua_tointeger

Hi there! I'm using lua 5.2 because of out of the memory in lua 5.1 when preprocessing. But after installing zmq, the error is undefined symbol: lua_tointeger and zmq is installed in lua 5.1. How can I solve it? Here is error:
th> require("zmq")
/home/zyyt/torch/install/share/lua/5.2/trepl/init.lua:389: error loading module 'zmq' from file '/usr/local/lib/lua/5.1/zmq.so':
/usr/local/lib/lua/5.1/zmq.so: undefined symbol: lua_tointeger
stack traceback:
/home/zyyt/torch/install/share/lua/5.2/trepl/init.lua:506: in function </home/zyyt/torch/install/share/lua/5.2/trepl/init.lua:499>
[C]: in function 'error'
/home/zyyt/torch/install/share/lua/5.2/trepl/init.lua:389: in function 'require'
[string "_RESULT={require("zmq")}"]:1: in main chunk
[C]: in function 'xpcall'
/home/zyyt/torch/install/share/lua/5.2/trepl/init.lua:661: in function 'repl'
...zyyt/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk
[C]: in ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.