Spaces:
Sleeping
Sleeping
from ginger import correct_sentence | |
def main(): | |
""" | |
Main application function. | |
Prompts the user for input and corrects grammar using the Ginger API. | |
""" | |
while True: | |
# Get input from the user | |
text = input("Enter a sentence (or 'q' to quit): ") | |
# Exit the loop if the user wants to quit | |
if text.lower() == 'q': | |
print("Exiting the application.") | |
break | |
# Correct the sentence using the Ginger API | |
corrected_text = correct_sentence(text) | |
# Display the original and corrected sentences | |
print(f"Original Sentence: {text}") | |
print(f"Corrected Sentence: {corrected_text}\n") | |
if __name__ == "__main__": | |
main() | |