As far as I can remember the AI first goes with culture (e.g. a Swedish character will pick Sweden over Denmark 100 % of the time since Sweden has "culture = swedish", but an English character wouldn't consider either better than the other based on culture), then dignity (number of counties in the de jure plus the scripted dignity rating (used in a few places where it is relevant historically, e.g. Lotharingia > Burgundy), after which I don't know if it has any priorities (I suspect the game as a whole goes off of either the order in which it reads the titles (based on file structures and with dynamic ones presumably being appended at the end in creation order) or alphabetically).