ner-kit 0.0.1a0
pip install ner-kit==0.0.1a0
Newer version available (0.0.5)
Released:
Named Entity Recognition Toolkit
Navigation
Unverified details
These details have not been verified by PyPIMeta
- License: MIT License (MIT)
- Author: Donghua Chen
- Tags named entity recognition , NER , text analysis
- Requires: Python >=3.6, <4
Classifiers
- Development Status
- Intended Audience
- License
- Programming Language
- Topic
Project description
Named Entity Recognition Toolkit
Provide a toolkit for rapidly extracting useful entities from text using various Python packages.
Installation
pip install ner-kit
Examples
Example 1: Stanford CoreNLP
from nerkit.stanza import *
# First, set environment variable CORENLP_HOME to the CoreNLP folder
corenlp_root_path=r"{}\stanford-corenlp-4.3.2"
text="我喜欢游览广东孙中山故居景点!"
list_token=get_entity_list(text,corenlp_root_path=corenlp_root_path,language="chinese")
for token in list_token:
print(f"{token['value']}\t{token['pos']}\t{token['ner']}")
Example 2: HanLP
from nerkit.HanLP import *
text = "我喜欢游览广东孙中山故居景点!"
res=get_entity_list_by_hanlp(text,recognize='place')
print(res)
for s in res:
st=str(s)
ws=st.split("/")
if ws[1]=="nr":
print(ws[0],ws[1])
Example 3: Stanford CoreNLP (Not official version)
import os
from nerkit.StanfordCoreNLP import get_entity_list
text="我喜欢游览广东孙中山故居景点!"
current_path = os.path.dirname(os.path.realpath(__file__))
res=get_entity_list(text,resource_path=f"{current_path}/stanfordcorenlp/stanford-corenlp-latest/stanford-corenlp-4.3.2")
print(res)
for w,tag in res:
if tag in ['PERSON','ORGANIZATION','LOCATION']:
print(w,tag)
License
The ner-kit
project is provided by Donghua Chen.
Project details
Unverified details
These details have not been verified by PyPIMeta
- License: MIT License (MIT)
- Author: Donghua Chen
- Tags named entity recognition , NER , text analysis
- Requires: Python >=3.6, <4
Classifiers
- Development Status
- Intended Audience
- License
- Programming Language
- Topic
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 Distribution
Built Distribution
File details
Details for the file ner-kit-0.0.1a0.tar.gz
.
File metadata
- Download URL: ner-kit-0.0.1a0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
7eab00e86f471773fbb54e29f4944cd17ec91e38e6d436c91d8ef249b0d92c7b
|
|
MD5 |
8c1adc2eec31c17ff8cb56805dced0db
|
|
BLAKE2b-256 |
b3c983f2d5cebb921fb0087fd9e3efbe397f8a136066516ee95c635189f16452
|
File details
Details for the file ner_kit-0.0.1a0-py3-none-any.whl
.
File metadata
- Download URL: ner_kit-0.0.1a0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
7b6b210775c4c5923b138915c6f7a8276eb94505eec82289c7b6476af39a7e79
|
|
MD5 |
edd9df535ff6baab929212f6e9b90c29
|
|
BLAKE2b-256 |
62a528f1d067e3393da2e2545eef197262de3f2908608bee498d31596decefd2
|