Semigroup methods for large deviations of Markov processes