def extract_doc_embedding(embedding_distrib, inp_rpr, use_filtered=False):
    """
    对整个文档的词进行词嵌入
    Return the embedding of the full document

    :param embedding_distrib: embedding distributor see @EmbeddingDistributor
    :param inp_rpr: input text representation see @InputTextObj
    :param use_filtered: if true keep only candidate words in the raw text before computing the embedding
    :return: numpy array of shape (1, dimension of embeddings) that contains the document embedding
    """
    # use_filtered表示只对需要的候选词性的单词进行embed
    if use_filtered:
        tagged = inp_rpr.filtered_pos_tagged
    else:
        tagged = inp_rpr.pos_tagged
    
    tokenized_doc_text = ' '.join(token[0].lower() for sent in tagged for token in sent)
    return embedding_distrib.get_tokenized_sents_embeddings([tokenized_doc_text])