fix method get_words_by_document