Change semiparse to a general parse function