Skip to content

第三章 3.4.3.1 wikiextractor 问题 #23

@ji90po

Description

@ji90po

安装问题比较多 (https://dumps.wikimedia.org/zhwiki/latest/ 语料库)

  1. 如果遇到err 就像下面
    ’”aise source.error('global flags not at the start '
    re.error: global flags not at the start of the expression at position 4 “

请务必将python 退到py3.10 的版本 (我用的anaconda 是3.11的 一直报错)

example :
Conda create --name py310 python=3.10
conda activate py310
pip install wikiextractor

2) 如果开始运行 python -m wikiextractor.WikiExtractor jawiki-latest-pages-articles.xml.bz2 了 很长一段时间 ,如
'...xxx pages ...
...xxx pages ...
...xxx pages ...'
突然报 带’fork‘的错误

一个解决方案
pip install git+https://github.com/prokotg/wikiextractor

wikiextractor 会从3.0.6 回退到 3.0.4 从而 ok


python -m wikiextractor.WikiExtractor jawiki-latest-pages-articles.xml.bz2

从而ok

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions