text-string probability function structure