score(item) {
        // Initialize an empty array of odds per category.
        const odds = {};
        let category;
        // Iterate through each key in the item,
        // then iterate through each category that has been used
        // in previous calls to `.train()`
        for (const k in item) {
            const v = item[k];
            for (category in this.data) {
                // Create an empty object for storing key - value combinations
                // for this category.
                odds[category] = {};

                // If this item doesn't even have a property, it counts for nothing,
                // but if it does have the property that we're looking for from
                // the item to categorize, it counts based on how popular it is
                // versus the whole population.
                if (this.data[category][k]) {
                    odds[category][k + "_" + v] =
                        (this.data[category][k][v] || 0) / this.totalCount;
                } else {
                    odds[category][k + "_" + v] = 0;
                }
            }
        }

        // Set up a new object that will contain sums of these odds by category
        const oddsSums = {};

        for (category in odds) {
            // Tally all of the odds for each category-combination pair -
            // the non-existence of a category does not add anything to the
            // score.
            oddsSums[category] = 0;
            for (const combination in odds[category]) {
                oddsSums[category] += odds[category][combination];
            }
        }

        return oddsSums;
    }
Generate a score of how well this item matches all
possible categories based on its attributes

@param {Object} item an item in the same format as with train
@returns {Object} of probabilities that this item belongs to a
given category.