Text this: A robust graph-based approach to observational equivalence