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
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': '用字'}]
"""
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.0.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for ytproofreading-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c483d937fd51ec31195b083fcabca792ff3e2c449b8ab5810ccb982709e88a23 |
|
MD5 | cc51a6f35bfd3d7048689f178b317540 |
|
BLAKE2b-256 | 0bc5276fc707d798ab70fda227e5d123b0488c4e0e04af9e3ac771e0e9ae9ecf |