Machine learning text manipulation