recognize raw and bert messages