Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fixes, Minor Changes and Improvements #4

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

umut-er
Copy link

@umut-er umut-er commented Sep 22, 2022

Changes are as follows (also briefly explained in commit messages, review commit history):

--- BUG FIXES ---
-> There was a bug where if the first word of the text was incorrect, program would not detect it. Now, it is fixed.
-> Program now reports less false positives, for example now it doesn't report the word "kar" in the word "Ankara". Namely, it doesn't report false positives when the substring (in this example, "kar") is not in the beginning of the word (ex. anKARa would not be reported after changes.). It still finds and reports the word "yar" in "yardımlaşma" though. The aforementioned proved to be an extremely difficult problem for me. This also effects the case of "ziyankar" which previously was reported by "kar" and due to how "__word_in_text" was constructed, it would produce the context "...kar blah blah...". Now the word "ziyankar" does not get reported by "kar" and proper context gets constructed and subsequently shown to the user.
-> Also fixed bug where if the words "yar" and "yardımlaşma" simultaneously exist in a text, fixing "yar" would produce "yârdımlaşma". Now it asks for each and every single occurance. To get intended results, the function "change_wrong_results" was significantly altered and changes were made to "__word_in_text" in order to insure intended behaviour. The functionality of these functions was not changed, but the internal working was changed.
-> Fixed bug where "yar" would get detected but not "Yar". Wrote a script to include uppercase letters in "wrong_words.txt" and "correct_words.txt".

--- STYLISTIC AND OTHER MINOR CHANGES ---
-> Added type hinting to methods as well as init variables.
-> Slightly altered the way that "correct_words.txt" and "wrong_words.txt" is read.
-> Made output more readable by introducing some new lines.
-> Added a print statement to the function "exit" informing the user about the existence of Booldum_Metin.txt.

More testing has to be done, what I have tested is most likely not enough but I tried my best to test my code versus some edge cases.
It is also possible that I forgot to mention some changes, but I tried to be as thorough as possible.

The following all apply to booldum_nodocx.py(no change to booldum.py) was made in this commit.
-> Fixed bug where if the first word was incorrect, the program was unable to catch it.
-> Made improvements, now program catches less false positives.
-> Added type hinting to methods and __init__ variables
-> Now output string is formatted better with newlines.
@umut-er
Copy link
Author

umut-er commented Sep 23, 2022

Btw, only booldum_nodocx.py was changed with these commits.
Edit: And by that I mean that booldum.py was not altered.

@umut-er umut-er marked this pull request as draft September 26, 2022 18:03
@umut-er umut-er marked this pull request as ready for review September 26, 2022 18:03
@umut-er umut-er marked this pull request as draft September 26, 2022 18:03
@umut-er umut-er marked this pull request as ready for review September 26, 2022 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant