Integration of the Geneea API with Keboola Connection.
This is a Docker container used for running user-feedback NLP analysis jobs in the KBC. Automatically built Docker images are available at Docker Hub Registry.
To build this container manually one can use:
git clone https://github.com/Geneea/kbc-feedback-analysis.git
cd kbc-feedback-analysis
sudo docker build --no-cache -t geneea/kbc-feedback-analysis .
This container can be run from the Registry using:
sudo docker run \
--volume=/home/ec2-user/data:/data \
--rm \
geneea/kbc-feedback-analysis:latest
Note: --volume needs to be adjusted accordingly.
Mapped to /data/config.json
{
"storage": {
"input": {
"tables": [
{
"destination": "comments.csv"
}
]
}
},
"parameters": {
"user_key": "<ENTER API KEY HERE>",
"columns": {
"id": ["feedback_id"],
"text": ["summary"],
"positives": ["pos_1", "pos_2"],
"negatives": ["neg_1", "neg_2"]
},
"language": "cs",
"domain": "retail",
"feedback_entities": ["service", "product"],
"feedback_relations": ["ATTR"],
"correction": "aggresive",
"diacritization": "auto",
"use_beta": false
}
}
The results of the NLP analysis are written into five tables.
-
analysis-result-comments.csvwith comment-level results in the following columns:- all
idcolumns from the input table (used as primary keys) languagedetected language of the comment, as ISO 639-1 language codesentimentValuedetected sentiment of the comment, from an interval [-1.0; 1.0]sentimentPolaritydetected sentiment of the comment (-1, 0 or 1)sentimentLabelsentiment of the comment as a label (negative, neutral or positive)usedCharsthe number of characters used by this comment
- all
-
analysis-result-sentences.csvwith sentence-level results has the following columns:- all
idcolumns from the input table (used as primary keys) indexzero-based index of the sentence in the comment, (primary key)segmenttext segment where the sentence is locatedtextthe sentence textsentimentValuedetected sentiment of the sentence, from an interval [-1.0; 1.0]sentimentPolaritydetected sentiment of the sentence (-1, 0 or 1)sentimentLabelsentiment of the sentence as a label (negative, neutral or positive)
- all
-
analysis-result-entities.csvwith entity-level results has the following columns:- all
idcolumns from the input table (used as primary keys) typetype of the found entity, e.g. person, organization or tag, (primary key)textdisambiguated and standardized form of the entity, e.g. John Smith, Keboola, safe carseat, (primary key)scorerelevance score of the entity, e.g. 0.8entityUidunique ID of the entity, may be emptysentimentValuedetected sentiment of the entity, from an interval [-1.0; 1.0]sentimentPolaritydetected sentiment of the entity (-1, 0 or 1)sentimentLabelsentiment of the entity as a label (negative, neutral or positive)
- all
-
analysis-result-relations.csvwith relations-level results has the following columns:- all
idcolumns from the input table (used as primary keys) typetype of the found relation, VERB or ATTR, (primary key)nametextual name of the relation, e.g. buy or smart, (primary key)subjectpossible subject of the relation (primary key)objectpossible object of the relation (primary key)subjectTypetype of the relation's subjectobjectTypetype of the relation's objectsubjectUidunique ID of the relation's subjectobjectUidunique ID of the relation's objectsentimentValuedetected sentiment of the relation, from an interval [-1.0; 1.0]sentimentPolaritydetected sentiment of the relation (-1, 0 or 1)sentimentLabelsentiment of the relation as a label (negative, neutral or positive)
- all
-
analysis-result-full.csvwith full analysis results in the following columns:- all
idcolumns from the input table (used as primary keys) binaryDataserialized data with full analysis as Base64
This table can be used as an input for the Geneea Frida writer app.
- all