Ahhh, carbohydrate nomenclature is a beautiful system, if you give it the time it deserves to learn.
Short answer: you use the same method for ketoses as you do for aldoses.
a and
b describe the configuration of the anomeric centre
relative to the
configurational centre. This
configurational centre is the stereocentre that determines D/L prefix - which is the last stereocentre in the sugar chain (normally the penultimate C). e.g., for glucose the configurational centre is C5 (C6 is not stereogenic, so C5 is the last sterecentre). Note that any sugar in which the O at the last stereogenic centre points right in the Fisher projection is D by definition (if it points left it is L) - this is why we call it the configurational atom/centre.
Anomers are defined (by IUPAC) by the following rule:
In the Fischer projection, if the exocyclic O is pointing in the same direction as the O at the
configurational atom, it is
a. If the exocyclic O at the anomeric centre points in the opposite direction compared to the O at the configurational atom, then it is the
b anomer.
Here is a
link that provides several examples.
You do not have to convert the whole structure to the Fischer projection, in practice there are shortcuts. Here is a previous thread on the subject:
http://www.chemicalforums.com/index.php?topic=40641.0Edit:Link fixed