adding a method to construct a partition strategy from a string.