The role of artificial intelligence in the legal sector