Skip to content

Geneea/kbc-feedback-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User feedback analysis in KBC using Geneea NLP platform

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.

Building a container

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 .

Running a container

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.

Sample configuration

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
  }
}

Output format

The results of the NLP analysis are written into five tables.

  • analysis-result-comments.csv with comment-level results in the following columns:

    • all id columns from the input table (used as primary keys)
    • language detected language of the comment, as ISO 639-1 language code
    • sentimentValue detected sentiment of the comment, from an interval [-1.0; 1.0]
    • sentimentPolarity detected sentiment of the comment (-1, 0 or 1)
    • sentimentLabel sentiment of the comment as a label (negative, neutral or positive)
    • usedChars the number of characters used by this comment
  • analysis-result-sentences.csv with sentence-level results has the following columns:

    • all id columns from the input table (used as primary keys)
    • index zero-based index of the sentence in the comment, (primary key)
    • segment text segment where the sentence is located
    • text the sentence text
    • sentimentValue detected sentiment of the sentence, from an interval [-1.0; 1.0]
    • sentimentPolarity detected sentiment of the sentence (-1, 0 or 1)
    • sentimentLabel sentiment of the sentence as a label (negative, neutral or positive)
  • analysis-result-entities.csv with entity-level results has the following columns:

    • all id columns from the input table (used as primary keys)
    • type type of the found entity, e.g. person, organization or tag, (primary key)
    • text disambiguated and standardized form of the entity, e.g. John Smith, Keboola, safe carseat, (primary key)
    • score relevance score of the entity, e.g. 0.8
    • entityUid unique ID of the entity, may be empty
    • sentimentValue detected sentiment of the entity, from an interval [-1.0; 1.0]
    • sentimentPolarity detected sentiment of the entity (-1, 0 or 1)
    • sentimentLabel sentiment of the entity as a label (negative, neutral or positive)
  • analysis-result-relations.csv with relations-level results has the following columns:

    • all id columns from the input table (used as primary keys)
    • type type of the found relation, VERB or ATTR, (primary key)
    • name textual name of the relation, e.g. buy or smart, (primary key)
    • subject possible subject of the relation (primary key)
    • object possible object of the relation (primary key)
    • subjectType type of the relation's subject
    • objectType type of the relation's object
    • subjectUid unique ID of the relation's subject
    • objectUid unique ID of the relation's object
    • sentimentValue detected sentiment of the relation, from an interval [-1.0; 1.0]
    • sentimentPolarity detected sentiment of the relation (-1, 0 or 1)
    • sentimentLabel sentiment of the relation as a label (negative, neutral or positive)
  • analysis-result-full.csv with full analysis results in the following columns:

    • all id columns from the input table (used as primary keys)
    • binaryData serialized data with full analysis as Base64

    This table can be used as an input for the Geneea Frida writer app.

About

User feedback analysis in Keboola Connection (KBC) using Geneea NLP platform.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors