Text this: New approach of a contact detection algorithm based on a Shortest Link method