Question about blogging software

Does anyone know of blogging software that allows blog posts and blog comments to be rated with the comments rising to the top the higher they are rated? I am thinking of something much like Amazon’s book pages where readers can rate both the books and the comments. The software would have to be flexible. Alternatively, can anyone out there write or modify existing software to perform these sorts of tasks? Email me with leads. Thanks!