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.1.0.tar.gz (18.6 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.1.0-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aristech_nlp_client-2.1.0.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for aristech_nlp_client-2.1.0.tar.gz
Algorithm Hash digest
SHA256 63f5aebe6e304f50aff1ae0a28c732373750710c448ab7e829243ac481c7e2cf
MD5 cbde98c600c0cad2867b5552bb2b3363
BLAKE2b-256 606af48b8c7a318cd590b15fedb088b477e667534a56e0a5fbf311293eea32c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aristech_nlp_client-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d8b885b9d51cea3788922ecd5ab19c7847e35686bc27cd5a0a3da91db1abe149
MD5 6d8708ef35281b8882c007f57e905d6b
BLAKE2b-256 514b7e5cd41013a31529a4570ca7e5414bb38786e37a896ff0d0a746b5f220cd

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