Promises and pitfalls of artificial intelligence for legal applications