wrapped the tokenizer in calls to Text.copy to keep memory use down