Skip to content

Example of using topic detection with Geneea API which can be integrated with Keboola.

Notifications You must be signed in to change notification settings

Geneea/keboola-topic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Geneea topic detection API

A Docker container used for running the topic detection API.

This is an example of integration of Geneea API with Keboola Connection

Running a container

This container can be run from the Registry using:

sudo docker run \
--volume=/home/ec2-user/data:/data \
--rm \
geneea/keboola-topic:latest

Note: --volume needs to be adjusted accordingly.

Building a container

To build this container manually one can use:

git clone https://github.com/Geneea/keboola-topic.git
cd keboola-topic
sudo docker build --no-cache -t geneea/keboola-topic .

Sample configuration

Mapped to /data/config.yml

storage:
  input:
    tables:
      0:
        source: source.csv
  output:
    tables:
      0:
        source: topic.csv
parameters:
  user_key: <ENTER API KEY HERE>
  customer_id: <ENTER CUSTOMER ID HERE>
  id_column: id
  data_column: text
  language: en # OPTIONAL

Sample data

Input

Read from /data/in/tables/source.csv

id,text
1,"He won gold and silver medals at the past two Olympic Games, and even has an aquatic arena named after him."
2,"The museum was considered to host one of the world's greatest archaeological collections."
3,"These measurements should allow us to confirm some of the basic features of the greenhouse effect."

Output

Written to /data/out/tables/topic.csv

id,topic,confidence
1,Sports,0.467843459155
2,Science,0.373045280015
3,Other,NaN

About

Example of using topic detection with Geneea API which can be integrated with Keboola.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages