Skip to content

Latest commit

 

History

History
51 lines (41 loc) · 1.4 KB

File metadata and controls

51 lines (41 loc) · 1.4 KB

Architecture of the project

This repo is organized in multiple modules, each of them having a header file and a test file

.
├── benchmark
├── build
├── dicts
├── docs
├── inputs
│
├── headers
│   ├── ...
│   ├── corrector.h
│   ├── detector.h
│   ├── file_handler.h
│   └── io.h
├── src
│   ├── ...
│   ├── corrector.c
│   ├── detector.c
│   ├── file_handler.c
│   ├── io.c
│   └── main.c
├── tests
│   ├── corrector.c
│   ├── detector.c
│   ├── file_handler.c
│   ├── io.c
│   └── main.c
│
├── .gitignore
├── Makefile
└── README.md

You can find the specifications of each functions in the headers directory, most of them also contains informations about the time and spacial complexity

The main modules

  • src/detector.c: Detects and localizes errors using binary search to find the dictionary that minimises the errors count for each lines

  • src/corrector.c: Suggests corrections for found errors using Levenshtein distance and finding the closest candidates

  • src/file_handler.c: Loads the input file and the dictionaries

  • src/io.c: Writes the binary outputs

  • src/main.c: Parses the arguments and uses the modules when needed