Expand description
Helper methods for dealing with interaction data
This module provides a few convenience functions to consume interaction data stored in CSV files, which by our experience is the most common data format for item interactions. Note that these implementations do not assume that they can hold the whole CSV in memory.
Functions
Reads a CSV input file. We expect NO headers, and a user-item pair per line
with tab separation, which denotes an interaction between a user and this item, e.g.,
Converts a
csv::Reader
for an interaction file into an Iterator<Item=(String, String)>
over
the contained interactions.Output the computed indicators in JSON format, using the original identifiers from the
inputfile. If an
indicators_path
is supplied, we write to a file at the specified path,
otherwise, we output to stdout. Each line holds a JSON representation