Text this: Bayesian curve fitting using MCMC with applications to signal segmentation