项目介绍

harsh19/Shakespearizing-Modern-English 是一个托管在 GitHub 上的开源项目,主要使用 OpenEdge ABL 编写,目前获得 74 个 Star、27 次 Fork。

仓库全名
harsh19/Shakespearizing-Modern-English
Star 数
74
Fork 数
27

README 摘要

Shakespearizing-Modern-English Code for "Jhamtani H., Gangal V., Hovy E. and Nyberg E. Shakespearizing Modern Language Using Copy-Enriched Sequence to Sequence Models" Workshop on Stylistic Variation, EMNLP 2017 Link to paper: https://arxiv.org/abs/1707.01161 Requirements Python 2.7 Tensorflow 1.1.0 Instructions to run: Preprocessing: Change working directory to code/main/ Create a new directory named 'tmp' Run…

完整内容见 GitHub 原始 README 或本页 。

常见问题

Shakespearizing-Modern-English 用什么语言开发?

主要使用 OpenEdge ABL 编写,目前有 74 个 Star。

如何获取 Shakespearizing-Modern-English 的源码?

可以直接克隆仓库:git clone https://github.com/harsh19/Shakespearizing-Modern-English.git;安装与运行步骤见仓库 README。

Shakespearizing-Modern-English 最近还在维护吗?

仓库最近一次更新为 2021年4月21日,当前没有未关闭的 Issue;Star 数为 74,可作为社区活跃度的参考。

关于

Code for "Jhamtani H.*, Gangal V.*, Hovy E. and Nyberg E. Shakespearizing Modern Language Using Copy-Enriched Sequence to Sequence Models" Workshop on Stylistic Variation, EMNLP 2017

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

README

Shakespearizing-Modern-English

Code for “Jhamtani H., Gangal V., Hovy E. and Nyberg E. Shakespearizing Modern Language Using Copy-Enriched Sequence to Sequence Models” Workshop on Stylistic Variation, EMNLP 2017

Link to paper: https://arxiv.org/abs/1707.01161

Requirements

  • Python 2.7
  • Tensorflow 1.1.0

Instructions to run:

Preprocessing:
  • Change working directory to code/main/
  • Create a new directory named ‘tmp’
  • Run:
    python mt_main.py preprocessing
Pointer model:
  • First run pre-processing
  • Change working directory to code/main/
  • python mt_main.py train 10 pointer_model
    For inference:
  • Change working directory to code/main/
  • python mt_main.py inference tmp/pointer_model7.ckpt greedy
Normal seq2seq model:
  • Look at seq2seq branch of the repo
Post-Processing:

There are two post-processing actions which one may be interested in performing:

  1. Visualizing attention matrices
  2. Replacing UNKS in hypothesis with their highest-aligned (attention) input tokens. For both of these actions, refer to the running instructions in code/main/post_process.py (comments commencing the file). The file can be run in two modes, to perform 1 (write) and 2 (postProcess) respectively*. *Not elaborated on here to preserve conciseness and clarity.
    Note that the path to test file is hard-coded in the post_process.py file, so to try with a new file,one will have to make corresponding changes.
Baseline (Dictionary):
  • Change working directory to code/baselines/
  • Run:
    python dictionary_baseline.py ../../data/shakespeare.dict ../../data/test.modern.nltktok ../../data/test.dictBaseline
  • The test.dictBaseline file contains the output (Shakespearean) of the dictionary baseline.
  • To evaluate BLEU:
    • Change working directory to code/main/
    • Run:
      perl multi-bleu.perl -lc ../../data/test.original.nltktok < ../../data/test.dictBaseline
Baseline (statistical MT)
  • Please follow instructions in “Wei Xu, Alan Ritter, William B Dolan, Ralph Grish- man, and Colin Cherry. 2012. Paraphrasing for style. In 24th International Conference on Computational Linguistics, COLING 2012.”

Citation

If you use this code or the processed data, please consider citing our work:

@article{jhamtani2017shakespearizing,
  title={Shakespearizing Modern Language Using Copy-Enriched Sequence-to-Sequence Models},
  author={Jhamtani, Harsh and Gangal, Varun and Hovy, Eduard and Nyberg, Eric},
  journal={EMNLP 2017},
  volume={6},
  pages={10},
  year={2017}
}

Additionally, if you use the data, please consder citing “Wei Xu, Alan Ritter, William B Dolan, Ralph Grish- man, and Colin Cherry. 2012. Paraphrasing for style. In 24th International Conference on Computational Linguistics, COLING 2012.”

评论

暂无评论