Skip to main content

BabelFy API Client

Project description

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.


pip install babelpy

or clone this github repository and run python install, optionally prepend the commands with sudo for global installation.


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]


-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


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.

# Get entity data.

# Get entity and non-entity data.

# Get merged entities only.

# Get all merged entities.

Run Tests with python tests/


GNU - GPL 3.0

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for BabelPy, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size BabelPy-1.0.1.tar.gz (8.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page