Code Monkey home page Code Monkey logo

arteraro's Introduction

arteraro

Arteraro is derived from Esperanto and means "artificial error."

Please feel free to comment! Any issue is welcome. Please use this code Arteraro.

  • Various Errors Improve Neural Grammatical Error Correction (PACLIC 2021)
  • ニューラル文法誤り訂正のための多様な規則を用いる人工誤り生成 (言語処理学会第27回年次大会)
    • Please use v1.0.1 to redroduce results of this paper.
    • 誤り生成規則は v1.0.1 のものを使用しています.
    • 論文中のCoNLL-2014データセットに関するスコアに誤りがありましたので,修正原稿(リンク)を公開しました.CoNLL-14の値に関してはこちらを参照ください.
    • また,論文中に載せられなかった実験結果や分析などをこちらで公開しています.こちらも参照ください.
    • モデルによる訂正の出力はこちらに公開しました.
    • 学習済みモデル(1モデル)を使って Google Colaboratory で文法誤り訂正を実行できる Jupyter Notebook を公開しました.
    • paper, outputs and analyses
    • How to reproduce?

Where are documents of error generating rules for artificial error generation?

You can see at arteraro/erarigilo/README.md.

Installation

1. environment

requirements

  • Python version >= 3.8
    • fairseq v0.10.0~2 seems to fail with python 3.9 because of change about typing.
    • So, if you want to use python 3.9, please use fairseq of the latest commit.
  • PyTorch version >= 1.8.0

recommended

  • CUDA version: 11.1
  • cudnn version: 8.2.0
  • nccl version: 2.8.4-1
  • gdrcopy version: 2.0
  • openmpi version: 4.0.5
  • fairseq version: 0.10.2

2. install packages using pip install requirements.txt

You must use SpaCy 2.3. Do not use SpaCy v1 or SpaCy v3.

3. install fairseq

If you want to reproduce our experiments in the same environment that we used, you must use fairseq==0.10.2. However, fairseq==0.10.2 has a bug of using multiple nodes, and you must rewrite one line to run experiments using multiple nodes. This bug seems to be corrected in the latest commit. You can also use the latest fairseq.

To install fairseq==0.10.2, you have to run git clone https://github.com/pytorch/fairseq.git -b v0.10.2, and install by pip install -e ..

Then, you have to rewrite a line in fairseq/distributed_utils.py like below, to run fairseq using multiple nodes.

  283:             torch.multiprocessing.spawn(
  284:                 fn=distributed_main,
  285:                 args=(main, args, kwargs),
- 286:                 nprocs=args.distributed_num_procs,
+ 286:                 nprocs = min(
+ 287:                 torch.cuda.device_count(),
+ 288:                 args.distributed_world_size),
  287:             )
  288:         else:
  289:             distributed_main(args.device_id, main, args, kwargs)

I recommend you to install apex following https://github.com/pytorch/fairseq#requirements-and-installation

4. install arteraro

You run pip install -e . under /path/to/arteraro. Then now you can use arteraro in your environment.

Let's generate artificial errors for better grammatical error correction!

arteraro's People

Contributors

nymwa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

arteraro's Issues

使い方について

Saluton! Mia nomo estas Josh. (ぐらいのエスペラント語しか覚えていなくて、すいません)

言語処理学会第27回年次大会に参加した方に論文を紹介され、とても面白く読ませていただきました。
私も文法誤り訂正関係の研究をしており、ちょうど人工データの生成方法を探していたところなので、研究でerarigiloを使えたらと思っています(もちろん引用します)。

リポジトリをクローンして、自分のパソコンで走らせることはできましたが、良ければ聞きたいことがいくつかあります。

  1. きれいなデータから誤りデータを生成する手順としては、以下のような流れで合っているでしょうか? 特に、この3つ以外に必要なコマンドがないのを確かめたいと思っています。en_erg_scriptもあると思いますが、下記の3つとすることが同じという理解で合っているでしょうか?
en_erg_preprocess < test.text > test.json
en_erg_noise < test.json > errored.json
en_erg_form < errored.json > output.tsv
  1. コンフィグファイル(config.yaml)はarterarejoにたくさんあるようですが、全部同じでしょうか?違いがあるとしたら、最も性能が出たものや論文で使ったものなどおすすめがあれば助かります。
  2. arteraroをツールとして使いやすくするためのプルリクエストは受け付けていますか?以前からこういうツールがあれば良いのにと思っているので、少しでも力になれたらと思います。最低限使いこなせたら英語での詳しいドキュメンテーションなど書けます。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.