Fix docstrings in utils.text
Merge pull request #4671 from takluyver/utils-text-docstrings

Fix docstrings in utils.text