Anthropic has settled a class action lawsuit with a group of US authors who accused the AI startup of copyright infringement.