reconstructing doc_analyzer