Billa maps directly to the canonical categories. Spar uses a mapping file stores/spar-categories.json.
Each store has a generateCategoryMapping() function which is called once in analysis.js:updateData() and analysis.js:replay(). The function is responsible for
* Fetching the latest categories
* Merging them with already mapped categories
* Report new categories that haven't been mapped yet
* Report categories that have been mapped but are no longer part of the latest set of categories
* Save the merged mappings to disk
This schema might not work for all stores, in which case updateData() and replay() will use a knn approach to figure out the category for an item. See #81
Add proper CLI flags to avoid having positional CLI args. Allow setting options via ENV for other deployments.
Improve README
Split up node environment so that dev/prod can be handled differently in the future.