The legal data refinery