Skip to content

Performs natural language processing on news items, extracting keywords and named entities for better topic tagging and content analysis

License

Notifications You must be signed in to change notification settings

taranis-ai/natural-language-processing

Repository files navigation

Taranis AI NLP Bot

Performs natural language processing on news items, extracting keywords and named entities for better topic tagging and content analysis

Development

uv venv
uv sync --all-extras --dev

Usage

Run via

flask run
# or
granian run
# or
docker run -p 8000:8000 ghcr.io/taranis-ai/taranis-nlp-bot:latest

Example API Call

To test the API with a POST request, use curl:

curl -X POST http://127.0.0.1:8000/ \
  -H "Content-Type: application/json" \
  -d '{"text": "This is an example for NER, about the ACME Corporation which is producing Dynamite in Acme City, which is in Australia and run by Mr. Wile E. Coyote."}'

# {"ACME Corporation":"ORG","Acme City":"LOC","Australia":"LOC","Dynamite":"MISC","NER":"ORG","Wile E. Coyote":"PER"}
import requests

json_data = {
    'text': 'This is an example for NER, about the ACME Corporation which is producing Dynamite in Acme City, which is in Australia and run by Mr. Wile E. Coyote.',
}

response = requests.post('http://127.0.0.1:8000', json=json_data)

print(response.text)

License

EUROPEAN UNION PUBLIC LICENCE v. 1.2

About

Performs natural language processing on news items, extracting keywords and named entities for better topic tagging and content analysis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 3

  •  
  •  
  •