In general, I don't think we should convert a Document into a string. In fact, the former implementation used ``offset`` and ``length`` to only extract the meaningul portion of the text that had to be tokenized, i.e., it is more efficient than manipulating a string.