Spaces:
Sleeping
Sleeping
File size: 724 Bytes
5bee7e5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
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()
|