predict_quality function

Predict writing quality