Japanese Wikipedia Cleaner
- Split sentences at the proper position taking parentheses into account.
- Normalize Unicode characters by NFKC.
- Extract text from wiki links
- Remove of unnecessary symbols.
Apply this tool for a extracted text by WikiExtractor.
$ jawiki-cleaner --input ./wiki.txt --output ./cleaned-wiki.txt
$ jawiki-cleaner -i ./wiki.txt -o ./cleaned-wiki.txt
$ jawiki-cleaner -i ./wiki.txt # output path will be `./cleaned-wiki.txt`
Example
Before
<doc id="5" url="?curid=5" title="アンパサンド">
アンパサンド
アンパサンド (&、英語名:) とは並立助詞「…と…」を意味する記号である。ラテン語の の合字で、Trebuchet MSフォントでは、と表示され "et" の合字であることが容易にわかる。ampersa、すなわち "and per se and"、その意味は"and [the symbol which] by itself [is] and"である。
歴史.
その使用は1世紀に遡ることができ、5世紀中葉から現代に至るまでの変遷がわかる。
Z に続くラテン文字アルファベットの27字目とされた時期もある。
アンパサンドと同じ役割を果たす文字に「のet」と呼ばれる、数字の「7」に似た記号があった(, U+204A)。この記号は現在もゲール文字で使われている。
記号名の「アンパサンド」は、ラテン語まじりの英語「& はそれ自身 "and" を表す」(& per se and) のくずれた形である。英語以外の言語での名称は多様である。
手書き.
日常的な手書きの場合、欧米でアンパサンドは「ε」に縦線を引く単純化されたものが使われることがある。
また同様に、「t」または「+(プラス)」に輪を重ねたような、無声歯茎側面摩擦音を示す発音記号「」のようなものが使われることもある。
プログラミング言語.
プログラミング言語では、C など多数の言語で AND 演算子として用いられる。以下は C の例。
PHPでは、変数宣言記号($)の直前に記述することで、参照渡しを行うことができる。
BASIC 系列の言語では文字列の連結演算子として使用される。codice_4 は codice_5 を返す。また、主にマイクロソフト系では整数の十六進表記に codice_6 を用い、codice_7 (十進で15)のように表現する。
SGML、XML、HTMLでは、アンパサンドを使ってSGML実体を参照する。
</doc>
Run jawiki-cleaner -i wiki.txt
After
アンパサンド(&、英語名)とは並立助詞「...と...」を意味する記号である。
ラテン語の の合字で、Trebuchet MSフォントでは、と表示され "et" の合字であることが容易にわかる。
ampersa、すなわち "and per se and"、その意味は"and [the symbol which] by itself [is] and"である。
その使用は1世紀に遡ることができ、5世紀中葉から現代に至るまでの変遷がわかる。
Z に続くラテン文字アルファベットの27字目とされた時期もある。
アンパサンドと同じ役割を果たす文字に「のet」と呼ばれる、数字の「7」に似た記号があった(U-204A)。
この記号は現在もゲール文字で使われている。
記号名の「アンパサンド」は、ラテン語まじりの英語「& はそれ自身 "and" を表す」(& per se and)のくずれた形である。
英語以外の言語での名称は多様である。
日常的な手書きの場合、欧米でアンパサンドは「ε」に縦線を引く単純化されたものが使われることがある。
また同様に、「t」または「-(プラス)」に輪を重ねたような、無声歯茎側面摩擦音を示す発音記号のようなものが使われることもある。
プログラミング言語では、C など多数の言語で AND 演算子として用いられる。
PHPでは、変数宣言記号($)の直前に記述することで、参照渡しを行うことができる。
BASIC 系列の言語では文字列の連結演算子として使用される。
codice_4 は codice_5 を返す。
また、主にマイクロソフト系では整数の十六進表記に codice_6 を用い、codice_7(十進で15)のように表現する。
SGML、XML、HTMLでは、アンパサンドを使ってSGML実体を参照する。
Metadata
Release files for jawiki-cleaner 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jawiki-cleaner-0.1.5.tar.gz | 4.7 kB | Without provenance | Details for jawiki-cleaner-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jawiki_cleaner-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for jawiki_cleaner-0.1.5-py3-none-any.whl |
Total release size: 10.2 kB
Release files / jawiki-cleaner-0.1.5.tar.gz
| Download URL | jawiki-cleaner-0.1.5.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd716b6330bca31555acff5c244a99e849837e14fa14353c95eed65ef098d768
|
|
BLAKE2b-256 checksum How to use checksums |
3777a6855bca45b1c53230d22a507ca1b0d6211acd25236f75dcbdf50c9cfdc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.8.2 Darwin/19.6.0
|
Release files / jawiki_cleaner-0.1.5-py3-none-any.whl
| Download URL | jawiki_cleaner-0.1.5-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc36dec465d295ba55a28b16873669dfa09b28097acc74037b9d57cffea60e18
|
|
BLAKE2b-256 checksum How to use checksums |
7b99284ce67c9272514a9031352f4601fdcd78c09706ee0cf14a448c1611ad3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.8.2 Darwin/19.6.0
|
Security for jawiki-cleaner 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.