Skip to main content

Tweebo Parser Python API

Build Status

This is a Python 3 API to the TweeboParser using the TweeboParser API server which is servered using the Docker image which can be found here.

Installation and setup

  1. Requires Python 3.6
  2. pip install tweebo-parser-python-api
  3. Install docker
  4. Start the TweeboParser API server running locally on port 8000: docker run -p 8000:8000 -d --rm mooreap/tweeboparserdocker

NOTE This will run the server using as many threads as you have CPU cores on your machine. If you would like to specify the number of threads use the --threads flag e.g.:

docker run -p 8000:8000 -d --rm mooreap/tweeboparserdocker --threads 4

Also to stop the docker server running:

  1. Find the name assigned to the docker image using: docker ps
  2. Then stop the relevant docker image: docker stop name_of_image

Example

from tweebo_parser import API, ServerError
# Assumes server is running locally at 0.0.0.0:8000
tweebo_api = API()
text_data = ['Guangdong University of Foreign Studies is located in Guangzhou.',
             'Lucy is in the sky with diamonds.']
try:
    result_stanford = tweebo_api.parse_stanford(text_data)
    result_conll = tweebo_api.parse_conll(text_data)
except ServerError as e:
    print(f'{e}\n{e.message}')

For a more detailed example see the following jupyter notebook

Metadata

Release files for tweebo-parser-python-api 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tweebo-parser-python-api 1.0.4
File Size Uploaded
tweebo_parser_python_api-1.0.4.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tweebo-parser-python-api 1.0.4
File Interpreter ABI Platform
tweebo_parser_python_api-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 8.2 kB

Release files / tweebo_parser_python_api-1.0.4.tar.gz

Download URL tweebo_parser_python_api-1.0.4.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5c8b210256ad5f8d80de513f616e67b9c720f779bc57ef26924901c7c67a356e
BLAKE2b-256 checksum
How to use checksums
02a72d4bd893487e5fd4bb7dec6bd94df0961c9b62573c57a3bfb6d98f837d7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.0

Release files / tweebo_parser_python_api-1.0.4-py3-none-any.whl

Download URL tweebo_parser_python_api-1.0.4-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3c2c8e7ddfa48e4ed9ab5f4838a9473a17b7779eb33d853ae012aafb0db4460
BLAKE2b-256 checksum
How to use checksums
fd519a524ecf408b6ad27130851df0ef0f0eba3751ca9aece3bafb407cae7219
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.0

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page