Почистить комментарии от ссылок на ТЗ и обрывков
Удаление целых //-блоков со ссылками (Task/Ruling/этап/ТЗ/§/ дизайн-док/api-map/python/прототип) вместо построчного вырезания — без обрывков фраз; снят боилерплейт <param>/<returns>; то же в .proto.
This commit is contained in:
@@ -238,8 +238,6 @@ public static class ContactsQualifier
|
||||
return result.Count > MaxTextCandidates ? result.Take(MaxTextCandidates).ToList() : result;
|
||||
}
|
||||
|
||||
// phone: Телефон как встретился в тексте.
|
||||
// Возвращает: Нормализованный телефон (≤MaxNormalizedPhoneLength символов).
|
||||
internal static string NormalizePhone(string phone)
|
||||
{
|
||||
string normalized = phone.Replace(" ", string.Empty)
|
||||
@@ -252,16 +250,11 @@ public static class ContactsQualifier
|
||||
: normalized;
|
||||
}
|
||||
|
||||
// type: Тип контакта (tg/phone/whatsapp/email/linkedin/site).
|
||||
// Возвращает: Приоритет (меньше — важнее); неизвестный тип — UnknownTypePriority.
|
||||
private static int OrderOf(string type)
|
||||
{
|
||||
return PrimaryOrder.TryGetValue(type, out int order) ? order : UnknownTypePriority;
|
||||
}
|
||||
|
||||
// candidates: Сырые кандидаты.
|
||||
// text: Текст сообщения для извлечения кандидатов, если список пуст.
|
||||
// Возвращает: Квалифицированные контакты без дублей (≤MaxContacts).
|
||||
private static IReadOnlyList<CardContactDto> BuildFromCandidates(List<string> candidates, string? text)
|
||||
{
|
||||
if (candidates.Count == 0)
|
||||
@@ -295,8 +288,6 @@ public static class ContactsQualifier
|
||||
return result;
|
||||
}
|
||||
|
||||
// result: Список-накопитель.
|
||||
// values: Найденные совпадения.
|
||||
private static void AddUnique(List<string> result, IEnumerable<string> values)
|
||||
{
|
||||
foreach (string value in values)
|
||||
|
||||
Reference in New Issue
Block a user