Last active
November 27, 2018 08:00
-
-
Save rudrathegreat/24b585af8e5149dff1a8657c91167a8b to your computer and use it in GitHub Desktop.
Package For Piece Check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
This file is the package required in the Piece Check | |
Text Editing Application. You can check out the Repo | |
here, link below - | |
https://github.com/rudrathegreat/Piece-Check--Text-Editing-App | |
If you would like to experiment with the Piece Check code, | |
then just simply go here, link below, to the gist which | |
contains the code - | |
https://gist.github.com/rudrathegreat/f9b749a6b3e6a3aacf9f409ae6088fa0 | |
Piece Check also requires the GingerIt, packgage, which talks | |
with the online application via the API. You can install it | |
via the command line using this line - | |
pip install gingerit | |
PieceCheck application corrects a vast range of grammar use | |
mistakes. This application not only flags mistakes but also | |
suggests any corrections. It detects grammar and spelling errors | |
in sentences and to correct them with unmatched accuracy. From | |
singular vs plural errors to the most sophisticated sentence or | |
tense usage errors. | |
''' | |
class File(object): | |
''' This class deals with files, creating them, | |
dealing with them, etc.''' | |
def save_file(self, widget_text=None, filepath=None): | |
''' This function gets the text and saves it in a | |
file with the respective directory and filename.''' | |
print("File Create: " + filepath) | |
filepath = filepath.replace('\\', '\\\\') | |
file1 = open(filepath, "w") | |
file1.write(widget_text) | |
file1.close() | |
print("File Created: " + filepath) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment