Graphical Models over String-Valued Random Variables