AI for smarter legislation