Text this: A theory of segmented polities