Legal aspects of text mining