communications-mining
latest
false
- API-Dokumentation
- Einleitung
- Verwenden der API
- API-Tutorial
- Zusammenfassung
- Quellen
- Datasets
- Anmerkungen
- Anhänge (Attachments)
- Vorhersagen
- Erstellen Sie einen Stream
- Aktualisieren Sie einen Stream
- Rufen Sie einen Stream nach Namen ab
- Rufen Sie alle Streams ab
- Löschen Sie einen Stream
- Get results from stream
- Fetch comments from a stream (legacy)
- Bringen Sie einen Stream vor
- Einen Stream zurücksetzen
- Kennzeichnen Sie eine Ausnahme
- Entfernen Sie das Tag einer Ausnahme
- Prüfungsereignisse
- Alle Benutzer abrufen
- CLI
- Integrationsleitfäden
- Blog
- Wie Maschinen lernen, Wörter zu verstehen: eine Anleitung zu Einbettungen in NLP
- Eingabeaufforderungsbasiertes Lernen mit Transformers
- Ef Robots II: Wissensdegesterration und Feinabstimmung
- Effiziente Transformer I: Warnmechanismen
- Tief hierarchische, nicht überwachte Absichtsmodellierung: Nutzen ohne Trainingsdaten
- Beheben der Anmerkungsverzerrung durch Communications Mining
- Aktives Lernen: Bessere ML-Modelle in weniger Zeit
- Auf Zahlen kommt es an – Bewertung der Modellleistung mit Metriken
- Darum ist Modellvalidierung wichtig
- Vergleich von Communications Mining und Google AutoML für die Ermittlung von Konversationsdaten
Erstellen Sie einen Stream
Wichtig :
Dieser Inhalt wurde maschinell übersetzt.
Communications Mining-Entwicklerhandbuch
Last updated 27. Sep. 2024
Erstellen Sie einen Stream
/api/v1/datasets/<project>/<dataset_name>/streams
/api/v1/datasets/<project>/<dataset_name>/streams
Erforderliche Berechtigungen: Streams-Administrator, Bezeichnungen anzeigen
- Bash
curl -X PUT 'https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams' \ -H "Authorization: Bearer $REINFER_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "stream": { "comment_filter": { "user_properties": { "number:Spend": { "maximum": 100000, "minimum": 100 }, "number:Transactions": { "one_of": [ 1 ] }, "string:Country": { "one_of": [ "uk", "de" ] } } }, "description": "Used by ACME RPA to create tickets for disputes.", "model": { "label_thresholds": [ { "name": [ "Some Label" ], "threshold": 0.37 }, { "name": [ "Another Label" ], "threshold": 0.46 }, { "name": [ "Parent Label", "Child Label" ], "threshold": 0.41 } ], "version": 8 }, "name": "dispute", "title": "Collateral Disputes" } }'
curl -X PUT 'https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams' \ -H "Authorization: Bearer $REINFER_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "stream": { "comment_filter": { "user_properties": { "number:Spend": { "maximum": 100000, "minimum": 100 }, "number:Transactions": { "one_of": [ 1 ] }, "string:Country": { "one_of": [ "uk", "de" ] } } }, "description": "Used by ACME RPA to create tickets for disputes.", "model": { "label_thresholds": [ { "name": [ "Some Label" ], "threshold": 0.37 }, { "name": [ "Another Label" ], "threshold": 0.46 }, { "name": [ "Parent Label", "Child Label" ], "threshold": 0.41 } ], "version": 8 }, "name": "dispute", "title": "Collateral Disputes" } }' - Knoten
const request = require("request"); request.put( { url: "https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams", headers: { Authorization: "Bearer " + process.env.REINFER_TOKEN, }, json: true, body: { stream: { comment_filter: { user_properties: { "number:Spend": { maximum: 100000, minimum: 100 }, "number:Transactions": { one_of: [1] }, "string:Country": { one_of: ["uk", "de"] }, }, }, description: "Used by ACME RPA to create tickets for disputes.", model: { label_thresholds: [ { name: ["Some Label"], threshold: 0.37 }, { name: ["Another Label"], threshold: 0.46 }, { name: ["Parent Label", "Child Label"], threshold: 0.41 }, ], version: 8, }, name: "dispute", title: "Collateral Disputes", }, }, }, function (error, response, json) { // digest response console.log(JSON.stringify(json, null, 2)); } );
const request = require("request"); request.put( { url: "https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams", headers: { Authorization: "Bearer " + process.env.REINFER_TOKEN, }, json: true, body: { stream: { comment_filter: { user_properties: { "number:Spend": { maximum: 100000, minimum: 100 }, "number:Transactions": { one_of: [1] }, "string:Country": { one_of: ["uk", "de"] }, }, }, description: "Used by ACME RPA to create tickets for disputes.", model: { label_thresholds: [ { name: ["Some Label"], threshold: 0.37 }, { name: ["Another Label"], threshold: 0.46 }, { name: ["Parent Label", "Child Label"], threshold: 0.41 }, ], version: 8, }, name: "dispute", title: "Collateral Disputes", }, }, }, function (error, response, json) { // digest response console.log(JSON.stringify(json, null, 2)); } ); - Python
import json import os import requests response = requests.put( "https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams", headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]}, json={ "stream": { "name": "dispute", "title": "Collateral Disputes", "description": "Used by ACME RPA to create tickets for disputes.", "model": { "version": 8, "label_thresholds": [ {"name": ["Some Label"], "threshold": 0.37}, {"name": ["Another Label"], "threshold": 0.46}, { "name": ["Parent Label", "Child Label"], "threshold": 0.41, }, ], }, "comment_filter": { "user_properties": { "string:Country": {"one_of": ["uk", "de"]}, "number:Spend": {"minimum": 100, "maximum": 100000}, "number:Transactions": {"one_of": [1]}, } }, } }, ) print(json.dumps(response.json(), indent=2, sort_keys=True))
import json import os import requests response = requests.put( "https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams", headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]}, json={ "stream": { "name": "dispute", "title": "Collateral Disputes", "description": "Used by ACME RPA to create tickets for disputes.", "model": { "version": 8, "label_thresholds": [ {"name": ["Some Label"], "threshold": 0.37}, {"name": ["Another Label"], "threshold": 0.46}, { "name": ["Parent Label", "Child Label"], "threshold": 0.41, }, ], }, "comment_filter": { "user_properties": { "string:Country": {"one_of": ["uk", "de"]}, "number:Spend": {"minimum": 100, "maximum": 100000}, "number:Transactions": {"one_of": [1]}, } }, } }, ) print(json.dumps(response.json(), indent=2, sort_keys=True)) - Antwort
{ "status": "ok", "stream": { "context": "0", "created_at": "2019-08-03T12:30:00.123456Z", "dataset_id": "abcdef0123456789", "description": "Used by ACME RPA to create tickets for disputes.", "id": "0123456789abcdef", "model": { "version": 8 }, "name": "dispute", "title": "Collateral Disputes", "updated_at": "2019-08-03T12:30:00.123456Z" } }
{ "status": "ok", "stream": { "context": "0", "created_at": "2019-08-03T12:30:00.123456Z", "dataset_id": "abcdef0123456789", "description": "Used by ACME RPA to create tickets for disputes.", "id": "0123456789abcdef", "model": { "version": 8 }, "name": "dispute", "title": "Collateral Disputes", "updated_at": "2019-08-03T12:30:00.123456Z" } }
Streams ermöglichen eine persistente, zustandsbehaftete Iteration durch Kommentare in einem Dataset, mit vorhergesagten Beschriftungen und allgemeinen Feldern, die mit einem fixierten Modell berechnet werden.
Once a stream is created, the and methods can be used to iterate through comments.
Name | Typ | Erforderlich | BESCHREIBUNG |
---|---|---|---|
name | string | ja | API-Name für den Stream, der in URLs verwendet wird. Muss innerhalb eines Datasets eindeutig sein und mit [A-Za-z0-9-_]{1,256} übereinstimmen.
|
title | string | nein | Einzeiliger, visuell lesbarer Titel für den Stream. |
description | string | nein | Eine längere Beschreibung des Streams. |
model | Modell | nein | Wenn angegeben, enthalten aus diesem Stream abgerufene Kommentare Vorhersagen aus einem angehefteten Modell. |
comment_filter | CommentFilter | nein | If specified, comments not matching the filter will not be returned. See for details on how the comment filter will affect the results returned by the stream. |
Dabei hat
Model
das folgende Format:
Name | Typ | Erforderlich | BESCHREIBUNG |
---|---|---|---|
version | Integer | ja | Eine Modellversion, die über die Seite Modelle angeheftet wurde. |
label_thresholds | array<LabelThreshold> | nein | Wenn diese Option festgelegt ist, werden nur Werte zurückgegeben, die den angegebenen label_thresholds entsprechen. Wenn diese Option nicht festgelegt ist, werden alle Beschriftungen und alle Vorhersagewerte zurückgegeben.
|
Dabei hat
LabelThreshold
das folgende Format:
Name | Typ | Erforderlich | BESCHREIBUNG |
---|---|---|---|
name | array<string> | ja | Der Name der zurückzugebenden Bezeichnung, formatiert als Liste hierarchischer Bezeichnungen. Beispielsweise hat die Beschriftung "Some Label" das Format ["Some Label"] und die Beschriftung "Parent Label > Child Label" das Format ["Parent Label", "Child Label"] .
|
threshold | Nummer | ja | Der Konfidenz-Schwellenwert, der für die Bezeichnung verwendet werden soll (eine Zahl zwischen 0,0 und 1,0). Die Bezeichnung wird für einen Kommentar nur zurückgegeben, wenn die Vorhersage über diesem Schwellenwert liegt. |
Dabei hat
CommentFilter
das folgende Format:
Name | Typ | Erforderlich | BESCHREIBUNG |
---|---|---|---|
user_properties | UserPropertyFilter | nein | Ein Filter, der auf die Benutzereigenschaften eines Kommentars angewendet wird. Weitere Informationen zu Benutzereigenschaften finden Sie in der Kommentarreferenz. |
UserPropertyFilter
ist eine Zuordnung von Benutzereigenschaftsnamen, die gefiltert werden sollen. String-Eigenschaften können nach Werten in einem Satz gefiltert werden ({"one_of": ["val_1", "val_2"]}
). Zahleneigenschaften können entweder nach Werten in einem Satz ({"one_of": [123, 456]}
) oder nach einem Bereich ({"minimum": 123, "maximum": 456}
) gefiltert werden.