BabelFy API Client
Python BabelFy entity tagger. Can be used as a library or command-line tool. Compatible with both Python 2.7 as well as Python 3.
Installation
pip install babelpy
or clone this github repository and run python setup.py install, optionally prepend the commands with sudo for global installation.
Usage
Add your Babelfy API Key to the config file or provide it as an argument.
Use as command-line tool
babelpy [-h] [-t | -tf ] [-e] [-ae] [-m] [-am] [-p] [-ex]
Options:
-h, --help show a help message and exit -key --api-key BabelFy API key -t --text text to be annotated by BabelFy API -tf --text-file path to the file containing the input text -e, --entities get entity data -ae --all-entities get entity and non-entity data -m --merged-entities get merged entities only -am --all-merged-entities get all merged entities -p --print dump all babelfy data to stdout -ex --export filename of the output file
Example:
babelpy -tf ~/data/fashion.txt -am -ex ~/data/fashion.json
See babelpy -h for help.
Use as a library
from babelfy import BabelfyClient
# Instantiate BabelFy client.
params = dict()
params['lang'] = LANG
babel_client = BabelfyClient(API_KEY, params)
# Babelfy sentence.
babel_client.babelfy(TEXT_TO_BE_BABELFIED)
# Get entity data.
print(babel_client.entities)
# Get entity and non-entity data.
print(babel_client.all_entities)
# Get merged entities only.
print(babel_client.merged_entities)
# Get all merged entities.
babel_client.all_merged_entities
Run Tests with python tests/run_tests.py
License
GNU - GPL 3.0
Metadata
Release files for BabelPy 1.0.1
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 | Actions |
|---|---|---|---|---|
| BabelPy-1.0.1.tar.gz | 8.0 kB | Without provenance | Details for BabelPy-1.0.1.tar.gz |
Release files / BabelPy-1.0.1.tar.gz
| Download URL | BabelPy-1.0.1.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2a11aebfa70049f1cd4460623af33539f3841a12e2a4338a4424e45acc23e38
|
|
BLAKE2b-256 checksum How to use checksums |
090393430ae2c3011b9eb0ae179d58612be8e094e04e920686a1ffb7740e27ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for BabelPy 1.0.1
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.