feat(parser): normalize dot-compressed names in split()
Inserts spaces after dots when the cleaned name has no spaces but contains dots, so the existing last-space fallback handles names like "E.Rockstroh" and "Dr.Fr.Zarncke" correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -123,6 +123,11 @@ public class PersonNameParser {
|
||||
|
||||
String cleaned = GEB_PATTERN.matcher(rawName).replaceAll("").trim();
|
||||
|
||||
// Normalize dot-compressed names: "Dr.Fr.Zarncke" -> "Dr. Fr. Zarncke"
|
||||
if (!cleaned.contains(" ") && cleaned.contains(".")) {
|
||||
cleaned = cleaned.replace(".", ". ").trim();
|
||||
}
|
||||
|
||||
String lastName = findKnownLastName(cleaned);
|
||||
if (lastName != null) {
|
||||
String firstName = cleaned.substring(0, cleaned.length() - lastName.length()).trim();
|
||||
|
||||
Reference in New Issue
Block a user