Resuming on 204 for six, Somerset were dismissed for 224 to end their hopes of winning a maiden County Championship title.