piskvorky/gensim

WikiCorpus.filter_wiki/remove_markup don't remove heading-markup

Open

#2561 aperta il 26 lug 2019

Vedi su GitHub
 (9 commenti) (0 reazioni) (0 assegnatari)Python (4349 fork)batch import
Hacktoberfestbugdifficulty mediumgood first issuehelp wantedimpact LOWreach LOW

Metriche repository

Star
 (15.144 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Problem description

I am trying to get clean wiki texts. But still getting headings markup.

Steps/code/corpus to reproduce

Just create WikiCorpus and call get_texts. Some texts will contain ==headings== (different number of = and different headings, of course). Simple test-case:

>>> import gensim.corpora.wikicorpus
>>> print(gensim.corpora.wikicorpus.filter_wiki('===heading==='))
===heading===

Versions

Python 3.7.4 (default, Jul 13 2019, 14:04:11) 
[GCC 8.3.0]
NumPy 1.16.4
SciPy 1.3.0
gensim 3.8.0
FAST_VERSION 1

Guida contributor