Tree2seq
C++ code of "Tree-to-Sequence Attentional Neural Machine Translation (tree2seq ANMT)"
Install / Use
/learn @akikoe/Tree2seqREADME
Tree2Seq: Tree-to-Sequence Attentional Neural Machine Translation
We have proposed a novel syntactic ANMT model, "Tree-to-Sequence Attentional Neural Machine Translation" [1]. We extend an original sequence-to-sequence model [2] with the source-side phrase structure. Our model has an attention mechanism that enables the decoder to generate a translated word while softly aligning it with source phrases and words. Here is an online demo of Tree2Seq.
Description
C++ codes of the syntactic Attention-based Neural Machine Translation (ANMT) model.
AttentionTreeEncDec.xpp: our ANMT model, "Tree-to-Sequence Attentional Neural Machine Translation"AttentionEncDec.xpp: Baseline ANMT model [3]/data/: Tanaka Corpus (EN-JP) [4]
Requirement
- Eigen, a template libary for linear algebra (http://eigen.tuxfamily.org/index.php?title=Main_Page)
- N3LP, C++ libaray for neural network-based NLP (https://github.com/hassyGo/N3LP)
- Boost, C++ library for tree structure (http://www.boost.org/)
- Option: Enju, a syntactic parser for English (http://kmcs.nii.ac.jp/enju/?lang=en)
Usage
- Modify the paths of
EIGEN_LOCATION,SHARE_LOCATIONandBOOST_LOCATION. SeeMakefile. $ bash setup.sh$./tree2seq(Then, training theAttentionTreeEncDecmodel starts.)- Modify
main.cppif you want to change the model.
(!) Attention: I prepare a small corpus of Tanaka corpus. You need over 100,000 parallel corpus.
Citation
- [1] Akiko Eriguchi, Kazuma Hashimoto, and Yoshimasa Tsuruoka. 2015. "Tree-to-Sequence Attentional Neural Machine Translation". In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (ACL 2016).
- [2] I. Sutskever, O. Vinyals, and Q. V. Le. 2014. "Sequence to Sequence Learning with Neural Networks". In Proceedings of Advances in Neural Information Processing Systems 27 (NIPS2014).
- [3] T. Luong, H. Pham, and C. D. Manning. 2015. "Effective Approaches to Attention-based Neural Machine Translation". In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing (EMNLP2015).
- [4] Tanaka Corpus
Contact
Thank you for your interests. If you have any questions and comments, feel free to contact us.
- eriguchi [.at.] logos.t.u-tokyo.ac.jp
- hassy [.at.] logos.t.u-tokyo.ac.jp
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
