def filter_wiki(raw):
    # parsing of the wiki markup is not perfect, but sufficient for our purposes
    # contributions to improving this code are welcome :)
    text = utils.to_unicode(raw, 'utf8', errors='ignore')
    text = utils.decode_htmlentities(text) # '&amp;nbsp;' --> '\xa0'
    return remove_markup(text)
Filter out wiki mark-up from `raw`, leaving only text. `raw` is either unicode
dataset/ETHPy150Open largelymfs/topical_word_embeddings/TWE-1/gensim/corpora/wikicorpus.py/filter_wiki