A python module to use the proofreading support api of Yahoo! japan
Project description
ytproofreading
A python module to use the proofreading support api of Yahoo! japan
Requirement
- beautifulsoup4
- certifi
- chardet
- idna
- lxml
- requests
- soupsieve
- urllib3
Installation
$ pip install ytproofreading
Usage
import ytproofreading
appid = "Client ID obtained from the Yahoo! japan Developer Network"
kousei = ytproofreading.Kousei(appid)
text = "遙か彼方に小形飛行機が見える。"
print(kousei.proofreading_support(text))
"""
[{'startpos': '0', 'length': '2', 'surface': '遙か', 'shitekiword': '●か', 'shitekiinfo': '表外漢字あり'},
{'startpos': '2', 'length': '2', 'surface': '彼方', 'shitekiword': '彼方(かなた)', 'shitekiinfo': '用字'},
{'startpos': '5', 'length': '5', 'surface': '小形飛行機', 'shitekiword': '小型飛行機', 'shitekiinfo': '誤変換'}]
"""
print(kousei.proofreading_support(text, 1))
"""
[{'startpos': '5', 'length': '5', 'surface': '小形飛行機', 'shitekiword': '小型飛行機', 'shitekiinfo': '誤変換'}]
"""
print(kousei.proofreading_support(text, 0, 1))
"""
[{'startpos': '0', 'length': '2', 'surface': '遙か', 'shitekiword': '●か', 'shitekiinfo': '表外漢字あり'},
{'startpos': '2', 'length': '2', 'surface': '彼方', 'shitekiword': '彼方(かなた)', 'shitekiinfo': '用字'}]
"""
Note
For more information about arguments and errors, please refer to the following URL.
- arguments: https://developer.yahoo.co.jp/webapi/jlp/kousei/v1/kousei.html
- errors: https://developer.yahoo.co.jp/appendix/errors.html
Author
- 6ast1an979
- email: 6ast1an979@gmail.com
- twitter: @6ast1an979
License
"ytproofreading" is under MIT license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ytproofreading-1.4.tar.gz
(3.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ytproofreading-1.4.tar.gz.
File metadata
- Download URL: ytproofreading-1.4.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06b4dc5a88ff39c821e902cc74795003deb56f6a7bf416f2fff7d055234e35af
|
|
| MD5 |
21ff17f77894149f8a152d99463e8deb
|
|
| BLAKE2b-256 |
fc1d7319a5a7a8af434e62bc45ee2d359996e9e7820fe15113ff1f7476e04778
|
File details
Details for the file ytproofreading-1.4-py3-none-any.whl.
File metadata
- Download URL: ytproofreading-1.4-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebea6e77dd5d561368d852186cc6a13702b57320888487a175769774075a2b48
|
|
| MD5 |
26797015d5e93d9673c02d3903a22bec
|
|
| BLAKE2b-256 |
ba44cfa273658557e6fe650f962fb6cbf136f047c1b1c830a50355a55e2108e2
|