Python 3 API to the TweeboParser
Project description
Tweebo Parser Python API
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
- Requires Python 3.6
pip install tweebo-parser-python-api- Install docker
- 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:
- Find the name assigned to the docker image using:
docker ps - 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
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tweebo_parser_python_api-1.0.4.tar.gz.
File metadata
- Download URL: tweebo_parser_python_api-1.0.4.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c8b210256ad5f8d80de513f616e67b9c720f779bc57ef26924901c7c67a356e
|
|
| MD5 |
4a0a36932977856ac9dc34146dd17296
|
|
| BLAKE2b-256 |
02a72d4bd893487e5fd4bb7dec6bd94df0961c9b62573c57a3bfb6d98f837d7d
|
File details
Details for the file tweebo_parser_python_api-1.0.4-py3-none-any.whl.
File metadata
- Download URL: tweebo_parser_python_api-1.0.4-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3c2c8e7ddfa48e4ed9ab5f4838a9473a17b7779eb33d853ae012aafb0db4460
|
|
| MD5 |
691f430e0236a2b4600b22a3c1b8aa11
|
|
| BLAKE2b-256 |
fd519a524ecf408b6ad27130851df0ef0f0eba3751ca9aece3bafb407cae7219
|