Generalizing identity-based string comparison metrics: Framework and techniques