A flexible framework for recognizing events, temporal expressions, and temporal relations in clinical text