Bixby Developer Center

References

Rating (viv.rating)

The viv.rating capsule provides a set of abstract concepts for storing user-generated ratings and reviews of other entities, such as businesses or movies.

This reference lists out several of the models available in this library capsule. Some sections contain tables listing information about those concepts or actions.

Models

Types are always in the viv.* namespace, and in the viv.rating.* namespace unless another namespace is specified (for example, viv.geo.*). All properties have a cardinality of min (Optional), max (One) unless otherwise specified.

Rating

This is a typical quality rating, generally expressed as stars (for example, "4 stars") or as a fraction (for example, "8 out of 10").

PropertyTypeKindNotes
maxScoreMaxScoredecimalRequired (1)
minScoreMinScoredecimalRequired (2)
ratingSourceRatingSourcenameRequired
scoreScoredecimalRequired
normalizedScoreNormalizedScoredecimal(3)
numberOfAggregatedRatingsNumberOfAggregatedRatingsinteger
discretizedScoreDiscreteStarsenum(4)
  1. MaxScore is the score denominator, such as the highest possible score: 5.0 for a 1–5 star rating; 10.0 for a 10-point rating scale.
  2. MinScore is the lowest possible score. This will generally be 0 or 1.
  3. The NormalizedScore is a decimal fraction between 0.0 and 1.0. It will be computed for you based on MinScore, MaxScore, and Score.
  4. The discretizedScore will be calculated for you, and set to one of OneStar, TwoStars, ThreeStars, FourStars, or FiveStars. This is intended to assist in preference learning.

The default sort ordering for Rating is descending by normalizedScore, then descending by numberOfAggregatedRatings.

PriceRating

The PriceRating model is used for entities that might have separate ratings for their prices, such as hotels or restaurants, that might be marked with 1–4 currency signs, such as "$$$$" for "very expensive." It has the same properties as Rating, with the following exceptions:

  • discretizedScore is of type DiscreteDollars, and its enumerated symbols are OneDollar, TwoDollars, ThreeDollars, and FourDollars.
  • Generally, MinScore should be set to 1.0 and MaxScore should be set to 4.0.
  • The default sort ordering is ascending by normalizedScore (least expensive to most expensive).

The capsule includes vocabulary for sorting (for example, requesting "affordable" prices will sort from lowest to highest, while requesting "premium" prices will sort from highest to lowest).

Review

PropertyTypeKindNotes
authorReviewAuthorstructure
titleReviewTitletext
contentReviewContentname
ratingRatingstructure
snippetReviewSnippettextRequired
urlReviewUrltext
createdReviewCreatedDatestructurerole-of time.DateTime (1)
  1. See viv.time for details.

ReviewAuthor

PropertyTypeKind
nameReviewAuthorNamename
imageReviewAuthorImagetext
urlReviewAuthorUrltext

Ranking

This model is used to rank items arbitrarily within a group.

PropertyTypeKindNotes
rankRankintegerRequired
outOfRankTotalintegerRequired
sourceRatingSourcenameRequired
categoryRankingCategoryname 

The default sort ordering is ascending by rank.

RatingCount

RatingCount is a named primitive concept, an integer representing the total number of ratings for an item. This is not used in other structure concepts in Rating but can be used by your capsules.