Skip to content

nttcslab-nlp/control-length

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Positional Encoding to Control Output Sequence Length

This repository contains source files we used in our paper

Positional Encoding to Control Output Sequence Length

Sho Takase, Naoaki Okazaki

Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies

Requirements

  • Python 3.6 or later for training
  • Python 2.7 for calculating rouge
  • PyTorch 0.4
    • To use new version PyTorch (e.g., 1.4.0), please use this code without one-emb option.

Test data

Test data used in our paper for each length

Pre-trained model

The following file contains pre-trained LRPE + PE model in English dataset. This model outputs @@@@ as a space, namely, a segmentation marker of words.

The file also contains BPE code to split a plane English text into BPE with this code.

https://drive.google.com/file/d/15Sy8rv6Snw6Nso7T5MxYHSAZDdieXpE7/view?usp=sharing

Acknowledgements

A large portion of this repo is borrowed from the following repos: https://github.com/pytorch/fairseq and https://github.com/facebookarchive/NAMAS.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.7%
  • Shell 2.0%
  • Perl 0.8%
  • Lua 0.7%
  • C++ 0.6%
  • Batchfile 0.1%
  • Makefile 0.1%