TypoChecker is a spelling mistake finder for Bulgarian words. It extracts words from PDFs and images, returning the modified PDFs and images with spelling errors marked in red and unreadable words marked in yellow.
Before you begin, make sure you have the following:
- .NET SDK installed
- Azure Document Intelligence API key
- Azure Document Intelligence endpoint
Create an appsettings.local.json file in the /src/API directory. Add the following content, replacing "your API key" and "your azure document intelligence endpoint" with your actual Azure Document Intelligence API key and endpoint:
{
"DocumentIntelligence": {
"APIKey": "your API key",
"Endpoint": "your azure document intelligence endpoint"
}
}Now you can build and run the TypoChecker project:
cd src/API
dotnet build
dotnet runThis will start the TypoChecker API.
After compiling and running the API, you can use the following endpoints to process PDFs and images:
Send a POST request to https://localhost:7055/api/check_pdfs with the PDF file(s) you want to process.
curl -X POST -H "Content-Type: multipart/form-data" -F "file1=@\"path\to\file1_with_latinic_alphabet_name.pdf\"" -F "file2=@\"path\to\file2_with_latinic_alphabet_name.pdf\"" https://localhost:7055/api/check_pdfs -o result.zipUpon completion of the operation, the results.zip file will be stored in the directory from which the command was initiated. Inside results.zip, you'll find all the edited PDFs, each highlighting spelling errors and unidentified words. Additionally, a stats.json file encapsulates comprehensive statistics related to the processed files.
- Open Postman and create a new request.
- Set the request type to POST.
- Enter the API endpoint: https://localhost:7055/api/check_pdfs.
- Switch to the Body tab.
- Select form-data as the body type.
- Add the files:
- Set the Key as file1 (or any key you prefer).
- Set the Type as File from the dropdown on the right of the Key.
- For Value, select the file by clicking on the "Choose Files" button and select your PDF file.
- Repeat the process for additional files.
- Click on the Send and Download button from the dropdown next to the Send button.
Once the operation concludes, a prompt will appear, allowing you to choose the destination for saving the results.zip file. Within results.zip, you'll discover all the refined PDFs featuring highlighted spelling errors and unidentified words. Additionally, a stats.json file encapsulates detailed statistics pertaining to the processed files.
Send a POST request to https://localhost:7055/api/check_imgs with the image file(s) you want to process.
curl -X POST -H "Content-Type: multipart/form-data" -F "file1=@\"path\to\image1_with_english_alphabet_name.jpg\"" -F "file2=@\"path\to\image2_with_english_alphabet_name.jpg\"" https://localhost:7055/api/check_imgs -o result.zipUpon completion of the operation, the results.zip file will be stored in the directory from which the command was initiated. Inside results.zip, you'll find all the edited images, each highlighting spelling errors and unidentified words. Additionally, a stats.json file encapsulates comprehensive statistics related to the processed files.
- Open Postman and create a new request.
- Set the request type to POST.
- Enter the API endpoint: https://localhost:7055/api/check_imgs.
- Switch to the Body tab.
- Select form-data as the body type.
- Add the files:
- Set the Key as file1 (or any key you prefer).
- Set the Type as File from the dropdown menu on the right of the Key.
- For Value, select the file by clicking on the "Choose Files" button and select your image.
- Repeat step 6 for additional files.
- Click on the Send and Download button from the dropdown menu next to the Send button.
Once the operation concludes, a prompt will appear, allowing you to choose the destination for saving the results.zip file. Within results.zip, you'll discover all the refined images featuring highlighted spelling errors and unidentified words. Additionally, a stats.json file encapsulates detailed statistics pertaining to the processed files.

