{"id":28795837,"url":"https://github.com/ukplab/emnlp2019-dualgraph","last_synced_at":"2026-03-13T16:31:04.753Z","repository":{"id":66147386,"uuid":"203538356","full_name":"UKPLab/emnlp2019-dualgraph","owner":"UKPLab","description":"Enhancing AMR-to-Text Generation with Dual Graph Representations (implementation for the EMNLP-IJCNLP-2019 paper)","archived":false,"fork":false,"pushed_at":"2020-05-20T08:23:43.000Z","size":464,"stargazers_count":22,"open_issues_count":1,"forks_count":6,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-06-18T03:11:28.099Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UKPLab.png","metadata":{"files":{"readme":"README-opennmt.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-08-21T08:15:00.000Z","updated_at":"2021-12-08T01:59:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f6b4cbf-8469-4988-99c7-bedb632d73bd","html_url":"https://github.com/UKPLab/emnlp2019-dualgraph","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/UKPLab/emnlp2019-dualgraph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UKPLab%2Femnlp2019-dualgraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UKPLab%2Femnlp2019-dualgraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UKPLab%2Femnlp2019-dualgraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UKPLab%2Femnlp2019-dualgraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UKPLab","download_url":"https://codeload.github.com/UKPLab/emnlp2019-dualgraph/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UKPLab%2Femnlp2019-dualgraph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30470995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T11:00:43.441Z","status":"ssl_error","status_checked_at":"2026-03-13T11:00:23.173Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-18T03:10:28.459Z","updated_at":"2026-03-13T16:31:04.745Z","avatar_url":"https://github.com/UKPLab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenNMT-py: Open-Source Neural Machine Translation\n\n[![Build Status](https://travis-ci.org/OpenNMT/OpenNMT-py.svg?branch=master)](https://travis-ci.org/OpenNMT/OpenNMT-py)\n[![Run on FH](https://img.shields.io/badge/Run%20on-FloydHub-blue.svg)](https://floydhub.com/run?template=https://github.com/OpenNMT/OpenNMT-py)\n\nThis is a [Pytorch](https://github.com/pytorch/pytorch)\nport of [OpenNMT](https://github.com/OpenNMT/OpenNMT),\nan open-source (MIT) neural machine translation system. It is designed to be research friendly to try out new ideas in translation, summary, image-to-text, morphology, and many other domains. Some companies have proven the code to be production ready.\n\nWe love contributions. Please consult the Issues page for any [Contributions Welcome](https://github.com/OpenNMT/OpenNMT-py/issues?q=is%3Aissue+is%3Aopen+label%3A%22contributions+welcome%22) tagged post. \n\n\u003ccenter style=\"padding: 40px\"\u003e\u003cimg width=\"70%\" src=\"http://opennmt.github.io/simple-attn.png\" /\u003e\u003c/center\u003e\n\nBefore raising an issue, make sure you read the requirements and the documentation examples.\n\nUnless there is a bug, please use the [Forum](http://forum.opennmt.net) or [Gitter](https://gitter.im/OpenNMT/OpenNMT-py) to ask questions.\n\n\nTable of Contents\n=================\n  * [Full Documentation](http://opennmt.net/OpenNMT-py/)\n  * [Requirements](#requirements)\n  * [Features](#features)\n  * [Quickstart](#quickstart)\n  * [Run on FloydHub](#run-on-floydhub)\n  * [Acknowledgements](#acknowledgements)\n  * [Citation](#citation)\n\n## Requirements\n\nAll dependencies can be installed via:\n\n```bash\npip install -r requirements.txt\n```\n\nNOTE: If you have MemoryError in the install try to use: \n\n```bash\npip install -r requirements.txt --no-cache-dir\n```\nNote that we currently only support PyTorch 1.1 (should work with 1.0)\n\n## Features\n\n- [data preprocessing](http://opennmt.net/OpenNMT-py/options/preprocess.html)\n- [Inference (translation) with batching and beam search](http://opennmt.net/OpenNMT-py/options/translate.html)\n- [Multiple source and target RNN (lstm/gru) types and attention (dotprod/mlp) types](http://opennmt.net/OpenNMT-py/options/train.html#model-encoder-decoder)\n- [TensorBoard](http://opennmt.net/OpenNMT-py/options/train.html#logging)\n- [Source word features](http://opennmt.net/OpenNMT-py/options/train.html#model-embeddings)\n- [Pretrained Embeddings](http://opennmt.net/OpenNMT-py/FAQ.html#how-do-i-use-pretrained-embeddings-e-g-glove)\n- [Copy and Coverage Attention](http://opennmt.net/OpenNMT-py/options/train.html#model-attention)\n- [Image-to-text processing](http://opennmt.net/OpenNMT-py/im2text.html)\n- [Speech-to-text processing](http://opennmt.net/OpenNMT-py/speech2text.html)\n- [\"Attention is all you need\"](http://opennmt.net/OpenNMT-py/FAQ.html#how-do-i-use-the-transformer-model)\n- [Multi-GPU](http://opennmt.net/OpenNMT-py/FAQ.html##do-you-support-multi-gpu)\n- Inference time loss functions.\n- [Conv2Conv convolution model]\n- SRU \"RNNs faster than CNN\" paper\n- Mixed-precision training with [APEX](https://github.com/NVIDIA/apex), optimized on [Tensor Cores](https://developer.nvidia.com/tensor-cores)\n\n## Quickstart\n\n[Full Documentation](http://opennmt.net/OpenNMT-py/)\n\n\n### Step 1: Preprocess the data\n\n```bash\npython preprocess.py -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\n```\n\nWe will be working with some example data in `data/` folder.\n\nThe data consists of parallel source (`src`) and target (`tgt`) data containing one sentence per line with tokens separated by a space:\n\n* `src-train.txt`\n* `tgt-train.txt`\n* `src-val.txt`\n* `tgt-val.txt`\n\nValidation files are required and used to evaluate the convergence of the training. It usually contains no more than 5000 sentences.\n\n\nAfter running the preprocessing, the following files are generated:\n\n* `demo.train.pt`: serialized PyTorch file containing training data\n* `demo.valid.pt`: serialized PyTorch file containing validation data\n* `demo.vocab.pt`: serialized PyTorch file containing vocabulary data\n\n\nInternally the system never touches the words themselves, but uses these indices.\n\n### Step 2: Train the model\n\n```bash\npython train.py -data data/demo -save_model demo-model\n```\n\nThe main train command is quite simple. Minimally it takes a data file\nand a save file.  This will run the default model, which consists of a\n2-layer LSTM with 500 hidden units on both the encoder/decoder.\nIf you want to train on GPU, you need to set, as an example:\nCUDA_VISIBLE_DEVICES=1,3\n`-world_size 2 -gpu_ranks 0 1` to use (say) GPU 1 and 3 on this node only.\nTo know more about distributed training on single or multi nodes, read the FAQ section.\n\n### Step 3: Translate\n\n```bash\npython translate.py -model demo-model_acc_XX.XX_ppl_XXX.XX_eX.pt -src data/src-test.txt -output pred.txt -replace_unk -verbose\n```\n\nNow you have a model which you can use to predict on new data. We do this by running beam search. This will output predictions into `pred.txt`.\n\n!!! note \"Note\"\n    The predictions are going to be quite terrible, as the demo dataset is small. Try running on some larger datasets! For example you can download millions of parallel sentences for [translation](http://www.statmt.org/wmt16/translation-task.html) or [summarization](https://github.com/harvardnlp/sent-summary).\n\n## Alternative: Run on FloydHub\n\n[![Run on FloydHub](https://static.floydhub.com/button/button.svg)](https://floydhub.com/run?template=https://github.com/OpenNMT/OpenNMT-py)\n\nClick this button to open a Workspace on [FloydHub](https://www.floydhub.com/?utm_medium=readme\u0026utm_source=opennmt-py\u0026utm_campaign=jul_2018) for training/testing your code.\n\n\n## Pretrained embeddings (e.g. GloVe)\n\nPlease see the FAQ: [How to use GloVe pre-trained embeddings in OpenNMT-py](http://opennmt.net/OpenNMT-py/FAQ.html#how-do-i-use-pretrained-embeddings-e-g-glove)\n\n## Pretrained Models\n\nThe following pretrained models can be downloaded and used with translate.py.\n\nhttp://opennmt.net/Models-py/\n\n## Acknowledgements\n\nOpenNMT-py is run as a collaborative open-source project.\nThe original code was written by [Adam Lerer](http://github.com/adamlerer) (NYC) to reproduce OpenNMT-Lua using Pytorch.\n\nMajor contributors are:\n[Sasha Rush](https://github.com/srush) (Cambridge, MA)\n[Vincent Nguyen](https://github.com/vince62s) (Ubiqus)\n[Ben Peters](http://github.com/bpopeters) (Lisbon)\n[Sebastian Gehrmann](https://github.com/sebastianGehrmann) (Harvard NLP)\n[Yuntian Deng](https://github.com/da03) (Harvard NLP)\n[Guillaume Klein](https://github.com/guillaumekln) (Systran)\n[Paul Tardy](https://github.com/pltrdy) (Ubiqus / Lium)\n[François Hernandez](https://github.com/francoishernandez) (Ubiqus)\n[Jianyu Zhan](http://github.com/jianyuzhan) (Shanghai)\n[Dylan Flaute](http://github.com/flauted (University of Dayton)\nand more !\n\nOpentNMT-py belongs to the OpenNMT project along with OpenNMT-Lua and OpenNMT-tf.\n\n## Citation\n\n[OpenNMT: Neural Machine Translation Toolkit](https://arxiv.org/pdf/1805.11462)\n\n[OpenNMT technical report](https://doi.org/10.18653/v1/P17-4012)\n\n```\n@inproceedings{opennmt,\n  author    = {Guillaume Klein and\n               Yoon Kim and\n               Yuntian Deng and\n               Jean Senellart and\n               Alexander M. Rush},\n  title     = {Open{NMT}: Open-Source Toolkit for Neural Machine Translation},\n  booktitle = {Proc. ACL},\n  year      = {2017},\n  url       = {https://doi.org/10.18653/v1/P17-4012},\n  doi       = {10.18653/v1/P17-4012}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fukplab%2Femnlp2019-dualgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fukplab%2Femnlp2019-dualgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fukplab%2Femnlp2019-dualgraph/lists"}