An application to correct spelling errors from files. You can create your own database with lists of corrections to search-and-replace strings from files. Replace errors from multiple files with a single click of a button. Apply new corrections to your database and apply those into different set of files.
In computing, a regular expression (abbreviated regex or regexp) is a sequence of characters that forms a search pattern, mainly for use in pattern matching with strings, or string matching, i.e. "find and replace"-like operations." [Wikipedia - Regular expressions](http://en.wikipedia.org/wiki/Regular_expression
A simple search-and-replace. Almost every text editor has the same feature.
A mode to distinguish words in lines. This is the most used mode in the
application. Basically it's the RegEx mode with the word boundaries surrounding
the error string. For example, if you would like to replace all the letters
"l"
with the letter "I"
(very common error when using
OCR), you should
use the "Word" mode. If you would use, say, the mode "Replace", the application
would replace all the letters "l"
, including the ones inside words.
"Shallow"
would become "ShaIIow"
.
Note: The first and last characters of your error string should be alphanumeric characters. Otherwise the mode does not work as expected. As explained above, word boundaries are applied to the error string when fixing. This prevents you from using any other characters than alphanumeric characters at the beginning and the end of your error string, since the application is expecting a word character at those positions. More technical explanation can be found at this website: http://www.regular-expressions.info/
Since case-insensitive search-and-replace would bring it's own problems, the
application is provided with an option named "Variations". When enabled, this
option automatically creates different text-case variations of your error and
correction strings. For instance, error "lor em"
and correction "lorem"
would have these variations:
lor em --> lorem
Lor em --> Lorem
LOR EM --> LOREM
Create a new database.
Opens a database.
Quits the application.
Opens your web browser and takes you to the wiki page.
Application information.
"Process multiple files."
The directory path to the files to process.
Opens a directory.
List of files in the selected directory.
Correction lists to use when processing files.
Starts the processing of the files.
"Maintain the corrections in the database."
ID = Key for the correction in database. Mode = Mode of the correction when processing. List = List of the correction. Variations = Creates different text-case variations of your error and correction strings. Error = The string to search when processing. Correction = The string to apply when processing. Comment = Comment for the correction.
Filters the corrections from the database by selected mode.
Filters the corrections from the database by selected list.
Inserts a new correction to the database.
Deletes the selected correction from the database.
Applies the information of the selected correction to the database.
"Process a single file."
The path to the file to process.
Opens a new file.
The contents of the file.
Correction lists to use when processing file.
Starts the file processing.
"Maintain the correction lists in the database."
ID = Key for the list in database. Selected = Defines if the list should be selected by default when processing. Name = Name of the list. Comment = Comment for the list.
Inserts a new list to the database.
Deletes the selected list from the database.
Applies the information of the selected list to the database.
"Modify the application's settings."
Specify the file encoding when opening and saving files. For more information about file encodings, check the wikipedia page.
Removes the empty lines from the end of the file(s).
First you need to open a file. Currently the application supports two file types, SubRip (srt) and text files (txt). Select the tab named "Fix" and click the "Open file..." button. Browse for file using the windows open file dialog.
Select "Create a new database..." from the "File" menu. Enter a name for the database and click "OK" on the dialog.
Select the "Lists" tab. Click on the "Insert row" button. Now you have created a new list for your corrections. Edit the name for the list you've created in the "Name" column of the lists table and click "Update row" to save the changes to the database.
Select the "Corrections" tab. Select the mode "Word" from the dropdown list on the right. Right below should be the list you created on the "List" dropdown menu. Now click on the "Insert row" button to create a new correction. Edit the error and correction to the corrections table for your new correction. Click on the "Update row" button to save the changes into the database. The error is the string the program looks when you fix files and the correction is the replacement string.
Now, let's assume the file you chose in the "Fix" tab has the word "lorem" in it. If we would like to replace all those words to read "ipsum", we would create a correction where the error would be "lorem" and the correction would be "ipsum".
Return to the "Fix" tab. You should now still have your file loaded. Now click on the "Start" button. Now all the corrections you have defined in the "Corrections" tab are applied to the file.
Open your terminal application and type:
sudo apt install python3 python3-pyqt4
Hit enter. Enter your password when prompted. Answer yes to the question about using additional disk space.
git clone https://github.com/bulkware/bwreplacer.git
Enter the application directory using this command:
cd bwreplacer
You can run the application from the source code using this command:
python3 main.py