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-1.0.1.tar.gz (16.2 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-1.0.1-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aristech_nlp_client-1.0.1.tar.gz
Algorithm Hash digest
SHA256 03ee2a5e9c53ac43d9eae0a6f655009816c06cd4bbcfb4d46ff4fc9e39faadf8
MD5 6a539438256c76276fa3b7b09c9c0459
BLAKE2b-256 7983a30a69b8fe06dabfc0b1ef8d335de67365c84e39f75bca9ebfe0ce5b6eba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aristech_nlp_client-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8004bad6af65f4896e297077c58ee0993ef2fbaf287dbeb6f9d38aa8f9cb3a9
MD5 0a2f2bc1ce74051b283c5e704a96cb11
BLAKE2b-256 4ba3f0b4940e536c0b0de5b57bcd12d3ca61e7687b89f8675596f1d3dd778773

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