Skip to main content

NLP Annotation Helpers

Project description

NLP Annotations

A simple python package for dealing with different nlp annotation styles. No dependencies, and is very fast due to only using regular expressions.

Annotation Types

The following are the annotation types we support and how to convert it to another type.

Markdown Links

(Used by Rasa, etc...), these are in the form:

The weather is [sunny](weather) and the sky is [blue](color).

To convert this to an entity list you can:

markdown_links2entity_list("The weather is [sunny](weather) and the sky is [blue](color).")
# ('The weather is sunny and the sky is blue.', {'entities': [(15, 20, 'weather'), (36, 40, 'color')]})

Entity List

(Used by Spacy, etc...), these are in the form:

('The weather is sunny and the sky is blue.', {'entities': [(15, 20, 'weather'), (36, 40, 'color')]})

To convert this to a markdown links string, you can:

entity_list2markdown_links("The weather is sunny and the sky is blue.", [(15, 20, 'weather'), (36, 40, 'color')])
# 'The weather is [sunny](weather) and the sky is [blue](color).'

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

nlp-annotations-0.0.1.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

nlp_annotations-0.0.1-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file nlp-annotations-0.0.1.tar.gz.

File metadata

  • Download URL: nlp-annotations-0.0.1.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for nlp-annotations-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9fd6660bd112a8a078215d453df13e201694ea70bce74f15f812c62461fd0270
MD5 6f97868af9f1012a9b3df5c30857dfb2
BLAKE2b-256 71c860b401a95faeaa64ce80684259abc408630a7edc3b6e26031ce9e1c71a4e

See more details on using hashes here.

File details

Details for the file nlp_annotations-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: nlp_annotations-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for nlp_annotations-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 182f06860dae4ad605055d724547f7e08e94440f82948f11c4a99be5127fe7b5
MD5 5ba23819ded71bf9edcfb3795286dfe1
BLAKE2b-256 b98d490350ce5437440e3a8ce203ce2950cde9eab0d21846664df3bbd59b46e9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page