utility to embellish transport gingerbread CSV forum data into Elasticsearch. Uses the Google Cloud Natural Language API to add analysis data to each forum post.
- Make sure you have stack (install guides here and here).
- Build the project with
stack build - Create a postgres DB called
minecart
to run the utility:
> stack exec minecartThis will show a list of the actions minecart can perform
To run an action:
> stack exec minecart -- --actionThere are a number of actions minecart can perform
--pgsetupadds the tables to the minecart pogstres database and adds forum posts fromgb-forum.csv--entitiesruns google cloud natural language request for each post body and collects the entities in the db--sentencesruns google cloud natural language request for each post body and collects sentences sentiments in the db--elasticsets up an elasticsearch index and adds the complete post data to it
--pgsetupmust be run first--entities&--sentencesare optional (need an environment var ofGOOGLE_CLOUD_API_KEY)- finally run
--elasticto set up an elasticsearch index with the post data