Actually parses the mentions and assigns their ids.