Evolution of Artificial Intelligence and Its Application in the Legal Field