OKNLP
Project description
OKNLP
安装方法
CPU only
$ pip install "oknlp[cpu]"
GPU
请参考 安装 - OKNLP文档
系统支持
Windows | Linux | Mac OS | |
---|---|---|---|
Python3.6 | √ | √ | |
Python3.7 | √ | √ | √ |
Python3.8 | √ | √ | √ |
Python3.9 | √ | √ | √ |
快速入门
中文分词
import oknlp
if __name__ == "__main__":
model = oknlp.cws.get_by_name("thulac")
model([
"我爱北京天安门"
])
# [['我', '爱', '北京', '天安门']]
完整文档请参考 中文分词 - OKNLP文档
命名实体识别
import oknlp
if __name__ == "__main__":
model = oknlp.ner.get_by_name("bert")
model([
"我爱北京天安门"
])
# [[{'type': 'LOC', 'begin': 2, 'end': 4}, {'type': 'LOC', 'begin': 4, 'end': 7}]]
完整文档请参考 命名实体识别 - OKNLP文档
词性标注
import oknlp
if __name__ == "__main__":
model = oknlp.postagging.get_by_name("bert")
model([
"我爱北京天安门"
])
# [[('我', 'PN'), ('爱', 'VV'), ('北京', 'NR'), ('天安门', 'NR')]]
完整文档请参考 词性标注 - OKNLP文档
细粒度实体分类
import oknlp
if __name__ == "__main__":
model = oknlp.typing.get_by_name("bert")
model([
("我爱北京天安门", (2, 4))
])
# [[('location', 0.7169095873832703), ('place', 0.8128180503845215), ('city', 0.6188656687736511), ('country', 0.12475886940956116)]]
完整文档请参考 细粒度实体分类 - OKNLP文档
贡献者
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file oknlp-0.0.5-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: oknlp-0.0.5-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 750.6 kB
- Tags: CPython 3.10, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fe959a06dff0d36071ad854c3fa0fde4d208b8b4bc344b4fd164b6ef9e2c755 |
|
MD5 | 2bb2467597fbdc7a4b31b4690f61c105 |
|
BLAKE2b-256 | de0ba274c4a31b9ff50a126af77c802d13de05caf39dffb69e45d0a9116fc75d |
File details
Details for the file oknlp-0.0.5-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: oknlp-0.0.5-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 83.8 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 053488067b846f635b8044f76e1be810b0b8fb816b0e537da0a9476745820d1d |
|
MD5 | c1c82d7d5c3b75fc9953faaf7e55cbcc |
|
BLAKE2b-256 | bde118bfd8fe4fbdefdd983cd938e5c8e54c5494a4c93868e6c781fa21bcf37c |
File details
Details for the file oknlp-0.0.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: oknlp-0.0.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 750.2 kB
- Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7da7a41ff963d5d8a753260e88fc793fbca41958eaea1fe862ff8a956f6fdde6 |
|
MD5 | b1e8341ed57c626c89e7f659d31d1128 |
|
BLAKE2b-256 | 809bfe62344d3a7672fd7e60eb1653bd29b24e92c5eaed42f5524c81670210be |
File details
Details for the file oknlp-0.0.5-cp39-cp39-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: oknlp-0.0.5-cp39-cp39-macosx_10_14_x86_64.whl
- Upload date:
- Size: 99.1 kB
- Tags: CPython 3.9, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3f3c7d86fa5cbcb27868106a25a0555318388eece17dcba898e2cf052ff8758 |
|
MD5 | 6a4fdc6ad5a758b5510f799626010f8b |
|
BLAKE2b-256 | c168f52f9b51a1c1802b10955bf1df7aa001a26b5b62b75723209ba4bcc91a50 |
File details
Details for the file oknlp-0.0.5-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: oknlp-0.0.5-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 83.8 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1904de6441ffeed29e6417323a03721fa34bb51c1fe4b9a1c3a8406973b79e7 |
|
MD5 | f174b1a16cf6dbc8f4923c79fbf7b9bf |
|
BLAKE2b-256 | dbc63f4f132b629504badb99c1c870c749a179fef073893649e55d25544d85f2 |
File details
Details for the file oknlp-0.0.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: oknlp-0.0.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 750.7 kB
- Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03e1162e064a9b1098411c6223654332597fccd788e9db5e73bd04c9be6e534d |
|
MD5 | 21e0a839ae86aa62f64b21acb493d403 |
|
BLAKE2b-256 | 93d6da525ddbade217755f0031e171b6edd46675e4d502d0d84eaf99e232c4f6 |
File details
Details for the file oknlp-0.0.5-cp38-cp38-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: oknlp-0.0.5-cp38-cp38-macosx_10_14_x86_64.whl
- Upload date:
- Size: 99.1 kB
- Tags: CPython 3.8, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | abca5d72b659519d91ab5a5003d7d4e7bd1058197d1c4f83463cd3e71ebabfdd |
|
MD5 | 6889fda1b98115d6199c6330249139ef |
|
BLAKE2b-256 | 1b3fabf869ef993e6ea72e1896a81587ebf6dbd05c56bc92339f0a2a3a1e2eb2 |
File details
Details for the file oknlp-0.0.5-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: oknlp-0.0.5-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 83.8 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 746bcfab4e735e78b766db3b48601a0277a15ec0d742fd96f9a123d7cce816c8 |
|
MD5 | 8c111ccdbc3bb134ee2118840e8a3b7e |
|
BLAKE2b-256 | ab92514d5f68b2a9b5bad7be280cdacb0ae3acfeaecc821d2fadd6ddde94cd18 |
File details
Details for the file oknlp-0.0.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: oknlp-0.0.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 751.7 kB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 125f8c5b50fe531e6651b33d853f8356afc03393870d4ca867cb46bcd3ff10fa |
|
MD5 | d734695d80e86c2aae5d80e047a1b049 |
|
BLAKE2b-256 | fc17f8db3dea85b8cf3bb887ae0d59c3634e118091f6bef37e0a5ff80962f5f6 |
File details
Details for the file oknlp-0.0.5-cp37-cp37m-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: oknlp-0.0.5-cp37-cp37m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 99.1 kB
- Tags: CPython 3.7m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f79dd652c0d4acbeb04b2da8f2fb2477f34bff9ccc8a422925afeb537d08aa60 |
|
MD5 | fcb66e87df2977e1add7aaa5dfc28191 |
|
BLAKE2b-256 | b9e6c5ede50874a6b7c0311d1403843b03c50396d9146e437548d0d2ffa5c3f9 |
File details
Details for the file oknlp-0.0.5-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: oknlp-0.0.5-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 750.7 kB
- Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5954e55e71cbccbe83d9f3bcbb1914093b744118cab968d0f2745a7ddcda8535 |
|
MD5 | 2878811f09835218440e439e0195c419 |
|
BLAKE2b-256 | 08aa87890169c191287f34cf2f8bb9066adac2da42b0a393637004bc8c111375 |
File details
Details for the file oknlp-0.0.5-cp36-cp36m-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: oknlp-0.0.5-cp36-cp36m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 99.1 kB
- Tags: CPython 3.6m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9964b004c2bed77dc047b2f2fc4894cf79dc38e6f5683e8ac0afe667a1930cb9 |
|
MD5 | f7ecf74f315efdd10f2a2be4c7bbab90 |
|
BLAKE2b-256 | 37661cc02fc877558c045fe1ee6e6cd1cefde5863b0c04c2f80d6829b138b3c3 |