Topic library construction