This is the test code to learn the title from the database dump of the Japanese Wikipedia.
It can be used as a source material for creating a user dictionary of MOZC.
-
Install Python 3
-
Install requests from pip
pip3 install requests
-
Install requests from flask
pip3 install flask
-
Uncomment and run the items you want to extract from the source
If the dump file(jawiki-latest-pages-articles.xml.bz2) of the Japanese Wikipedia database dump location has been downloaded to your local PC, search from your local PC, If it has not been downloaded, search for the file directly from the Wikipedia location.
If you use a local PC download file, use port 8080. Depending on the execution environment, change the port.
MIT
日本語版Wikipediaのデータベース・ダンプから、タイトルを習得するテストコードです。
mozcのユーザ辞書作成のための元ネタなどに使えます。
-
Python3をインストールする
-
requestsを pipインストールする
pip3 install requests
-
flaskを pipインストールする
pip3 install flask
-
ソースから抽出したい項目のコメントを外して実行する
日本語版Wikipediaのデータベース・ダンプ場所の(jawiki-latest-pages-articles.xml.bz2)がローカルPCにダウンロードされている場合、ローカルPCからサーチ、ダウンロードされていない場合はwikipediaの置き場から直接ファイルサーチします。
ローカルPCのダウンロードファイルを使用する場合、8080ポートを使用します。実行環境によってはポート変更してください。
MIT