def parse_tableauxdb_sizes(fh):
    """
    Parse the dimensinos of tableaux from the ascii tableauxdb

    Parameters:
        fh - open (read) filehandle for ascii tableauxdb file (numeric or
             discrete)
    Return value:
        dictionary { domid : dim } mapping domain identifiers to tableau
        dimension (numer of sses)
    """
    dimdict = {}
    line = fh.readline()
    while line != "":
        (domid, sdim) = line.split()
        dim = int(sdim)
        dimdict[domid.lstrip().rstrip().upper()] = dim
        i = 0
        while i < dim * 2:
            line = fh.readline()  # read through the tableau and dist matrix
            i += 1
        line = fh.readline() # read the blank line between entries
        line = fh.readline()
    return dimdict