PyFastNER
PyFastNER is the python implementation of FastNER, which is orginally developed using Java. It uses hash function to process multiple rules at the same time. Similar to FastNER, PyFastNER supports token-based rules (FastNER--under developing) and character-based rules (FastCNER). It is licensed under the Apache License, Version 2.0.
Install:
pip install PyFastNER
Examples:
Here is a simiple example of using external dictionary to find matches in an input string. It will return a dictionary of spans grouped by the named entity types.
from PyFastNER import FastCNER
# initiate fastner using external rule file
fastner = FastCNER('conf/crule_test.tsv')
# process an input string
res = fastner.processString('Pt came with fever, T 102.0F.')
# display processed results
for type in res.keys():
for span in res[type]:
print(span)
Here is another example if you need process a sentence within a document, where you just need to tell the offset of the sentence to the beginning of the document.
from PyFastNER import FastCNER
fastner = FastCNER('conf/crule_test.tsv')
res = fastner.processString('Pt came with fever, T 102.0F.',134)
For more examples, please refer to TestFastCNER.py
Metadata
Release files for PyFastNER 1.0.10
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 | |
|---|---|---|---|---|
| PyFastNER-1.0.10.tar.gz | 13.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| PyFastNER-1.0.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.1 kB
Release files / PyFastNER-1.0.10.tar.gz
| Download URL | PyFastNER-1.0.10.tar.gz |
|---|---|
| Size | 13.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d477fc4f7acbb68f0c828b0bed478206092bb8190997dfda006993db5813b262
|
|
BLAKE2b-256 checksum How to use checksums |
b359005d6eae903c7d9a1861e8fd813ea7a03d65ab8807e6877a3dc12e5902da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Release files / PyFastNER-1.0.10-py3-none-any.whl
| Download URL | PyFastNER-1.0.10-py3-none-any.whl |
|---|---|
| Size | 22.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
259665dd8a84c907559645d2ce33ec807be0fb03664cfdb14a50aa6436cedb72
|
|
BLAKE2b-256 checksum How to use checksums |
4190d9e2d9439ee6c22562a0b175e0fdd503304b60cec22b8a484955aeac7659
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Security for PyFastNER 1.0.10
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.