Skip to content

Visualizer for Grammatical Error Correction task.

Notifications You must be signed in to change notification settings

gotutiyan/gec_analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GEC Analyzer

GEC Analyzer is a visualizer for Grammtical Error Correction efficiently.

  • You can see the error correction easily.
  • You can narrow down your search by error type (ERRANT definition).
  • Because GEC Analyzer visualizes multiple references and hypotheses, you can analyze which error corrections are true, and which corrections that are different from other GEC systems.

Install

python >=3.7

pip install -r requirements.txt
python -m spacy download en

Usage

python run.py --orig <orig file> --hyps <output files> --refs <reference files>

Then, please go to http://127.0.0.1:5000/.

  • <output files> and <reference files> can be multiple.
  • The format of each input file can be either M2 format or raw text. Note that you must use the .m2 extension for a M2 format file.
  • M2 format can contain multiple references, but GEC Analyzer will display all of them.
  • You can specify a mixture of raw text and M2 format files.
  • If you specify raw text for --hyps or --refs, please also specify --orig. If you specify only M2 format files, --orig is not needed.

Demo

  1. Use raw text files.

    python run.py \
    --orig demo/orig.txt \
    --refs demo/ref.txt \
    --hyps demo/hyp.txt
  2. Use M2 file format files (--orig is not needed).

    python run.py \
    --refs demo/sample.m2 \
    --hyps demo/sample.m2
  3. Use multiple raw text files for each option.

    python run.py \
    --orig demo/orig.txt \
    --refs demo/ref.txt demo/ref.txt \
    --hyps demo/hyp.txt demo/hyp.txt
  4. Use mixture of M2 and raw text files for each option (This may be a rare case...).

    python run.py \
    --orig demo/orig.txt \
    --refs demo/sample.m2 demo/ref.txt \
    --hyps demo/sample.m2 demo/hyp.txt

About

Visualizer for Grammatical Error Correction task.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published