The themes are shared amongst groups of trainer classes. It appears the sound library is only listing one type of trainer class that each theme goes with, but other types also share each theme. The groups that share themes are:
Twins, Poké Kid, Tuber & Ninja Boy
Youngster, Camper, Bug Catcher & Pokémon Breeder
Scientist & Collector
Gentleman, Socialite, Rich Boy, Lady & PI
Cyclist, Jogger, Skier & Swimmer♂
Aroma/Parasol Lady, Pokémon Breeder♀, Beauty & Swimmer♀
Worker & Artist
Fisherman & Sailor
Ace Trainer & Veteran
Lass & Picnicker
Hiker, Cowgirl, Rancher, Belle & Pa
Battle Girl, Black Belt, Psychic, Roughneck & Guitarist
Which should make up the full 12 themes in the library. I've bolded the trainer class the library track is named after. Unfortunately, this doesn't seem to be an exhaustive list; for example, the Policeman class shares its theme with the Black Belt group but isn't listed here. The full list of classes from Diamond and Pearl should be:
Ace Trainer • Aroma Lady • Artist • Battle Girl • Beauty • Bird Keeper • Black Belt • Bug Catcher • Cameraman • Camper • Champion
Clown • Collector • Commander • Cowgirl • Cyclist • Double Team • Dragon Tamer • Elite Four • Fisherman • Gentleman • Guitarist
Leader • Hiker • Idol • Interviewers • Jogger • Lady • Lass • Socialite • Ninja Boy • Parasol Lady • Picnicker • PI • PokéFan
Poké Kid • Pokémon Breeder • Pokémon Ranger • Pokémon Trainer • Policeman • Psychic • Rancher • Belle & Pa
Reporter • Rich Boy • Roughneck • Ruin Maniac • Sailor • School Kid • Scientist • Skier • Swimmer • Galactic Boss
Galactic Grunt • Tower Tycoon • Tuber • Twins • Veteran • Waiter • Waitress • Worker • Young Couple • Youngster
A few of these have their own themes (the gym leaders, team Galactic and so on) but otherwise should slot into one of the twelve groups listed above.