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 minecart
This will show a list of the actions minecart can perform
To run an action:
> stack exec minecart -- --action
There are a number of actions minecart can perform
--pgsetup
adds the tables to the minecart pogstres database and adds forum posts fromgb-forum.csv
--entities
runs google cloud natural language request for each post body and collects the entities in the db--sentences
runs google cloud natural language request for each post body and collects sentences sentiments in the db--elastic
sets up an elasticsearch index and adds the complete post data to it
--pgsetup
must be run first--entities
&--sentences
are optional (need an environment var ofGOOGLE_CLOUD_API_KEY
)- finally run
--elastic
to set up an elasticsearch index with the post data