-
-
Notifications
You must be signed in to change notification settings - Fork 1
Rating Config
Rating wines using numerical values can be contentious but is valuable for quantifying the tasting experience. Vino accommodates several established rating scales – 5-point, 10-point, 20-point, and 100-point systems - and even allows for custom scales. This flexibility is achieved through several configuration options:
-
vino-rating-scale: Sets the maximum score possible on your chosen scale. Default is5.0. -
vino-rating-precision: Determines the number of decimal places for the score. Default is1. -
vino-rating-props: Defines the rating flow, allowing you to craft unique or evolving rating systems.
📝 Beginner's Note: If you're new to Vino, start with the "Simple Rating" approach below. You can always switch to more complex rating systems later - Vino supports version-based rating configurations, so your old ratings will continue to work even as you evolve your system.
To ensure proper functionality, set the scale and precision before loading Vino:
(setq-default vino-rating-scale 5.0
vino-rating-precision 1)
(require 'vino)The most straightforward approach in Vino is to request a numerical score within your chosen scale. By default, Vino uses this method. The configuration looks like this:
(setq vino-rating-props `((1 . (("SCORE" . ,vino-rating-scale)))))When rating a wine, you will input a score from 0 to your vino-rating-scale. This score gets reflected in the rating file as follows:
- version :: 1
- score :: 4.8
- score_max :: 5.0
- total :: 4.8
The multiple numerical fields enable system evolution and allow for recalculating or updating ratings with vino-entry-update interactive function.
This simple approach is perfect for getting started with Vino. Many users find this sufficient for their needs.
Before diving into complex ratings, you might want to try rating wines across a few key dimensions. Here's a simpler multi-property example:
(setq vino-rating-props
`((2 . (("APPEARANCE" .
(("clear and brilliant" . 1)
("acceptable" . 0.5)
("faulty" . 0)))
("AROMA" .
(("complex and pleasant" . 2)
("pleasant" . 1.5)
("simple" . 1)
("faulty" . 0)))
("TASTE" .
(("exceptional" . 2)
("very good" . 1.5)
("good" . 1)
("acceptable" . 0.5)
("poor" . 0)))))))This configuration creates a 5-point scale (1 + 2 + 2 = 5 max) split across three main categories. It's a good middle ground between simple and complex.
For a more nuanced approach, Vino can calculate ratings based on responses to specific questions about the wine's characteristics. This method involves answering questions on various aspects like aroma, balance, aftertaste, etc. You name it! Here's how you can set it up:
⚠️ Advanced Configuration: The example below shows a comprehensive rating system. While powerful, it requires answering many questions per wine. Consider starting with the intermediate example above and adding complexity gradually.
(setq vino-rating-props
`((1 . (("SCORE" . ,vino-rating-scale)))
;; let's define a new version
(2 . (("AROMA_QUALITY" .
(("no faults" . 3)
("one small fault" . 2)
("moderately faulty" . 1)
("completely faulty" . 0)))
("AROMA_INTENSITY" .
(("aroma can be perceived without putting nose into glass" . 2)
("aroma can be perceived only by putting nose into glass" . 1)
("closed, you need to put a lot of effort to get the aroma" . 0)))
("AROMA_RICHNESS" .
(("more than 3 different notes" . 3)
("only 3 notes" . 2)
("only 2 notes" . 1)
("only 1 note" . 0)))
("AROMA_COMPLEXITY" .
(("sophisticated, multilayered" . 1)
("simple" . 0)))
("BALANCE" .
(("perfectly balanced, everything is in its place" . 3)
("well balanced, might be a small issue" . 2)
("average, either one bigger issue or two small" . 1)
("unbalanced, everything else" . 0)))
("FLAVOURS" .
(("multiple flavours" . 1)
("only one flavour" . 0)))
("EVOLUTION" .
(("taste and flavours evolve over time in mouth" . 1)
("plain, straightforward" . 0)))
("AFTERTASTE" .
(("long, lasting more than 30 seconds" . 2)
("average, lasting more than 10 seconds" . 1)
("short" . 0)))
("GENERAL" .
(("life changing" . 4)
("great wine, will look into tasting it once more" . 3)
("good wine, will drink it again with pleasure" . 2)
("average wine, only with parents" . 1)
("bad wine, only for enemies" . 0)))))))In this approach, during a rating session, Vino will prompt you to select values for each property defined in vino-rating-props. For example:
- "Aroma Quality": Choose an option. Each option correlates to a score.
- "Aroma Intensity": Select from the provided options, each translating to a score.
- ... (and so on for each property)
The resulting data in the rating file would look something like this:
- version :: 2
- aroma_quality :: 3
- aroma_quality_max :: 3
- aroma_intensity :: 2
- aroma_intensity_max :: 2
- aroma_richness :: 3
- aroma_richness_max :: 3
- aroma_complexity :: 1
- aroma_complexity_max :: 1
- balance :: 2
- balance_max :: 3
- flavours :: 1
- flavours_max :: 1
- evolution :: 0
- evolution_max :: 1
- aftertaste :: 2
- aftertaste_max :: 2
- general :: 2
- general_max :: 4
- score :: 16.0
- score_max :: 20.0
- total :: 4.0
Each property will have its value and max value recorded, and Vino calculates the overall score and total.
For even more complexity, you can use functions as properties. These functions return a score and max score pair. For example:
🔬 Expert Feature: Function-based properties allow for the most sophisticated rating workflows, including interactive prompts, conditional logic, and dynamic scoring. Only use this if the standard approaches don't meet your needs.
(setq vino-rating-props '((3 . (("ANSWER" . (lambda () (cons 42 100)))))))This flexibility allows for intricate rating systems, such as deducting points for specific wine flaws.
(setq vino-rating-props
'((3 . (("AROMA_QUALITY" . (lambda ()
(let* ((total 3)
(res total)
(ans t)
(quit-on "no taints")
(opts (list
quit-on
"aggressive ethanol"
"massive brett attack"
"VA, especially nail polish removal")))
(while ans
(setq ans (completing-read "Any taints? " opts))
(setq opts (delete ans opts))
(if (string-equal ans "no taints")
(setq ans nil)
(setq res (max 0 (- res 1))))
(when (equal res 0)
(setq ans nil)))
(cons res total))))))))Each wine entry can be rated multiple times, necessitating a method to combine these ratings into a single value. By default, Vino uses the arithmetic mean. However, you can adjust this behaviour using the vino-entry-rating-average-method variable. The supported values are:
-
amean(default) - arithmetic mean; -
min- the lowest value; -
max- the highest value; -
oldest- the value of the oldest rating; -
latest- the value of the latest rating.
In addition to these predefined algorithms, vino-entry-rating-average-method can be set to a custom function. When set, Vino will call this function whenever it needs to calculate the final rating of a wine entry. The function will receive a list of ratings (numbers) sorted from oldest to latest and must return a single number.
Regardless of the method used, the resulting rating is rounded according to vino-rating-precision.