Skip to main content

A Python client library for the Aristech Natural-Language-Processing API.

Project description

Aristech NLP-Client for Python

This is the Python client implementation for the Aristech NLP-Server.

Installation

To install the package, you can use pip:

pip install aristech-nlp-client

Usage

from aristech_nlp_client import NlpClient

client = NlpClient(host='nlp.example.com')
response = client.run_functions(RunFunctionsRequest(
    input='Hello, world!',
    functions=[
        Function(id="recasepunct-de")
    ]
))
print(response.output)

There are several examples in the examples directory:

  • functions.py: Demonstrates how to list the available functions.
  • run_functions.py: Demonstrates how to perform NLP processing on a text.
  • projects.py: Demonstrates how to list the available projects.
  • intents.py: Demonstrates how to list intents for a project.
  • scoreLimits.py: Demonstrates how to use score limits to figure out good thresholds for intents.
  • content.py: Demonstrates how to search content for a given prompt.

You can run the examples directly using python like this:

  1. Create a .env file in the python directory:
HOST=nlp.example.com
# The credentials are optional but probably required for most servers:
TOKEN=your-token
SECRET=your-secret

# The following are optional:
# ROOT_CERT=your-root-cert.pem # If the server uses a self-signed certificate
# PROJECT_ID=some-project-id # Required for some examples
  1. Run the examples, e.g.:
python examples/functions.py

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

aristech_nlp_client-2.0.0.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aristech_nlp_client-2.0.0-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file aristech_nlp_client-2.0.0.tar.gz.

File metadata

  • Download URL: aristech_nlp_client-2.0.0.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for aristech_nlp_client-2.0.0.tar.gz
Algorithm Hash digest
SHA256 ce887d0adc906f8583748f0846b3298d3fe0f901d9c007d4da58397a229e7cca
MD5 26d1fd6de0bba027836017c6edeb72d6
BLAKE2b-256 e4a5b22bfe788f466ef66389c2bfa36ad2dc28884377d178811bc24cf39d9695

See more details on using hashes here.

File details

Details for the file aristech_nlp_client-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aristech_nlp_client-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 010305855b5a703b78ed00361f2b7bb192e5b6ab7f6d084b4a957353d428b5b7
MD5 896cb11fa9935c42206a65c2619b7546
BLAKE2b-256 8768eb85fb5b8b01ca1618918af651bbe5b3cb2928bc22bf0645665f9a2ffaba

See more details on using hashes here.

Supported by

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