We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://towardsdatascience.com/fine-tune-a-transformer-model-for-grammar-correction-b5c8ca49cc26
Eric Fillion
import csv def generate_csv(csv_path, dataset): with open(csv_path, 'w', newline='') as csvfile: writter = csv.writer(csvfile) writter.writerow(["input", "target"]) for case in dataset: # Adding the task's prefix to input input_text = "grammar: " + case["sentence"] for correction in case["corrections"]: # a few of the cases contain blank strings. if input_text and correction: writter.writerow([input_text, correction]) generate_csv("train.csv", train_dataset) generate_csv("eval.csv", eval_dataset)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
TL;DR
Article Link
https://towardsdatascience.com/fine-tune-a-transformer-model-for-grammar-correction-b5c8ca49cc26
Author
Eric Fillion
Key Takeaways
Useful Code Snippets
Useful Tools
Comments/ Questions
The text was updated successfully, but these errors were encountered: