OpenNMT-py | Open Source Neural Machine Translation in PyTorch | Machine Learning library

 by   OpenNMT Python Version: 3.5.1 License: MIT

kandi X-RAY | OpenNMT-py Summary

kandi X-RAY | OpenNMT-py Summary

OpenNMT-py is a Python library typically used in Artificial Intelligence, Machine Learning, Deep Learning, Pytorch, Tensorflow applications. OpenNMT-py has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can install using 'pip install OpenNMT-py' or download it from GitHub, PyPI.

[Forum] OpenNMT-py is the [PyTorch] version of the [OpenNMT] project, an open-source (MIT) neural machine translation framework. It is designed to be research friendly to try out new ideas in translation, summary, morphology, and many other domains. Some companies have proven the code to be production ready. We love contributions! Please look at issues marked with the [contributions welcome] tag. Before raising an issue, make sure you read the requirements and the documentation examples. Unless there is a bug, please use the [forum] or [Gitter] to ask questions.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              OpenNMT-py has a medium active ecosystem.
              It has 6109 star(s) with 2185 fork(s). There are 172 watchers for this library.
              There were 2 major release(s) in the last 12 months.
              There are 12 open issues and 1363 have been closed. On average issues are closed in 74 days. There are 12 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of OpenNMT-py is 3.5.1

            kandi-Quality Quality

              OpenNMT-py has 0 bugs and 0 code smells.

            kandi-Security Security

              OpenNMT-py has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              OpenNMT-py code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              OpenNMT-py is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              OpenNMT-py releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              OpenNMT-py saves you 5897 person hours of effort in developing the same functionality from scratch.
              It has 14305 lines of code, 972 functions and 114 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed OpenNMT-py and discovered the below as its top functions. This is intended to give you an instant insight into OpenNMT-py implemented functionality, and help decide if they suit your requirements.
            • Start the translation server
            • Load a model
            • Clone a model by id
            • Unloads the loader
            • Forward computation
            • Generate a matrix of relative positions
            • Matrix multiplication
            • Translate src into words
            • Encode a Unicode string
            • Apply a single step
            • Check shape
            • Run a forward pass through the embeddings
            • Translate a batch of target vocab
            • Aligns the prediction
            • Encode a BPE string
            • Perform a forward pass on the embedding
            • Compute the loss
            • Create a model from opt
            • Forward forward computation
            • Compute the embeddings
            • Build vocabulary
            • Updates the statistics for a given pair
            • Compute the graph representation of the graph
            • Train the model
            • Build a vocabulary
            • Compute the attention score
            • Build a trainer
            Get all kandi verified functions for this library.

            OpenNMT-py Key Features

            No Key Features are available at this moment for OpenNMT-py.

            OpenNMT-py Examples and Code Snippets

            Self-Supervised Neural Machine Translation,Questions?
            Pythondot img1Lines of Code : 21dot img1License : Permissive (MIT)
            copy iconCopy
            @inproceedings{ruiter2019self-supervised,
              title={Self-Supervised Neural Machine Translation},
              author={Ruiter, Dana and Espa{\~{n}}a-Bonet, Cristina and van Genabith, Josef},
              booktitle = {Proceedings of the 57th Annual Meeting of the Association  
            copy iconCopy
            @inproceedings{zekangli2018incremental,
             author = {Zekang Li, Cheng Niu, Fandong Meng, Yang Feng, Qian Li, Jie Zhou},
             booktitle = {Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics},
             title = {Incremental Transf  
            copy iconCopy
            train_src: train_data.tok.srcmt
            train_tgt: train_data.tok.pe
            
            valid_src: dev.tok.srcmt
            valid_tgt: dev.tok.pe
            
            save_data: prep-data
            
            src_vocab_size: 200000
            tgt_vocab_size: 200000
            
            shard_size: 100000
            
            bert_src: bert-base-multilingual-cased
            bert_tgt: be  
            dgl - functions
            Pythondot img4Lines of Code : 134dot img4License : Non-SPDX (Apache License 2.0)
            copy iconCopy
            """
            An original implementation of sparsemax (Martins & Astudillo, 2016) is available at
            https://github.com/OpenNMT/OpenNMT-py/blob/master/onmt/modules/sparse_activations.py.
            See `From Softmax to Sparsemax: A Sparse Model of Attention and Multi-La  
            dgl - 7 transformer
            Pythondot img5Lines of Code : 0dot img5License : Non-SPDX (Apache License 2.0)
            copy iconCopy
            """
            .. _model-transformer:
            
            Transformer as a Graph Neural Network
            ======================================
            
            **Author**: Zihao Ye, Jinjing Zhou, Qipeng Guo, Quan Gan, Zheng Zhang
            
            .. warning::
            
                The tutorial aims at gaining insights into the paper, w  
            Trouble with OpenNMT Toy Example (Python3.9)
            Pythondot img6Lines of Code : 45dot img6License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            pip install --upgrade OpenNMT-py==2.0.0rc1;
            wget https://s3.amazonaws.com/opennmt-trainingdata/toy-ende.tar.gz;
            tar xf toy-ende.tar.gz;
            echo '## Where the samples will be written
            save_data: toy-ende/run/example
            ## Where the vocab(s) will b
            OpenNMT-py summarization runtime
            Pythondot img7Lines of Code : 21dot img7License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            Mon Feb 10 16:10:25 2020       
            +-----------------------------------------------------------------------------+
            | NVIDIA-SMI 418.87.01    Driver Version: 418.87.01    CUDA Version: 10.1     |
            |-------------------------------+--------------
            Getting attention weights in opennmt-py
            Pythondot img8Lines of Code : 4dot img8License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            translate.py ... \
                         -attn_debug \
                         ...
            
            How to install torch audio on Windows 10 conda?
            Pythondot img9Lines of Code : 43dot img9License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            $ git clone https://github.com/chirlu/sox/tree/master/lpc10 sox2
            $ cp -R sox2/lpc10 sox
            
            Start window -> open local folder -> sox/lpc10
            (it reads CMakeLists.txt automatically)
            Build->build All
            
            Transfer learning with OpenNMT
            Pythondot img10Lines of Code : 18dot img10License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            for name, param in self.encoder.named_parameters():
                param.requires_grad = False
            
            class Net(nn.Module):
                def __init__(self, params):
                    super(Net, self).__init__()
            
                    self.encoder = TransformerEncod

            Community Discussions

            QUESTION

            How can I use custom tokenizer in opennmt transformer
            Asked 2022-Feb-11 at 09:07

            I'm tring to transformer for translation with opennmt-py.
            And I already have the tokenizer trained by sentencepiece(unigram).
            But I don't know how to use my custom tokenizer in training config yaml.
            I'm refering the site of opennmt-docs (https://opennmt.net/OpenNMT-py/examples/Translation.html).
            Here are my code and the error .

            ...

            ANSWER

            Answered 2022-Feb-11 at 09:07

            I got the answers.

            1. we can use tools/spm_to_vocab in onmt.
            2. train_from argument is the one.

            Source https://stackoverflow.com/questions/71062002

            QUESTION

            Trouble with OpenNMT Toy Example (Python3.9)
            Asked 2021-Apr-21 at 21:06

            I recently installed OpenNMT but getting the following error when going through the toy example.

            I have macOS Big Sur 11.2.1 I have python2.7 and python3.9 installed.

            pip install --upgrade OpenNMT-py==2.0.0rc1

            wget https://s3.amazonaws.com/opennmt-trainingdata/toy-ende.tar.gz

            tar xf toy-ende.tar.gz

            cd toy_ende

            ...

            ANSWER

            Answered 2021-Apr-21 at 21:06

            You can follow this procedure:

            Source https://stackoverflow.com/questions/67201174

            QUESTION

            Can not find file preprocessing.py in OpenNMT package
            Asked 2020-Oct-02 at 09:48

            I used to use file preprocessing.py of OpenNMT package https://github.com/OpenNMT/OpenNMT-py to preprocess my raw data. Unfortunately recently I can not find that file in that package any more. Do you know where I can find that file or if you still have it, could you please send it to my email: tuankstn@gmail.com. Thank you so much.

            ...

            ANSWER

            Answered 2020-Oct-02 at 09:48

            There has been a new OpenNMT-py 2.0 release recently, and the previous version code has been moved to legacy branch.

            You may find it at https://github.com/OpenNMT/OpenNMT-py/tree/legacy. Note there is no preprocessing.py file there, there is only preprocess.py:

            Source https://stackoverflow.com/questions/64165317

            QUESTION

            how convert string to path in opemnmt-py
            Asked 2020-May-30 at 14:40

            I use opennmt-py for MT and in the code any time I want to set a path I have to write all directory and it's not good looking when I have long directory. is there any way to set a string as the main directory and just add the file name to the end. I use google colab to train the model The code is like:

            ...

            ANSWER

            Answered 2020-May-30 at 14:40

            You may use a mere concatenation:

            Source https://stackoverflow.com/questions/62103582

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install OpenNMT-py

            Install OpenNMT-py from pip:.
            Python >= 3.6
            PyTorch == 1.6.0

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install OpenNMT-py

          • CLONE
          • HTTPS

            https://github.com/OpenNMT/OpenNMT-py.git

          • CLI

            gh repo clone OpenNMT/OpenNMT-py

          • sshUrl

            git@github.com:OpenNMT/OpenNMT-py.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link