Monyzik commited on
Commit
206c6eb
·
verified ·
1 Parent(s): 23abbae

Add RuSpellGold and move annotation analysis into the text notebook

Browse files
MANIFEST.json CHANGED
@@ -1,63 +1,73 @@
1
  [
2
  {
3
- "path": "reports/text_annotation_2026-11-18/metrics.json",
4
- "sha256": "e2ee438aa54767f3236cfaab6e103193af89817996ca67c9e3de30cbdabe1cb8",
5
- "bytes": 2822
6
  },
7
  {
8
- "path": "reports/text_annotation_2026-11-18/annotation_times.csv",
9
- "sha256": "b4bceda394d15a0b487c7704df4264434eb4a318802d4b0a4ff0fb1abaab5c2b",
10
- "bytes": 3759
11
  },
12
  {
13
- "path": "reports/text_annotation_2026-11-18/requirements_2026-11-18.txt",
14
- "sha256": "843fbb0ae6546242a27f8afe664f96f410789090a90c5fe20cf1a15f713dd858",
15
- "bytes": 838
16
  },
17
  {
18
- "path": "reports/text_annotation_2026-11-18/disagreements.csv",
19
- "sha256": "39cbb445be1e273b0a6c9af9ceb70d817f7ec06264c222706729da00eddcfa2a",
20
- "bytes": 9205
21
  },
22
  {
23
- "path": "reports/text_annotation_2026-11-18/text_habr_adjudicated_audit.jsonl",
24
- "sha256": "d64bb33b16707f4c1b1215966f3cf8af668bb1ebe8d67a8141de4e45bc673126",
25
- "bytes": 46031
26
  },
27
  {
28
- "path": "reports/text_annotation_2026-11-18/report.md",
29
- "sha256": "9bbb894d87873ad64477cc9d3db934604a0208b774ff05e0a57fc26941a254d9",
30
- "bytes": 15167
31
  },
32
  {
33
- "path": "reports/text_annotation_2026-11-18/adjudication_log.jsonl",
34
- "sha256": "ce0f91aef17728701ef512d1f664df2535d2c7dc6511c8c45e57bddcd6a2d7cd",
35
- "bytes": 11945
36
  },
37
  {
38
- "path": "reports/text_annotation_2026-11-18/text_habr_adjudicated.jsonl",
39
- "sha256": "86b1cfeaa75ff433b277486c0428246e1108e9c79ad2b50c5dd47d891e048d20",
40
- "bytes": 19908
41
  },
42
  {
43
- "path": "reports/text_annotation_2026-11-18/partner_reviewed.jsonl",
44
- "sha256": "86b1cfeaa75ff433b277486c0428246e1108e9c79ad2b50c5dd47d891e048d20",
45
- "bytes": 19908
46
  },
47
  {
48
- "path": "reports/text_annotation_2026-11-18/paired_annotations.jsonl",
49
- "sha256": "1f1ac8bacc412c79e1c442f8df1e483335906c2d2f26622369d45d6547ec0097",
50
- "bytes": 66128
51
  },
52
  {
53
- "path": "reports/text_annotation_2026-11-18/assistant_work_log.md",
54
- "sha256": "67bc7aaa7d7cfd1c2af7d09cb4a0606ba26075132d668c2b4a09747dc3297e00",
55
- "bytes": 2166
56
  },
57
  {
58
  "path": "reports/text_annotation_2026-11-18/agreement.png",
59
- "sha256": "4f66a9c49a27e162ceba74fe51a5043e9f8000002973c46a6a60a16480be86e3",
60
- "bytes": 74362
 
 
 
 
 
 
 
 
 
 
61
  },
62
  {
63
  "path": "reports/text_annotation_2026-11-18/codebook_text_snapshot.txt",
@@ -65,9 +75,14 @@
65
  "bytes": 5564
66
  },
67
  {
68
- "path": "reports/text_annotation_2026-11-18/source_manifest.jsonl",
69
- "sha256": "68447bc31071a98dcaf8fa7d9b07b6d89a56f62ef57b45ae0c1f69afae32906b",
70
- "bytes": 17773
 
 
 
 
 
71
  },
72
  {
73
  "path": "reports/text_annotation_2026-11-18/originals/project-1-at-2026-11-18-13-07-d403dfc3.json",
@@ -80,28 +95,53 @@
80
  "bytes": 176457
81
  },
82
  {
83
- "path": "reports/text_annotation_pilot_2026-11-18.md",
84
- "sha256": "d68864481bb558de35fc2851972610a04637b6bc852d372e880045dbbbbdc937",
85
- "bytes": 15194
86
  },
87
  {
88
- "path": "scripts/analyze_text_annotations.py",
89
- "sha256": "d837410594e36a42422ed6e99429d789caa4d93ebe90eab8d74bfe37d5e0ff8c",
90
- "bytes": 18248
91
  },
92
  {
93
- "path": "pyproject.toml",
94
- "sha256": "7cc7f9a74bbc1859bf20b51d010bba1e4606d6e22a80a6c40ebb580bc49a92b9",
95
- "bytes": 505
96
  },
97
  {
98
- "path": "data/manual/texts_100.json",
99
- "sha256": "09f71ce1ac217f27911bdc7cd902271726267ea9f67d7958395883fb99e17a04",
100
- "bytes": 22155
101
  },
102
  {
103
- "path": "data/raw/ruspellgold/test.jsonl",
104
- "sha256": "44416705470e2617e4c6ab2c68866fc75f773a680652b1ff81b8e21642d4e95f",
105
- "bytes": 1169529
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  }
107
  ]
 
1
  [
2
  {
3
+ "path": "README.md",
4
+ "sha256": "69cc1a3ed8c60b990b9230be76442aac2268859e9dab6909fffd9b59ba203f1e",
5
+ "bytes": 2846
6
  },
7
  {
8
+ "path": "data/manual/texts_100.json",
9
+ "sha256": "09f71ce1ac217f27911bdc7cd902271726267ea9f67d7958395883fb99e17a04",
10
+ "bytes": 22155
11
  },
12
  {
13
+ "path": "data/manual_habr/pilot.jsonl",
14
+ "sha256": "86b1cfeaa75ff433b277486c0428246e1108e9c79ad2b50c5dd47d891e048d20",
15
+ "bytes": 19908
16
  },
17
  {
18
+ "path": "data/raw/ruspellgold/test.jsonl",
19
+ "sha256": "44416705470e2617e4c6ab2c68866fc75f773a680652b1ff81b8e21642d4e95f",
20
+ "bytes": 1169529
21
  },
22
  {
23
+ "path": "data/ruspellgold/LICENSE",
24
+ "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30",
25
+ "bytes": 11358
26
  },
27
  {
28
+ "path": "data/ruspellgold/test.jsonl",
29
+ "sha256": "44416705470e2617e4c6ab2c68866fc75f773a680652b1ff81b8e21642d4e95f",
30
+ "bytes": 1169529
31
  },
32
  {
33
+ "path": "notebooks/text.ipynb",
34
+ "sha256": "b199863a17f5552690ec2b08d1df9eeef2619d8289c2ac02b3aaa037da9d4cf8",
35
+ "bytes": 523316
36
  },
37
  {
38
+ "path": "pyproject.toml",
39
+ "sha256": "7cc7f9a74bbc1859bf20b51d010bba1e4606d6e22a80a6c40ebb580bc49a92b9",
40
+ "bytes": 505
41
  },
42
  {
43
+ "path": "reports/text_annotation_2026-11-18/LICENSE-RUSPELLGOLD.txt",
44
+ "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30",
45
+ "bytes": 11358
46
  },
47
  {
48
+ "path": "reports/text_annotation_2026-11-18/RuSpellGold_upstream_README.md",
49
+ "sha256": "71b76db8b21a27ad09665d10cdac40b771e02267bb15d1aafe0948e388c13d56",
50
+ "bytes": 5197
51
  },
52
  {
53
+ "path": "reports/text_annotation_2026-11-18/adjudication_log.jsonl",
54
+ "sha256": "ce0f91aef17728701ef512d1f664df2535d2c7dc6511c8c45e57bddcd6a2d7cd",
55
+ "bytes": 11945
56
  },
57
  {
58
  "path": "reports/text_annotation_2026-11-18/agreement.png",
59
+ "sha256": "8afd5a4e8794d3244206f236c114d15f6970c8996e70f05530388609553cf26f",
60
+ "bytes": 61167
61
+ },
62
+ {
63
+ "path": "reports/text_annotation_2026-11-18/annotation_times.csv",
64
+ "sha256": "b4bceda394d15a0b487c7704df4264434eb4a318802d4b0a4ff0fb1abaab5c2b",
65
+ "bytes": 3759
66
+ },
67
+ {
68
+ "path": "reports/text_annotation_2026-11-18/assistant_work_log.md",
69
+ "sha256": "df4b8f8ce5ac439749a5f6bd26a06e7506fd7992ea5ba724dae1fdd4e9968741",
70
+ "bytes": 2691
71
  },
72
  {
73
  "path": "reports/text_annotation_2026-11-18/codebook_text_snapshot.txt",
 
75
  "bytes": 5564
76
  },
77
  {
78
+ "path": "reports/text_annotation_2026-11-18/disagreements.csv",
79
+ "sha256": "39cbb445be1e273b0a6c9af9ceb70d817f7ec06264c222706729da00eddcfa2a",
80
+ "bytes": 9205
81
+ },
82
+ {
83
+ "path": "reports/text_annotation_2026-11-18/metrics.json",
84
+ "sha256": "e2ee438aa54767f3236cfaab6e103193af89817996ca67c9e3de30cbdabe1cb8",
85
+ "bytes": 2822
86
  },
87
  {
88
  "path": "reports/text_annotation_2026-11-18/originals/project-1-at-2026-11-18-13-07-d403dfc3.json",
 
95
  "bytes": 176457
96
  },
97
  {
98
+ "path": "reports/text_annotation_2026-11-18/paired_annotations.jsonl",
99
+ "sha256": "1f1ac8bacc412c79e1c442f8df1e483335906c2d2f26622369d45d6547ec0097",
100
+ "bytes": 66128
101
  },
102
  {
103
+ "path": "reports/text_annotation_2026-11-18/partner_reviewed.jsonl",
104
+ "sha256": "86b1cfeaa75ff433b277486c0428246e1108e9c79ad2b50c5dd47d891e048d20",
105
+ "bytes": 19908
106
  },
107
  {
108
+ "path": "reports/text_annotation_2026-11-18/report.md",
109
+ "sha256": "109593daaf8a944f514ad8ca7fb990cf5521bfc259912b12299e3b3e0e6d41ad",
110
+ "bytes": 16015
111
  },
112
  {
113
+ "path": "reports/text_annotation_2026-11-18/requirements_2026-11-18.txt",
114
+ "sha256": "843fbb0ae6546242a27f8afe664f96f410789090a90c5fe20cf1a15f713dd858",
115
+ "bytes": 838
116
  },
117
  {
118
+ "path": "reports/text_annotation_2026-11-18/source_manifest.jsonl",
119
+ "sha256": "68447bc31071a98dcaf8fa7d9b07b6d89a56f62ef57b45ae0c1f69afae32906b",
120
+ "bytes": 17773
121
+ },
122
+ {
123
+ "path": "reports/text_annotation_2026-11-18/text_habr_adjudicated.jsonl",
124
+ "sha256": "86b1cfeaa75ff433b277486c0428246e1108e9c79ad2b50c5dd47d891e048d20",
125
+ "bytes": 19908
126
+ },
127
+ {
128
+ "path": "reports/text_annotation_2026-11-18/text_habr_adjudicated_audit.jsonl",
129
+ "sha256": "d64bb33b16707f4c1b1215966f3cf8af668bb1ebe8d67a8141de4e45bc673126",
130
+ "bytes": 46031
131
+ },
132
+ {
133
+ "path": "reports/text_annotation_pilot_2026-11-18.md",
134
+ "sha256": "790a96a13db68d8a3540a3a90326d558b36abb4532c9f77b4c3ff3849a135dce",
135
+ "bytes": 16039
136
+ },
137
+ {
138
+ "path": "scripts/download_data.py",
139
+ "sha256": "54108f0280b51e25fb9f91796fddc7843c389763f9ac7e7279b641969f88c3a6",
140
+ "bytes": 5398
141
+ },
142
+ {
143
+ "path": "scripts/install_dependencies.py",
144
+ "sha256": "376ca2077b2d45b86e7bff6f20aa59816734b6f3eabb4a21741d14c99536faf5",
145
+ "bytes": 1884
146
  }
147
  ]
README.md CHANGED
@@ -2,49 +2,42 @@
2
  language:
3
  - ru
4
  task_categories:
5
- - text2text-generation
6
  tags:
7
- - manual-annotation
8
  - spelling-correction
9
  - inter-annotator-agreement
10
  pretty_name: Framework coursework — text annotation pilot
11
- viewer: false
 
 
 
 
 
 
 
 
 
12
  ---
13
 
14
- # Пилотная разметка текста — 18 ноября 2026
15
 
16
- 100 общих фрагментов комментариев Habr, два экспорта Label Studio.
17
 
18
- | Показатель до проверки | Значение |
19
- | --- | ---: |
20
- | Полное совпадение исправленных строк | 87/100 (87%) |
21
- | Согласие по решению «изменить / оставить» | 97/100 (97%) |
22
- | Каппа Коэна по этому бинарному решению | 0,94 |
23
 
24
- [Полный отчёт](reports/text_annotation_pilot_2026-11-18.md).
25
- [Итоговый JSONL](reports/text_annotation_2026-11-18/text_habr_adjudicated.jsonl).
26
- [Архив для сдачи](text_annotation_submission_2026-11-18.zip).
27
- [13 решений с причинами](reports/text_annotation_2026-11-18/disagreements.csv).
28
- [Метрики и SHA-256 исходных экспортов](reports/text_annotation_2026-11-18/metrics.json).
29
 
30
- ## Статус проверки
31
 
32
- Решения по 13 расхождениям приняты ассистентом по codebook; подтверждение обоими
33
- участниками не зафиксировано. Результаты после проверки не являются новой
34
- независимой оценкой согласия. Исходные экспорты сохранены без изменений.
35
- В итоговом файле 53 текста с правками и 47 без. Поля: source, correction, domain.
36
 
37
- Пилот относится к тексту и не подтверждает двойную разметку фотографий.
38
- Время каждого ответа сохранено в annotation_times.csv; таймер Label Studio
39
- не приравнивается к полному рабочему времени.
40
 
41
- ## Источники и правила
42
-
43
- [Codebook](https://docs.google.com/document/d/1lx5aaPe3wv-ph6kmOpC8_nrCsd7wjaRdiBpKLUwXsyA/edit).
44
- [Журнал работ](https://docs.google.com/document/d/1MqQmVzAlP1RBq_9OzvRcGvET33et39hWyRC0Y6VFUC8/edit).
45
- Ссылки на каждый исходный комментарий и дата сбора сохранены в source_manifest.jsonl.
46
- RuSpellGold включён как исходный набор для проверки пересечений, а не как ручная разметка команды.
47
- Новых лицензионных прав на исходные тексты этот репозиторий не устанавливает.
48
-
49
- Репозиторий закрытый. Для передачи преподавателю нужен отдельный доступ.
50
- Скрипт воспроизведения и протокол участия ассистента находятся в пакете.
 
2
  language:
3
  - ru
4
  task_categories:
5
+ - text-generation
6
  tags:
 
7
  - spelling-correction
8
  - inter-annotator-agreement
9
  pretty_name: Framework coursework — text annotation pilot
10
+ configs:
11
+ - config_name: ruspellgold
12
+ default: true
13
+ data_files:
14
+ - split: test
15
+ path: data/ruspellgold/test.jsonl
16
+ - config_name: manual_habr
17
+ data_files:
18
+ - split: pilot
19
+ path: data/manual_habr/pilot.jsonl
20
  ---
21
 
22
+ # RuSpellGold и пилотная разметка текста
23
 
24
+ Материалы курсовой за 18 ноября 2026 года. В файлах данных три поля: `source`, `correction` и `domain`.
25
 
26
+ | Набор | Записей | Разбиение |
27
+ | --- | ---: | --- |
28
+ | [RuSpellGold](data/ruspellgold/test.jsonl) | 1711 | `test` |
29
+ | [Ручное дополнение Habr](data/manual_habr/pilot.jsonl) | 100 | `pilot` |
 
30
 
31
+ Основной набор взят из [RussianNLP/RuSpellGold, ревизия 8b6694e](https://huggingface.co/datasets/RussianNLP/RuSpellGold/tree/8b6694e45ac9222bc705ee4af9d6367ac083ff5c). Пары сохранены в UTF-8 JSONL с исходным разбиением. [Лицензия Apache 2.0](data/ruspellgold/LICENSE) относится к RuSpellGold. Источники ручного дополнения указаны в [реестре фрагментов](reports/text_annotation_2026-11-18/source_manifest.jsonl).
 
 
 
 
32
 
33
+ ## Согласованность разметки
34
 
35
+ Полные исправленные тексты совпали в **87 из 100** фрагментов. Согласие по решению «исправить / оставить» составило **97%**, каппа Коэна по этому решению — **0,94**. В итоговой версии 53 текста с правками и 47 без. По 13 расхождениям приведены решения ассистента по codebook. Подтверждение обоими участниками пока не зафиксировано.
 
 
 
36
 
37
+ Весь анализ, включая расчёт метрик и экспорт результатов, выполнен после EDA в [текстовом ноутбуке](notebooks/text.ipynb). Для повторного запуска скачайте архив, установите зависимости из `pyproject.toml` и выполните ячейки по порядку.
 
 
38
 
39
+ - [Архив для сдачи](text_annotation_submission_2026-11-18.zip)
40
+ - [Отчёт о пилоте](reports/text_annotation_pilot_2026-11-18.md)
41
+ - [Разбор расхождений](reports/text_annotation_2026-11-18/disagreements.csv)
42
+ - [Исходные экспорты Label Studio](reports/text_annotation_2026-11-18/originals)
43
+ - [Codebook](https://docs.google.com/document/d/1lx5aaPe3wv-ph6kmOpC8_nrCsd7wjaRdiBpKLUwXsyA/edit)
 
 
 
 
 
data/manual_habr/pilot.jsonl ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"source": "Далее экспансия заканчивается - потребность праткически удовлетворена,", "correction": "Далее экспансия заканчивается - потребность практически удовлетворена,", "domain": "habr"}
2
+ {"source": "В статье речь идет про инжнеров, программистские спецаильности необязательно должны быть инженерными.", "correction": "В статье речь идёт про инженеров, программистские специальности необязательно должны быть инженерными.", "domain": "habr"}
3
+ {"source": "У меня обычно верстка сразу проходит валидацию.", "correction": "У меня обычно вёрстка сразу проходит валидацию.", "domain": "habr"}
4
+ {"source": "А это можно как-то сделать?", "correction": "А это можно как-то сделать?", "domain": "habr"}
5
+ {"source": "(опять же это прсото пример),", "correction": "(опять же это просто пример),", "domain": "habr"}
6
+ {"source": "например - не повзоляет", "correction": "например - не позволяет", "domain": "habr"}
7
+ {"source": "Но не все разработчики, справделивости ради.", "correction": "Но не все разработчики, справедливости ради.", "domain": "habr"}
8
+ {"source": "Что мы для этого делаем?", "correction": "Что мы для этого делаем?", "domain": "habr"}
9
+ {"source": "ни гипотезы о ксомосе", "correction": "ни гипотезы о космосе", "domain": "habr"}
10
+ {"source": "Комментарии, которые «неугодны сообщетсву» я не пишу.", "correction": "Комментарии, которые «неугодны сообществу» я не пишу.", "domain": "habr"}
11
+ {"source": "Мне кажется, всё будет хорошо.", "correction": "Мне кажется, всё будет хорошо.", "domain": "habr"}
12
+ {"source": "была возмоность ставить только плюсы,", "correction": "была возможность ставить только плюсы,", "domain": "habr"}
13
+ {"source": "Статья была написана по наитию.", "correction": "Статья была написана по наитию.", "domain": "habr"}
14
+ {"source": "не разбираясь в сути вопорса.", "correction": "не разбираясь в сути вопроса.", "domain": "habr"}
15
+ {"source": "пока работал сис. амдином и монтажником сетей,", "correction": "пока работал сис. админом и монтажником сетей,", "domain": "habr"}
16
+ {"source": "Ну это же не значти", "correction": "Ну это же не значит", "domain": "habr"}
17
+ {"source": "Это очень позитивное явление.", "correction": "Это очень позитивное явление.", "domain": "habr"}
18
+ {"source": "даже арнее работающий delta chat - увы не работает .", "correction": "даже ранее работающий delta chat - увы не работает .", "domain": "habr"}
19
+ {"source": "Иначе зачем мне себя с ним сравнивать?", "correction": "Иначе зачем мне себя с ним сравнивать?", "domain": "habr"}
20
+ {"source": "для вас это как читать тектс на втором родном языке.", "correction": "для вас это как читать текст на втором родном языке.", "domain": "habr"}
21
+ {"source": "Не просто много, а очень много.", "correction": "Не просто много, а очень много.", "domain": "habr"}
22
+ {"source": "кто ничего не даелает", "correction": "кто ничего не делает", "domain": "habr"}
23
+ {"source": "Как-то надуманно про последний пункт.", "correction": "Как-то надуманно про последний пункт.", "domain": "habr"}
24
+ {"source": "Своего рода второй шанс, как уже и было сказано.", "correction": "Своего рода второй шанс, как уже и было сказано.", "domain": "habr"}
25
+ {"source": "Это решеамая проблема", "correction": "Это решаемая проблема", "domain": "habr"}
26
+ {"source": "Программисты стали хуже, инструменты стали лучше.", "correction": "Программисты стали хуже, инструменты стали лучше.", "domain": "habr"}
27
+ {"source": "Это факты, наблюдаемые и вычисляемые.", "correction": "Это факты, наблюдаемые и вычисляемые.", "domain": "habr"}
28
+ {"source": "которые его получили обсепечить свое будущее", "correction": "которые его получили обеспечить своё будущее", "domain": "habr"}
29
+ {"source": "И сервер в этой схеме воощбе никак не требуется", "correction": "И сервер в этой схеме вообще никак не требуется", "domain": "habr"}
30
+ {"source": "Ну да, поэтому кто-то назвал их одним словом.", "correction": "Ну да, поэтому кто-то назвал их одним словом.", "domain": "habr"}
31
+ {"source": "Плюс это работа ежедневная, коотрая подвешивала тебя на 12 часов, в лучшем случае.", "correction": "Плюс это работа ежедневная, которая подвешивала тебя на 12 часов, в лучшем случае.", "domain": "habr"}
32
+ {"source": "А сейас получается плюсовать нельзя, а минусаторы никуда не делись.", "correction": "А сейчас получается плюсовать нельзя, а минусаторы никуда не делись.", "domain": "habr"}
33
+ {"source": "После первой же рассклыки большинтво снимает галочку.", "correction": "После первой же рассылки большинство снимает галочку.", "domain": "habr"}
34
+ {"source": "Давайте предопложим, что история развивалась иначе,", "correction": "Давайте предположим, что история развивалась иначе,", "domain": "habr"}
35
+ {"source": "лишняя работа, коотрую еще и никто не оценит.", "correction": "лишняя работа, которую ещё и никто не оценит.", "domain": "habr"}
36
+ {"source": "надо увидеть докзаательства того,", "correction": "надо увидеть доказательства того,", "domain": "habr"}
37
+ {"source": "Я давно искал такое приложение, как ваше.", "correction": "Я давно искал такое приложение, как ваше.", "domain": "habr"}
38
+ {"source": "Ещё прогонзы, которые сбудутся :)", "correction": "Ещё прогнозы, которые сбудутся :)", "domain": "habr"}
39
+ {"source": "Такие зарплаты вполне есть.", "correction": "Такие зарплаты вполне есть.", "domain": "habr"}
40
+ {"source": "Хотелось бы увидеть статистику мнений.", "correction": "Хотелось бы увидеть статистику мнений.", "domain": "habr"}
41
+ {"source": "Только не говорите, что у вас оно работает.", "correction": "Только не говорите, что у вас оно работает.", "domain": "habr"}
42
+ {"source": "Как ты поступаешь в таком случае?", "correction": "Как ты поступаешь в таком случае?", "domain": "habr"}
43
+ {"source": "В жертву пришлось принести немного привычного удобства.", "correction": "В жертву пришлось принести немного привычного удобства.", "domain": "habr"}
44
+ {"source": "купленному за ваши деьнги софту созданному товарищами", "correction": "купленному за ваши деньги софту созданному товарищами", "domain": "habr"}
45
+ {"source": "что зашифроавно в QR?", "correction": "что зашифровано в QR?", "domain": "habr"}
46
+ {"source": "Работодатель со временем с удвилением обнаружит,", "correction": "Работодатель со временем с удивлением обнаружит,", "domain": "habr"}
47
+ {"source": "Но тут начниается веселье.", "correction": "Но тут начинается веселье.", "domain": "habr"}
48
+ {"source": "и долнжно быть вполне прилично,", "correction": "и должно быть вполне прилично,", "domain": "habr"}
49
+ {"source": "как это сегодян в Фейсбуке,", "correction": "как это сегодня в Фейсбуке,", "domain": "habr"}
50
+ {"source": "Работет как часы…", "correction": "Работает как часы…", "domain": "habr"}
51
+ {"source": "А делать гидрацию только видимой обласит наверно сложно.", "correction": "А делать гидрацию только видимой области наверно сложно.", "domain": "habr"}
52
+ {"source": "��аньше было несколько популряным расширение", "correction": "Раньше было несколько популярным расширение", "domain": "habr"}
53
+ {"source": "Но факт остается фактом.", "correction": "Но факт остаётся фактом.", "domain": "habr"}
54
+ {"source": "Нужно как можно быстрее восполнить этот пробел.", "correction": "Нужно как можно быстрее восполнить этот пробел.", "domain": "habr"}
55
+ {"source": "Спасибо за информативную статью.", "correction": "Спасибо за информативную статью.", "domain": "habr"}
56
+ {"source": "навреняка знаете отлично же,", "correction": "наверняка знаете отлично же,", "domain": "habr"}
57
+ {"source": "Но само по себе задание неплохое.", "correction": "Но само по себе задание неплохое.", "domain": "habr"}
58
+ {"source": "А это зависит от проекта.", "correction": "А это зависит от проекта.", "domain": "habr"}
59
+ {"source": "создал собственную структуру и пониманеи функционирования такой системы.", "correction": "создал собственную структуру и понимание функционирования такой системы.", "domain": "habr"}
60
+ {"source": "А где брать данные?", "correction": "А где брать данные?", "domain": "habr"}
61
+ {"source": "никаких команд от КПК не приходит соавсем.", "correction": "никаких команд от КПК не приходит совсем.", "domain": "habr"}
62
+ {"source": "После этого у него есть два варианта.", "correction": "После этого у него есть два варианта.", "domain": "habr"}
63
+ {"source": "уже плотно работет со списками", "correction": "уже плотно работает со списками", "domain": "habr"}
64
+ {"source": "Меня уже не удивить.", "correction": "Меня уже не удивить.", "domain": "habr"}
65
+ {"source": "Раньше было акутально, да.", "correction": "Раньше было актуально, да.", "domain": "habr"}
66
+ {"source": "Я согласен с мыслью в статье.", "correction": "Я согласен с мыслью в статье.", "domain": "habr"}
67
+ {"source": "Может быть только две половины жизни.", "correction": "Может быть только две половины жизни.", "domain": "habr"}
68
+ {"source": "По крайней мере, хочется в это верить.", "correction": "По крайней мере, хочется в это верить.", "domain": "habr"}
69
+ {"source": "Невалидный XML не работет.", "correction": "Невалидный XML не работает.", "domain": "habr"}
70
+ {"source": "Не думаю, что на данном этапе подобное предусмотрено.", "correction": "Не думаю, что на данном этапе подобное предусмотрено.", "domain": "habr"}
71
+ {"source": "Всему есть своё место.", "correction": "Всему есть своё место.", "domain": "habr"}
72
+ {"source": "То есть такие куски алгоритма дожны быть защищены критической секцией.", "correction": "То есть такие куски алгоритма должны быть защищены критической секцией.", "domain": "habr"}
73
+ {"source": "Интересено, кто и по какой причине принял такое решение?", "correction": "Интересно, кто и по какой причине принял такое решение?", "domain": "habr"}
74
+ {"source": "Автор, какой у вас самого опыт работы программистом?", "correction": "Автор, какой у вас самого опыт работы программистом?", "domain": "habr"}
75
+ {"source": "На этом реплику стоило обрезать.", "correction": "На этом реплику стоило обрезать.", "domain": "habr"}
76
+ {"source": "Да, например очень странно устроена компаняи Хуавей, т.е.", "correction": "Да, например очень странно устроена компания Хуавей, т.е.", "domain": "habr"}
77
+ {"source": "Крутая штука, но будет ли полезна в обиходе?", "correction": "Крутая штука, но будет ли полезна в обиходе?", "domain": "habr"}
78
+ {"source": "Это отличная фраза, буду использовать.", "correction": "Это отличная фраза, ��уду использовать.", "domain": "habr"}
79
+ {"source": "А есть принципиально нерешаемые пробелмы Qt и GTK (если выбрать не тот менеджер).", "correction": "А есть принципиально нерешаемые проблемы Qt и GTK (если выбрать не тот менеджер).", "domain": "habr"}
80
+ {"source": "И нам нужны люди котороые дело делают,", "correction": "И нам нужны люди которые дело делают,", "domain": "habr"}
81
+ {"source": "В паровозах нет никаких декоративных деталей.", "correction": "В паровозах нет никаких декоративных деталей.", "domain": "habr"}
82
+ {"source": "Но и качесвто слуги - тоже.", "correction": "Но и качество слуги - тоже.", "domain": "habr"}
83
+ {"source": "но телегой скорость дивжения будет 5-10км/час - плюс минус столько же сколько пехом.", "correction": "но телегой скорость движения будет 5-10км/час - плюс-минус столько же сколько пехом.", "domain": "habr"}
84
+ {"source": "А разве она не должна быть заклеена синей изолентой?", "correction": "А разве она не должна быть заклеена синей изолентой?", "domain": "habr"}
85
+ {"source": "Вы с этим сами прекрасно справились.", "correction": "Вы с этим сами прекрасно справились.", "domain": "habr"}
86
+ {"source": "Вы хоть прочитали-то статью?", "correction": "Вы хоть прочитали-то статью?", "domain": "habr"}
87
+ {"source": "У меня свои методы работы с молодежью.", "correction": "У меня свои методы работы с молодёжью.", "domain": "habr"}
88
+ {"source": "Ключ можно передать один раз.", "correction": "Ключ можно передать один раз.", "domain": "habr"}
89
+ {"source": "создавать Read&Comment аккуанты за деньги?", "correction": "создавать Read&Comment аккаунты за деньги?", "domain": "habr"}
90
+ {"source": "Для прогнозов по макроэкономике есть специальные люди.", "correction": "Для прогнозов по макроэкономике есть специальные люди.", "domain": "habr"}
91
+ {"source": "Речь про поиск по данным?", "correction": "Речь про поиск по данным?", "domain": "habr"}
92
+ {"source": "Или попробуйте кому-нибудь позвонить.", "correction": "Или попробуйте кому-нибудь позвонить.", "domain": "habr"}
93
+ {"source": "это неплохой апргейд Rubber Duck debugging.", "correction": "это неплохой апгрейд Rubber Duck debugging.", "domain": "habr"}
94
+ {"source": "Какой завод имеется в виду?", "correction": "Какой завод имеется в виду?", "domain": "habr"}
95
+ {"source": "в которой живет большнство людей?", "correction": "в которой живёт большинство людей?", "domain": "habr"}
96
+ {"source": "Ссылку продублируем в конце поста.", "correction": "Ссылку продублируем в конце поста.", "domain": "habr"}
97
+ {"source": "С точки зрения брутфорса парольные фразы надёжнее.", "correction": "С точки зрения брутфорса парольные фразы надёжнее.", "domain": "habr"}
98
+ {"source": "Слишком сильно упали на тёмную сторону, получается?", "correction": "Слишком сильно упали на тёмную сторону, получается?", "domain": "habr"}
99
+ {"source": "А кто будет кормить,лечить и ухкаживать за вами в сатрости?", "correction": "А кто будет кормить,лечить и ухаживать за вами в старости?", "domain": "habr"}
100
+ {"source": "К сожалению, именно к этому не имею никакого отношения.", "correction": "К сожалению, именно к этому не имею никакого отношения.", "domain": "habr"}
data/ruspellgold/LICENSE ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
data/ruspellgold/test.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
notebooks/text.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
reports/text_annotation_2026-11-18/LICENSE-RUSPELLGOLD.txt ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
reports/text_annotation_2026-11-18/RuSpellGold_upstream_README.md ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ task_categories:
4
+ - text-generation
5
+ language:
6
+ - ru
7
+ size_categories:
8
+ - 1K<n<10K
9
+ ---
10
+
11
+ # Dataset Card for RuSpellGold
12
+
13
+ ## Dataset Description
14
+
15
+ - **Paper:** # TODO
16
+ - **ArXiv:** # TODO
17
+ - **Point of Contact:** nikita.martynov.98@list.ru
18
+ - **Language:** Russian
19
+
20
+ ### Dataset Summary
21
+
22
+ RuSpellGold is a benchmark of 1711 sentence pairs dedicated to a problem of automatic spelling correction in Russian language. The dataset is gathered from five different domains including news, Russian classic literature, social media texts, open web and strategic documents. It has been passed through two-stage manual labeling process with native speakers as annotators to correct spelling violation and preserve original style of text at the same time.
23
+
24
+ ## Dataset Structure
25
+
26
+ ### Supported Tasks and Leaderboards
27
+ - **Task:** automatic spelling correction.
28
+ - **Metrics:** https://www.dialog-21.ru/media/3427/sorokinaaetal.pdf.
29
+
30
+
31
+ ### Languages
32
+ Russian.
33
+
34
+ ### Data Instances
35
+ ```
36
+ {
37
+ "sources": "Видела в городе афиши, анонсрующие ее концерт.",
38
+ "corrections": "Видела в городе афиши, анонсирующие её концерт",
39
+ "domain": "aranea"
40
+ }
41
+ ```
42
+
43
+
44
+ ### Data Fields
45
+
46
+ - ```sources (str)```: original sentence.
47
+ - ```corrections (str)```: corrected sentence.
48
+ - ```domain (str)```: domain, from which the sentence is taken from.
49
+
50
+ ### Data Splits
51
+
52
+ Current version of benchmark is only represented by test part:
53
+
54
+ - ```test```: 1711 sentence pairs (```"data/test.csv"```).
55
+
56
+ which is then splitted into following domain-relaited shards:
57
+
58
+ - ```aranea```: 756 sentence pairs (```"data/aranea/split.csv"```);
59
+ - ```literature```: 260 sentence pairs (```"data/literature/split.csv"```);
60
+ - ```news```: 245 sentence pairs (```"data/news/split.csv"```);
61
+ - ```social_media```: 200 sentence pairs (```"data/social_media/split.csv"```);
62
+ - ```strategic_documents```: 250 sentence pairs (```"data/strategic_documents/split.csv"```);
63
+
64
+
65
+
66
+ ## Dataset Creation
67
+
68
+ ### Source Data
69
+
70
+ |Source |Strategy |Domain |
71
+ |---|---|---|
72
+ |Vladimír Benko. 2014. Aranea: Yet another family of (comparable) web corpora. // Text, Speech and Dialogue: 17th International Conference, TSD 2014, Brno, Czech Republic, September 8-12, 2014. Proceedings 17, P 247–256. Springer| Random sentences from Araneum Russicum|Open web (aranea) |
73
+ | Russian classic literature aggregated in this [corpus](https://www.kaggle.com/datasets/d0rj3228/russian-literature) | Random sentences | Literature |
74
+ |Ilya Gusev. 2020. Dataset for automatic summarization of russian news. // Artificial Intelligence and Natural Language: 9th Conference, AINL 2020, Helsinki, Finland, October 7–9, 2020, Proceedings 9, P 122–134. Springer | Random sentences | News |
75
+ |Social media platforms | Posts from social media platforms marked with specific hashtags | Social Media |
76
+ |Vitaly Ivanin, Ekaterina Artemova, Tatiana Batura, Vladimir Ivanov, Veronika Sarkisyan, Elena Tutubalina, and Ivan Smurov. 2020. Rurebus-2020 shared task: Russian relation extraction for business. // Computational Linguistics and Intellectual Technologies: Proceedings of the International Conference “Dialog” [Komp’iuternaia Lingvistika i Intellektual’nye Tehnologii: Trudy Mezhdunarodnoj Konferentsii “Dialog”], Moscow, Russia. | Random sentences | Strategic documents |
77
+
78
+
79
+ ### Annotations
80
+
81
+ #### Annotation process
82
+ All of the sentences undergo a two-stage annotation procedure on [Toloka](https://toloka.ai), a crowd-sourcing platform for data labeling.
83
+
84
+ Each stage includes an unpaid training phase with explanations, control tasks for tracking annotation quality, and the main annotation task. Before starting, a worker is given detailed instructions describing the task, explaining the labels, and showing plenty of examples.
85
+ The instruction is available at any time during both the training and main annotation phases. To get access to the main phase, the worker should first complete the training phase by labeling more than 70% of its examples correctly. To ensure high-quality expertise on the matter of spelling, we set up additional test phase on a small portion of data, manually revised the results and approved only those annotators, who managed to avoid any mistakes.
86
+
87
+ - **Stage 1: Data gathering**
88
+ We provide texts with possible mistakes to annotators and ask them to write the sentence correctly preserving the original style-markers of the text.
89
+
90
+ - **Stage 2: Validation**
91
+ We provide annotators with the pair of sentences (origin and its corresponding correction from the previous stage) and ask them to check if the correction is right.
92
+
93
+
94
+ ### Personal and Sensitive Information
95
+
96
+ Each annotator is warned about potentially sensitive topics in data (e.g., politics, societal minorities, and religion).
97
+
98
+
99
+ ## Additional Information
100
+
101
+ ### Dataset Curators
102
+
103
+ Correspondence: ```nikita.martynov.98@list.ru```
104
+
105
+ ### Licensing Information
106
+
107
+ The corpus is available under the Apache 2.0 license. The copyright (where applicable) of texts from the linguistic publications and resources remains with the original authors or publishers.
108
+
109
+
110
+ ### Other
111
+
112
+ Please refer to our paper # TODO for more details.
reports/text_annotation_2026-11-18/agreement.png CHANGED

Git LFS Details

  • SHA256: 4f66a9c49a27e162ceba74fe51a5043e9f8000002973c46a6a60a16480be86e3
  • Pointer size: 130 Bytes
  • Size of remote file: 74.4 kB

Git LFS Details

  • SHA256: 8afd5a4e8794d3244206f236c114d15f6970c8996e70f05530388609553cf26f
  • Pointer size: 130 Bytes
  • Size of remote file: 61.2 kB
reports/text_annotation_2026-11-18/assistant_work_log.md CHANGED
@@ -2,9 +2,11 @@
2
 
3
  Запрос пользователя: проанализировать два экспорта разметки, посчитать согласованность и подготовить материалы к сдаче; файл *85c51fb4.json принадлежит другому участнику, его разрешено немного исправить. Уточнение пользователя: требования найти в чатах проекта.
4
 
5
- Сделано: прочитаны два исходных JSON, первичное сообщение о требованиях, ТЗ, codebook и журнал. Сопоставлены 100 fragment_id; исходники совпадают. До исправлений вычислены exact agreement 87/100 и бинарная κ=0,94. Все 100 пар просмотрены, 13 расхождений разобраны по текущему codebook. В отдельную копию второго разметчика внесены 13 решений; исходные экспорты и ответы пользователя не изменены. Подготовлен JSONL с 100 парами, таблица времени и скрипт воспроизведения. В codebook добавлена процедура сравнения.
6
 
7
  Роль ассистента: вычисления, разбор расхождений и подготовка материалов. Это не третья независимая разметка и не доказательство согласования двумя людьми. Из истории проекта известно, что до этих экспортов ответы пользователя уже проверялись ассистентом. Метрики относятся к представленным версиям.
8
 
9
- Расчётный алгоритм и все решения сохранены в scripts/analyze_text_annotations.py и adjudication_log.jsonl; контрольные суммы экспортов — в metrics.json.
10
 
 
 
 
2
 
3
  Запрос пользователя: проанализировать два экспорта разметки, посчитать согласованность и подготовить материалы к сдаче; файл *85c51fb4.json принадлежит другому участнику, его разрешено немного исправить. Уточнение пользователя: требования найти в чатах проекта.
4
 
5
+ Сделано: прочитаны два исходных JSON, первичное сообщение о требованиях, ТЗ, codebook и журнал. Сопоставлены 100 fragment_id; исходники совпадают. До исправлений вычислены exact agreement 87/100 и бинарная κ=0,94. Все 100 пар просмотрены, 13 расхождений разобраны по текущему codebook. В отдельную копию второго разметчика внесены 13 решений; исходные экспорты и ответы пользователя не изменены. Подготовлен JSONL с 100 парами, таблица времени и расчёт в notebooks/text.ipynb. В codebook добавлена процедура сравнения.
6
 
7
  Роль ассистента: вычисления, разбор расхождений и подготовка материалов. Это не третья независимая разметка и не доказательство согласования двумя людьми. Из истории проекта известно, что до этих экспортов ответы пользователя уже проверялись ассистентом. Метрики относятся к представленным версиям.
8
 
9
+ Расчётный алгоритм и все решения сохранены в notebooks/text.ipynb и adjudication_log.jsonl; контрольные суммы экспортов — в metrics.json.
10
 
11
+
12
+ По уточнению пользователя весь анализ перенесён в существующий notebooks/text.ipynb после EDA. Ноутбук выполнен целиком через Jupyter: 25 кодовых ячеек, ошибок нет. Отдельный аналитический скрипт удалён. Пользователь явно указал опубликовать репозиторий на Hugging Face с открытым доступом и добавить основной RuSpellGold.
reports/text_annotation_2026-11-18/report.md CHANGED
@@ -1,5 +1,7 @@
1
  # Пилотная разметка текста — 18 ноября 2026
2
 
 
 
3
  В двух исходных выгрузках Label Studio размечены одни и те же **100 фрагментов**. Полные ответы совпадают в **87 случаях (87%)**. По решению «изменить исходник / оставить без изменений» совпадают **97 решений из 100**, **κ Коэна = 0,94**. Каппа характеризует решение об исправлении, а не совпадение всех исправленных символов.
4
 
5
  Разобраны все 13 расхождений. Подготовлены исправленная копия второго разметчика и итоговый JSONL: 53 изменённых и 47 неизменённых текстов. Решения по расхождениям приняты ассистентом по codebook; совместное подтверждение участников не зафиксировано. Исходные файлы сохранены отдельно. Результаты после этой проверки не используются как оценка независимого согласия.
@@ -110,16 +112,14 @@
110
 
111
  Локальная папка `reports/text_annotation_2026-11-18/` содержит неизменённые исходные экспорты с SHA-256, сопоставление всех 100 пар, 13 решений с полными строками и причинами, отдельную исправленную копию `*fb4`, итоговый JSONL, происхождение каждого фрагмента и время каждого ответа. Папка исключена из Git как локальные данные. Ссылки на комментарии восстановлены из `data/manual/texts_100.json`; тексты не собирались заново.
112
 
113
- Для повторного расчёта:
114
 
115
  ```bash
116
- .venv/bin/python scripts/analyze_text_annotations.py \
117
- --user reports/text_annotation_2026-11-18/originals/project-1-at-2026-11-18-13-07-d403dfc3.json \
118
- --other reports/text_annotation_2026-11-18/originals/project-2-at-2026-11-17-10-54-85c51fb4.json
119
  ```
120
 
121
- Скрипт требует локальные файлы `data/manual/texts_100.json`, `data/raw/ruspellgold/test.jsonl` и matplotlib из зависимостей проекта. Метрики вычисляются из исходных экспортов до применения решений. При изменении состава расхождений скрипт останавливается и требует повторного разбора.
122
 
123
  Готовый текстовый пакет можно приложить к сдаче вместе с этим отчётом и codebook. 13 выбранных решений нужно показать второму участнику; до подтверждения не обозначать их как совместно согласованные. Для всего этапа отдельно требуется подтвердить пилот сегментации на минимум 50 общих фото двумя разметчиками.
124
 
125
- Материалы размещаются в закрытом репозитории [Monyzik/framework-coursework-text](https://huggingface.co/datasets/Monyzik/framework-coursework-text). Доступ к исходным экспортам не расширяется автоматически; для преподавателя его нужно предоставить отдельно.
 
1
  # Пилотная разметка текста — 18 ноября 2026
2
 
3
+ Основной анализ, вычисления и разбор расхождений находятся в [существующем текстовом ноутбуке](../../notebooks/text.ipynb), после EDA. Этот документ — сводка его результатов.
4
+
5
  В двух исходных выгрузках Label Studio размечены одни и те же **100 фрагментов**. Полные ответы совпадают в **87 случаях (87%)**. По решению «изменить исходник / оставить без изменений» совпадают **97 решений из 100**, **κ Коэна = 0,94**. Каппа характеризует решение об исправлении, а не совпадение всех исправленных символов.
6
 
7
  Разобраны все 13 расхождений. Подготовлены исправленная копия второго разметчика и итоговый JSONL: 53 изменённых и 47 неизменённых текстов. Решения по расхождениям приняты ассистентом по codebook; совместное подтверждение участников не зафиксировано. Исходные файлы сохранены отдельно. Результаты после этой проверки не используются как оценка независимого согласия.
 
112
 
113
  Локальная папка `reports/text_annotation_2026-11-18/` содержит неизменённые исходные экспорты с SHA-256, сопоставление всех 100 пар, 13 решений с полными строками и причинами, отдельную исправленную копию `*fb4`, итоговый JSONL, происхождение каждого фрагмента и время каждого ответа. Папка исключена из Git как локальные данные. Ссылки на комментарии восстановлены из `data/manual/texts_100.json`; тексты не собирались заново.
114
 
115
+ Для повторного расчёта откройте `notebooks/text.ipynb` и выполните все ячейки по порядку. При установленном `nbconvert` эквивалентная команда:
116
 
117
  ```bash
118
+ .venv/bin/python -m jupyter nbconvert --execute --to notebook --inplace notebooks/text.ipynb
 
 
119
  ```
120
 
121
+ Ноутбук использует исходные экспорты, `data/manual/texts_100.json`, `data/raw/ruspellgold/test.jsonl` и зависимости проекта. Все необходимые данные включены в архив. Метрики вычисляются из исходных экспортов до применения решений. При изменении состава расхождений проверка останавливается и требует повторного разбора. Отдельного аналитического скрипта нет.
122
 
123
  Готовый текстовый пакет можно приложить к сдаче вместе с этим отчётом и codebook. 13 выбранных решений нужно показать второму участнику; до подтверждения не обозначать их как совместно согласованные. Для всего этапа отдельно требуется подтвердить пилот сегментации на минимум 50 общих фото двумя разметчиками.
124
 
125
+ По явному указанию пользователя материалы опубликованы в открытом репозитории [Monyzik/framework-coursework-text](https://huggingface.co/datasets/Monyzik/framework-coursework-text). Основной набор RuSpellGold (1711 пар) и ручное дополнение (100 пар) хранятся отдельно. В автоматическом просмотре используются конфигурации `ruspellgold` с исходным split `test` и `manual_habr` со split `pilot`. Объединённый файл из 1811 пар не создаётся: выбор обучающей базы и разбиений относится к следующему этапу.
reports/text_annotation_pilot_2026-11-18.md CHANGED
@@ -1,5 +1,7 @@
1
  # Пилотная разметка текста — 18 ноября 2026
2
 
 
 
3
  В двух исходных выгрузках Label Studio размечены одни и те же **100 фрагментов**. Полные ответы совпадают в **87 случаях (87%)**. По решению «изменить исходник / оставить без изменений» совпадают **97 решений из 100**, **κ Коэна = 0,94**. Каппа характеризует решение об исправлении, а не совпадение всех исправленных символов.
4
 
5
  Разобраны все 13 расхождений. Подготовлены исправленная копия второго разметчика и итоговый JSONL: 53 изменённых и 47 неизменённых текстов. Решения по расхождениям приняты ассистентом по codebook; совместное подтверждение участников не зафиксировано. Исходные файлы сохранены отдельно. Результаты после этой проверки не используются как оценка независимого согласия.
@@ -110,16 +112,14 @@
110
 
111
  Локальная папка `reports/text_annotation_2026-11-18/` содержит неизменённые исходные экспорты с SHA-256, сопоставление всех 100 пар, 13 решений с полными строками и причинами, отдельную исправленную копию `*fb4`, итоговый JSONL, происхождение каждого фрагмента и время каждого ответа. Папка исключена из Git как локальные данные. Ссылки на комментарии восстановлены из `data/manual/texts_100.json`; тексты не собирались заново.
112
 
113
- Для повторного расчёта:
114
 
115
  ```bash
116
- .venv/bin/python scripts/analyze_text_annotations.py \
117
- --user reports/text_annotation_2026-11-18/originals/project-1-at-2026-11-18-13-07-d403dfc3.json \
118
- --other reports/text_annotation_2026-11-18/originals/project-2-at-2026-11-17-10-54-85c51fb4.json
119
  ```
120
 
121
- Скрипт требует локальные файлы `data/manual/texts_100.json`, `data/raw/ruspellgold/test.jsonl` и matplotlib из зависимостей проекта. Метрики вычисляются из исходных экспортов до применения решений. При изменении состава расхождений скрипт останавливается и требует повторного разбора.
122
 
123
  Готовый текстовый пакет можно приложить к сдаче вместе с этим отчётом и codebook. 13 выбранных решений нужно показать второму участнику; до подтверждения не обозначать их как совместно согласованные. Для всего этапа отдельно требуется подтвердить пилот сегментации на минимум 50 общих фото двумя разметчиками.
124
 
125
- Материалы размещаются в закрытом репозитории [Monyzik/framework-coursework-text](https://huggingface.co/datasets/Monyzik/framework-coursework-text). Доступ к исходным экспортам не расширяется автоматически; для преподавателя его нужно предоставить отдельно.
 
1
  # Пилотная разметка текста — 18 ноября 2026
2
 
3
+ Основной анализ, вычисления и разбор расхождений находятся в [существующем текстовом ноутбуке](../notebooks/text.ipynb), после EDA. Этот документ — сводка его результатов.
4
+
5
  В двух исходных выгрузках Label Studio размечены одни и те же **100 фрагментов**. Полные ответы совпадают в **87 случаях (87%)**. По решению «изменить исходник / оставить без изменений» совпадают **97 решений из 100**, **κ Коэна = 0,94**. Каппа характеризует решение об исправлении, а не совпадение всех исправленных символов.
6
 
7
  Разобраны все 13 расхождений. Подготовлены исправленная копия второго разметчика и итоговый JSONL: 53 изменённых и 47 неизменённых текстов. Решения по расхождениям приняты ассистентом по codebook; совместное подтверждение участников не зафиксировано. Исходные файлы сохранены отдельно. Результаты после этой проверки не используются как оценка независимого согласия.
 
112
 
113
  Локальная папка `reports/text_annotation_2026-11-18/` содержит неизменённые исходные экспорты с SHA-256, сопоставление всех 100 пар, 13 решений с полными строками и причинами, отдельную исправленную копию `*fb4`, итоговый JSONL, происхождение каждого фрагмента и время каждого ответа. Папка исключена из Git как локальные данные. Ссылки на комментарии восстановлены из `data/manual/texts_100.json`; тексты не собирались заново.
114
 
115
+ Для повторного расчёта откройте `notebooks/text.ipynb` и выполните все ячейки по порядку. При установленном `nbconvert` эквивалентная команда:
116
 
117
  ```bash
118
+ .venv/bin/python -m jupyter nbconvert --execute --to notebook --inplace notebooks/text.ipynb
 
 
119
  ```
120
 
121
+ Ноутбук использует исходные экспорты, `data/manual/texts_100.json`, `data/raw/ruspellgold/test.jsonl` и зависимости проекта. Все необходимые данные включены в архив. Метрики вычисляются из исходных экспортов до применения решений. При изменении состава расхождений проверка останавливается и требует повторного разбора. Отдельного аналитического скрипта нет.
122
 
123
  Готовый текстовый пакет можно приложить к сдаче вместе с этим отчётом и codebook. 13 выбранных решений нужно показать второму участнику; до подтверждения не обозначать их как совместно согласованные. Для всего этапа отдельно требуется подтвердить пилот сегментации на минимум 50 общих фото двумя разметчиками.
124
 
125
+ По явному указанию пользователя материалы опуб��икованы в открытом репозитории [Monyzik/framework-coursework-text](https://huggingface.co/datasets/Monyzik/framework-coursework-text). Основной набор RuSpellGold (1711 пар) и ручное дополнение (100 пар) хранятся отдельно. В автоматическом просмотре используются конфигурации `ruspellgold` с исходным split `test` и `manual_habr` со split `pilot`. Объединённый файл из 1811 пар не создаётся: выбор обучающей базы и разбиений относится к следующему этапу.
scripts/analyze_text_annotations.py DELETED
@@ -1,272 +0,0 @@
1
- """Compare the two original Label Studio exports and save a reviewable pilot packet.
2
-
3
- Original agreement is calculated before any review. The reviewed copy and final
4
- JSONL are assistant adjudications, not a new independent annotation experiment.
5
- """
6
-
7
- from __future__ import annotations
8
-
9
- import argparse
10
- import csv
11
- import hashlib
12
- import json
13
- import shutil
14
- import statistics
15
- import unicodedata
16
- from collections import Counter
17
- from pathlib import Path
18
-
19
-
20
- ROOT = Path(__file__).resolve().parents[1]
21
- DEFAULT_USER = Path('/Users/fedorkobylkevic/Downloads/project-1-at-2026-11-18-13-07-d403dfc3.json')
22
- DEFAULT_OTHER = Path('/Users/fedorkobylkevic/Downloads/project-2-at-2026-11-17-10-54-85c51fb4.json')
23
-
24
- # Each decision was reviewed against the current text codebook, not selected by
25
- # optimizing agreement. The user's answer happens to be the selected answer in
26
- # these 13 disagreements. Changes are applied only to an explicit reviewed copy.
27
- DECISIONS = {
28
- '07822c711a65c77c': ('technical', 'Убрать добавленный конечный перенос строки; содержательные исправления одинаковы.'),
29
- '1b19a139c27e5fbb': ('missed_typo', 'Исправить сообщетсву → сообществу; явная перестановка букв.'),
30
- '31c20b8075ef9aba': ('out_of_scope', 'Сохранить исходное окончание « .»; пунктуацию и оформление не меняем.'),
31
- '558a36a917eb706c': ('missed_typo', 'Исправить оставшуюся опечатку рассклыки → рассылки.'),
32
- '598b2fc139bcc44a': ('yo', 'Восстановить ещё по правилу ё из codebook.'),
33
- '6ce5adcc37523636': ('missed_typo', 'Исправить зашифроавно → зашифровано; явная перестановка букв.'),
34
- '770cdfa52e819c74': ('out_of_scope', 'Сохранить исходный термин гидрацию; замена на гидротацию не следует из текста. Обласит → области исправить.'),
35
- 'c3c58b0794836be2': ('out_of_scope', 'Сохранить исходное принципиально нерешаемые; оснований для раздельного написания нет.'),
36
- 'c5762b5df991f619': ('out_of_scope', 'Исправить плюс минус → плюс-минус, но сохранить исходное 5-10км/час без добавления оформительского пробела.'),
37
- 'dcefe6e8fd1e00bb': ('technical', 'Убрать добавленный конечный пробел; содержательные исправления одинаковы.'),
38
- 'e8c90ce46cc62d66': ('missed_typo', 'Исправить апргейд → апгрейд; явная перестановка букв.'),
39
- 'f0091e983f29fc32': ('yo', 'Восстановить живёт по правилу ё из codebook.'),
40
- 'fe22b57c01d31ad6': ('out_of_scope', 'Сохранить кормить,лечить без добавления пробела и убрать добавленный конечный перенос строки.'),
41
- }
42
- CATEGORY_NAMES = {
43
- 'technical': 'Только конечный пробел или перенос',
44
- 'missed_typo': 'Пропущенная опечатка',
45
- 'yo': 'Пропущенная ё',
46
- 'out_of_scope': 'Оформление или изменение вне правил',
47
- }
48
-
49
-
50
- def write_json(path, value):
51
- path.write_text(json.dumps(value, ensure_ascii=False, indent=2) + '\n', encoding='utf-8')
52
-
53
-
54
- def write_jsonl(path, rows):
55
- path.write_text(''.join(json.dumps(row, ensure_ascii=False) + '\n' for row in rows), encoding='utf-8')
56
-
57
-
58
- def normalize_source(text):
59
- return ' '.join(unicodedata.normalize('NFC', text).split())
60
-
61
-
62
- def load_export(path):
63
- tasks = json.loads(path.read_text(encoding='utf-8'))
64
- if not isinstance(tasks, list):
65
- raise ValueError(f'{path}: expected a list of Label Studio tasks')
66
- output = {}
67
- for task in tasks:
68
- fragment_id = task['data']['fragment_id']
69
- source = task['data']['text']
70
- annotations = [a for a in task['annotations'] if not a.get('was_cancelled')]
71
- if fragment_id in output or len(annotations) != 1:
72
- raise ValueError(f'{path}: duplicate ID or ambiguous annotations: {fragment_id}')
73
- annotation = annotations[0]
74
- results = [r for r in annotation['result'] if r.get('type') == 'textarea' and r.get('from_name') == 'correction']
75
- if len(results) != 1 or len(results[0]['value']['text']) != 1:
76
- raise ValueError(f'{path}: missing/ambiguous correction: {fragment_id}')
77
- correction = results[0]['value']['text'][0]
78
- if not isinstance(source, str) or not source.strip() or not isinstance(correction, str) or not correction.strip():
79
- raise ValueError(f'{path}: empty or invalid text: {fragment_id}')
80
- output[fragment_id] = {
81
- 'fragment_id': fragment_id, 'task_id': task['id'], 'source': source,
82
- 'correction': correction, 'lead_time_seconds': annotation['lead_time'],
83
- 'created_at': annotation['created_at'], 'updated_at': annotation['updated_at'],
84
- }
85
- return output
86
-
87
-
88
- def binary_agreement(user_labels, other_labels):
89
- n = len(user_labels)
90
- matrix = [[sum(a == i and b == j for a, b in zip(user_labels, other_labels)) for j in (0, 1)] for i in (0, 1)]
91
- po = sum(matrix[i][i] for i in (0, 1)) / n
92
- row_totals = [sum(row) for row in matrix]
93
- col_totals = [sum(matrix[i][j] for i in (0, 1)) for j in (0, 1)]
94
- pe = sum(a * b for a, b in zip(row_totals, col_totals)) / n ** 2
95
- kappa = (po - pe) / (1 - pe) if pe != 1 else None
96
- # An algebraically independent cross-check using observed/expected disagreement.
97
- expected_disagreements = row_totals[0] * col_totals[1] + row_totals[1] * col_totals[0]
98
- check = 1 - n * (matrix[0][1] + matrix[1][0]) / expected_disagreements if expected_disagreements else None
99
- if kappa is not None:
100
- assert abs(kappa - check) < 1e-12
101
- return {'n': n, 'matrix_user_rows_other_columns_0_1': matrix, 'observed_agreement': po,
102
- 'expected_agreement': pe, 'cohen_kappa': kappa,
103
- 'user_changed': sum(user_labels), 'other_changed': sum(other_labels)}
104
-
105
-
106
- def time_summary(values):
107
- return {'count': len(values), 'sum_seconds': sum(values), 'mean_seconds': statistics.mean(values),
108
- 'median_seconds': statistics.median(values), 'min_seconds': min(values), 'max_seconds': max(values)}
109
-
110
-
111
- def plot_agreement(metrics, path):
112
- import matplotlib
113
- matplotlib.use('Agg')
114
- import matplotlib.pyplot as plt
115
- import numpy as np
116
-
117
- plt.rcParams.update({'font.family': 'DejaVu Sans', 'font.size': 11})
118
- fig, axes = plt.subplots(1, 2, figsize=(11.5, 4.4), gridspec_kw={'width_ratios': [1.1, 1]})
119
- ax = axes[0]
120
- ax.barh([0], [87], color='#245E93', label='Совпадение: 87')
121
- ax.barh([0], [13], left=[87], color='#C66B30', label='Расхождение: 13')
122
- ax.text(43.5, 0, '87', ha='center', va='center', color='white', weight='bold', fontsize=17)
123
- ax.text(93.5, 0, '13', ha='center', va='center', color='white', weight='bold', fontsize=13)
124
- ax.set(xlim=(0, 100), ylim=(-0.7, 0.7), yticks=[], xlabel='Число фрагментов из 100',
125
- title='Полный исправленный текст\nДословное совпадение до проверки')
126
- ax.legend(loc='lower left', bbox_to_anchor=(0, -0.38), frameon=False, fontsize=10)
127
- ax.spines[['top', 'right', 'left']].set_visible(False)
128
- ax = axes[1]
129
- matrix = np.array(metrics['binary_decision']['matrix_user_rows_other_columns_0_1'])
130
- ax.imshow(matrix, cmap='Blues', vmin=0, vmax=55)
131
- for i in range(2):
132
- for j in range(2):
133
- ax.text(j, i, str(matrix[i, j]), ha='center', va='center', fontsize=19,
134
- color='white' if matrix[i, j] > 25 else '#12243A', weight='bold')
135
- ax.set(xticks=[0, 1], yticks=[0, 1], xticklabels=['Оставил', 'Исправил'],
136
- yticklabels=['Оставил', 'Исправил'], xlabel='Второй разметчик (*fb4)',
137
- ylabel='Фёдор (*dfc3)', title='Решение об исправлении\nСогласие 97%; κ = 0,94')
138
- fig.suptitle('Пилотная разметка текста: 100 общих фрагментов', fontsize=16, weight='bold')
139
- fig.subplots_adjust(top=0.76, bottom=0.25, left=0.06, right=0.97, wspace=0.48)
140
- fig.savefig(path, dpi=160, facecolor='white')
141
- plt.close(fig)
142
-
143
-
144
- def main():
145
- parser = argparse.ArgumentParser(description=__doc__)
146
- parser.add_argument('--user', type=Path, default=DEFAULT_USER)
147
- parser.add_argument('--other', type=Path, default=DEFAULT_OTHER)
148
- parser.add_argument('--out', type=Path, default=ROOT / 'reports/text_annotation_2026-11-18')
149
- args = parser.parse_args()
150
- args.out.mkdir(parents=True, exist_ok=True)
151
- originals = args.out / 'originals'
152
- originals.mkdir(exist_ok=True)
153
- user = load_export(args.user)
154
- other = load_export(args.other)
155
- if set(user) != set(other):
156
- raise ValueError('The exports must contain the same fragment IDs; do not silently drop unmatched tasks.')
157
- if any(user[k]['source'] != other[k]['source'] for k in user):
158
- raise ValueError('Source text differs between annotators for the same fragment ID.')
159
- ids = list(user)
160
- disagreements = [k for k in ids if user[k]['correction'] != other[k]['correction']]
161
- if set(disagreements) != set(DECISIONS):
162
- raise ValueError('This reviewed decision file does not match the input disagreements; re-review required.')
163
-
164
- collection = json.loads((ROOT / 'data/manual/texts_100.json').read_text(encoding='utf-8'))
165
- by_text = {}
166
- for group in ('with_errors', 'without_errors'):
167
- for row in collection[group]:
168
- if row['text'] in by_text:
169
- raise ValueError('Ambiguous source provenance in manual collection')
170
- by_text[row['text']] = dict(row, collection_group=group)
171
- if set(by_text) != {user[k]['source'] for k in ids}:
172
- raise ValueError('Collected texts and annotated texts do not match exactly')
173
-
174
- original_manifest = []
175
- for role, path in [('user', args.user), ('other', args.other)]:
176
- destination = originals / path.name
177
- if destination.resolve() != path.resolve():
178
- if destination.exists() and destination.read_bytes() != path.read_bytes():
179
- raise ValueError(f'Refusing to overwrite an original export with different bytes: {destination}')
180
- shutil.copyfile(path, destination)
181
- original_manifest.append({'role': role, 'file': f'originals/{path.name}',
182
- 'sha256': hashlib.sha256(path.read_bytes()).hexdigest(), 'bytes': path.stat().st_size})
183
- assert destination.read_bytes() == path.read_bytes()
184
-
185
- pairs, decisions, corrected_partner, final, final_audit = [], [], [], [], []
186
- for k in ids:
187
- a, b = user[k], other[k]
188
- source, ca, cb = a['source'], a['correction'], b['correction']
189
- provenance = by_text[source]
190
- pair = {'fragment_id': k, 'user_task_id': a['task_id'], 'other_task_id': b['task_id'],
191
- 'source': source, 'correction_user': ca, 'correction_other_original': cb,
192
- 'exact_match': ca == cb, 'user_changed': source != ca, 'other_changed': source != cb,
193
- 'source_url': provenance['source_url'], 'collection_id': provenance['id'],
194
- 'collection_group_not_gold': provenance['collection_group'],
195
- 'user_lead_time_seconds': a['lead_time_seconds'], 'other_lead_time_seconds': b['lead_time_seconds']}
196
- pairs.append(pair)
197
- if k in DECISIONS:
198
- category, reason = DECISIONS[k]
199
- decisions.append({'fragment_id': k, 'user_task_id': a['task_id'], 'other_task_id': b['task_id'],
200
- 'category': category, 'reason': reason, 'source': source,
201
- 'other_original': cb, 'user_original': ca, 'selected_correction': ca,
202
- 'reviewer': 'assistant', 'review_date': '2026-11-18',
203
- 'status': 'assistant_adjudicated_not_human_consensus', 'source_url': provenance['source_url']})
204
- chosen = ca
205
- final.append({'source': source, 'correction': chosen, 'domain': 'habr'})
206
- corrected_partner.append({'source': source, 'correction': chosen if k in DECISIONS else cb, 'domain': 'habr'})
207
- final_audit.append({'fragment_id': k, **final[-1], 'source_url': provenance['source_url'],
208
- 'status': 'assistant_adjudicated_not_human_consensus' if k in DECISIONS else 'identical_original_answers',
209
- 'reason': DECISIONS[k][1] if k in DECISIONS else 'Исходные ответы двух разметчиков совпадают.'})
210
-
211
- labels_user = [int(user[k]['source'] != user[k]['correction']) for k in ids]
212
- labels_other = [int(other[k]['source'] != other[k]['correction']) for k in ids]
213
- agreement = binary_agreement(labels_user, labels_other)
214
- raw = [json.loads(line) for line in (ROOT / 'data/raw/ruspellgold/test.jsonl').read_text(encoding='utf-8').splitlines() if line.strip()]
215
- raw_sources = {r['source'] for r in raw}
216
- raw_normalized = {normalize_source(r['source']) for r in raw}
217
- categories = Counter(row['category'] for row in decisions)
218
- metrics = {
219
- 'date': '2026-11-18', 'input_manifest': original_manifest,
220
- 'grain': 'one shared fragment_id with one full correction per original annotator',
221
- 'tasks_user': len(user), 'tasks_other': len(other), 'shared_tasks': len(ids),
222
- 'missing_ids': 0, 'source_text_conflicts': 0, 'empty_corrections': 0,
223
- 'duplicate_sources_exact': len(ids) - len({user[k]['source'] for k in ids}),
224
- 'duplicate_sources_normalized': len(ids) - len({normalize_source(user[k]['source']) for k in ids}),
225
- 'exact_match_count': len(ids) - len(disagreements), 'exact_agreement': 1 - len(disagreements) / len(ids),
226
- 'disagreement_count': len(disagreements), 'binary_decision': agreement,
227
- 'diagnostics_not_primary': {
228
- 'match_after_strip_count': sum(user[k]['correction'].strip() == other[k]['correction'].strip() for k in ids),
229
- 'match_after_strip_and_yo_fold_count': sum(user[k]['correction'].strip().replace('ё', 'е').replace('Ё', 'Е') == other[k]['correction'].strip().replace('ё', 'е').replace('Ё', 'Е') for k in ids),
230
- },
231
- 'both_changed_count': sum(a and b for a, b in zip(labels_user, labels_other)),
232
- 'both_changed_exact_match_count': sum(p['user_changed'] and p['other_changed'] and p['exact_match'] for p in pairs),
233
- 'difference_categories_primary_exclusive': {k: categories[k] for k in CATEGORY_NAMES},
234
- 'time_recorded_user': time_summary([user[k]['lead_time_seconds'] for k in ids]),
235
- 'time_recorded_other': time_summary([other[k]['lead_time_seconds'] for k in ids]),
236
- 'annotation_dates_utc': {role: {'earliest_created': min(x['created_at'] for x in records.values()),
237
- 'latest_updated': max(x['updated_at'] for x in records.values())}
238
- for role, records in [('user', user), ('other', other)]},
239
- 'manual_collection_date': collection['collected_on'], 'source_urls_count': len(by_text),
240
- 'collection_groups_not_gold': {'with_errors': len(collection['with_errors']), 'without_errors': len(collection['without_errors'])},
241
- 'final_changed': sum(r['source'] != r['correction'] for r in final),
242
- 'final_unchanged': sum(r['source'] == r['correction'] for r in final),
243
- 'overlap_with_ruspellgold': {
244
- 'original_records': len(raw),
245
- 'exact_source_overlap': sum(user[k]['source'] in raw_sources for k in ids),
246
- 'normalized_source_overlap': sum(normalize_source(user[k]['source']) in raw_normalized for k in ids),
247
- 'scope': 'Exact and NFC/whitespace-normalized equality only; not a semantic or near-duplicate audit.'},
248
- 'review': {'changed_partner_rows': len(decisions), 'user_rows_changed': 0,
249
- 'reviewer': 'assistant', 'human_consensus_confirmed': False,
250
- 'note': 'Reviewed results are not an independent agreement measurement.'},
251
- }
252
- assert sum(categories.values()) == len(disagreements)
253
- assert metrics['both_changed_exact_match_count'] + agreement['matrix_user_rows_other_columns_0_1'][0][0] == metrics['exact_match_count']
254
- assert all(row['correction'] == pair['correction_user'] for row, pair in zip(final, pairs))
255
- write_json(args.out / 'metrics.json', metrics)
256
- write_jsonl(args.out / 'paired_annotations.jsonl', pairs)
257
- write_jsonl(args.out / 'text_habr_adjudicated.jsonl', final)
258
- write_jsonl(args.out / 'text_habr_adjudicated_audit.jsonl', final_audit)
259
- write_jsonl(args.out / 'partner_reviewed.jsonl', corrected_partner)
260
- write_jsonl(args.out / 'adjudication_log.jsonl', decisions)
261
- for filename, rows in [('disagreements.csv', decisions), ('annotation_times.csv', [{k: p[k] for k in ['fragment_id', 'user_task_id', 'other_task_id', 'user_lead_time_seconds', 'other_lead_time_seconds']} for p in pairs])]:
262
- with (args.out / filename).open('w', encoding='utf-8-sig', newline='') as f:
263
- writer = csv.DictWriter(f, fieldnames=list(rows[0]), delimiter=';')
264
- writer.writeheader()
265
- writer.writerows(rows)
266
- write_jsonl(args.out / 'source_manifest.jsonl', [{'fragment_id': p['fragment_id'], 'collection_id': p['collection_id'], 'source_url': p['source_url'], 'collected_on': collection['collected_on']} for p in pairs])
267
- plot_agreement(metrics, args.out / 'agreement.png')
268
- print(json.dumps({k: metrics[k] for k in ['shared_tasks', 'exact_match_count', 'disagreement_count', 'binary_decision', 'final_changed', 'final_unchanged', 'overlap_with_ruspellgold']}, ensure_ascii=False, indent=2))
269
-
270
-
271
- if __name__ == '__main__':
272
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
scripts/download_data.py ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import json
3
+ import shutil
4
+ import zipfile
5
+ from io import BytesIO
6
+ from pathlib import Path
7
+
8
+ import pandas as pd
9
+ from huggingface_hub import hf_hub_download
10
+
11
+ FASHION_REVISION = '4b3e23d4c0a7efe634b410bacbb44624871d314f'
12
+ FASHION_VERSION = '4.0.0'
13
+ FASHION_IMAGE_COUNT = 3922
14
+
15
+
16
+ def download_text(root: Path) -> Path:
17
+ path = root / 'data/raw/ruspellgold/test.jsonl'
18
+ path.parent.mkdir(parents=True, exist_ok=True)
19
+ if path.is_file() and path.stat().st_size > 0:
20
+ print('RuSpellGold уже скачан.')
21
+ return path
22
+
23
+ downloaded = hf_hub_download(
24
+ repo_id='RussianNLP/RuSpellGold',
25
+ filename='data/complete_test/test.json',
26
+ repo_type='dataset',
27
+ revision='8b6694e45ac9222bc705ee4af9d6367ac083ff5c',
28
+ local_dir=path.parent / '.hf',
29
+ token=False,
30
+ )
31
+ temporary = path.with_suffix('.jsonl.tmp')
32
+ try:
33
+ shutil.copyfile(downloaded, temporary)
34
+ temporary.replace(path)
35
+ finally:
36
+ temporary.unlink(missing_ok=True)
37
+ print('RuSpellGold скачан.')
38
+ return path
39
+
40
+
41
+ def download_fashion(root: Path) -> None:
42
+ raw = root / 'data/raw/imaterialist'
43
+ processed = root / 'data/processed'
44
+ raw.mkdir(parents=True, exist_ok=True)
45
+ processed.mkdir(parents=True, exist_ok=True)
46
+ metadata_files = {
47
+ 'label_descriptions.json': raw / 'label_descriptions.json',
48
+ 'annotations.csv': processed / 'selected_annotations.csv',
49
+ 'image_manifest.csv': processed / 'image_manifest.csv',
50
+ 'classes.json': processed / 'classes.json',
51
+ 'dataset_info.json': processed / 'dataset_info.json',
52
+ }
53
+ def image_path(image_id: str) -> Path:
54
+ return raw / 'train' / f'{image_id}.jpg'
55
+
56
+ def has_image(image_id: str) -> bool:
57
+ path = image_path(image_id)
58
+ return path.is_file() and path.stat().st_size > 0
59
+
60
+ def valid_manifest(manifest: pd.DataFrame) -> bool:
61
+ return len(manifest) == FASHION_IMAGE_COUNT and manifest['ImageId'].is_unique
62
+
63
+ if all(path.is_file() and path.stat().st_size > 0 for path in metadata_files.values()):
64
+ info = json.loads(metadata_files['dataset_info.json'].read_text())
65
+ manifest = pd.read_csv(metadata_files['image_manifest.csv'], dtype={'ImageId': str})
66
+ if (info.get('version') == FASHION_VERSION and valid_manifest(manifest)
67
+ and all(map(has_image, manifest['ImageId']))):
68
+ print(f'Набор {FASHION_VERSION} уже скачан: {len(manifest)} фото.')
69
+ return
70
+
71
+ def release_archive(filename: str) -> zipfile.ZipFile:
72
+ return zipfile.ZipFile(hf_hub_download(
73
+ repo_id='Monyzik/fashion-4000',
74
+ filename=filename,
75
+ repo_type='dataset',
76
+ revision=FASHION_REVISION,
77
+ local_dir=raw / '.hf',
78
+ token=False,
79
+ ))
80
+
81
+ with release_archive('fashion-4000-metadata.zip') as archive:
82
+ manifest = pd.read_csv(
83
+ BytesIO(archive.read('fashion-4000/image_manifest.csv')), dtype={'ImageId': str}
84
+ )
85
+ if not valid_manifest(manifest):
86
+ raise ValueError(f'В архиве ожидались {FASHION_IMAGE_COUNT} уникальных фото.')
87
+ info = json.loads(archive.read('fashion-4000/dataset_info.json'))
88
+ if info.get('version') != FASHION_VERSION:
89
+ raise ValueError('В архиве найдена другая версия аннотаций.')
90
+
91
+ def copy_member(source_zip: zipfile.ZipFile, member: str, target: Path) -> None:
92
+ target.parent.mkdir(parents=True, exist_ok=True)
93
+ temporary = target.with_name(target.name + '.tmp')
94
+ try:
95
+ with source_zip.open(member) as source, temporary.open('wb') as destination:
96
+ shutil.copyfileobj(source, destination)
97
+ if temporary.stat().st_size == 0:
98
+ raise ValueError(f'Пустой файл: {member}')
99
+ temporary.replace(target)
100
+ finally:
101
+ temporary.unlink(missing_ok=True)
102
+
103
+ missing = [image_id for image_id in manifest['ImageId'] if not has_image(image_id)]
104
+ if missing:
105
+ with release_archive('fashion-4000.zip') as images:
106
+ for image_id in missing:
107
+ copy_member(images, f'fashion-4000/images/{image_id}.jpg', image_path(image_id))
108
+
109
+ metadata_files['dataset_info.json'].unlink(missing_ok=True)
110
+ for member in ['label_descriptions.json', 'annotations.csv', 'classes.json']:
111
+ copy_member(archive, f'fashion-4000/{member}', metadata_files[member])
112
+ manifest['file_name'] = 'train/' + manifest['ImageId'] + '.jpg'
113
+ temporary = processed / 'image_manifest.csv.tmp'
114
+ manifest.to_csv(temporary, index=False)
115
+ temporary.replace(metadata_files['image_manifest.csv'])
116
+ copy_member(archive, 'fashion-4000/dataset_info.json', metadata_files['dataset_info.json'])
117
+
118
+ print('Готово фотографий:', len(manifest))
119
+
120
+
121
+ def main() -> None:
122
+ parser = argparse.ArgumentParser(description=__doc__)
123
+ parser.add_argument('dataset', choices=['text', 'fashion'])
124
+ args = parser.parse_args()
125
+ root = Path(__file__).resolve().parents[1]
126
+ if args.dataset == 'text':
127
+ download_text(root)
128
+ else:
129
+ download_fashion(root)
130
+
131
+
132
+ if __name__ == '__main__':
133
+ main()
scripts/install_dependencies.py ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from importlib import invalidate_caches, metadata
2
+ from pathlib import Path
3
+ import subprocess
4
+ import sys
5
+
6
+
7
+ def main() -> None:
8
+ if sys.version_info < (3, 11):
9
+ raise RuntimeError('Для проекта нужен Python 3.11 или новее.')
10
+
11
+ import tomllib
12
+
13
+ root = Path(__file__).resolve().parents[1]
14
+ config = tomllib.loads((root / 'pyproject.toml').read_text(encoding='utf-8'))
15
+ try:
16
+ metadata.version('packaging')
17
+ except metadata.PackageNotFoundError:
18
+ subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'packaging>=23'])
19
+ invalidate_caches()
20
+ from packaging.requirements import Requirement
21
+
22
+ to_install = []
23
+ to_update = []
24
+ for specification in config['project']['dependencies']:
25
+ requirement = Requirement(specification)
26
+ if requirement.marker and not requirement.marker.evaluate():
27
+ continue
28
+ try:
29
+ installed = metadata.version(requirement.name)
30
+ except metadata.PackageNotFoundError:
31
+ to_install.append(specification)
32
+ else:
33
+ if not requirement.specifier.contains(installed, prereleases=True):
34
+ to_install.append(specification)
35
+ to_update.append(requirement.name)
36
+
37
+ if not to_install:
38
+ print('Все зависимости уже установлены в подходящих версиях.')
39
+ return
40
+
41
+ print('Устанавливаем:', ', '.join(to_install), flush=True)
42
+ subprocess.check_call([sys.executable, '-m', 'pip', 'install', *to_install])
43
+ print('Зависимости установлены.')
44
+ if to_update:
45
+ print('Обновлены:', ', '.join(to_update))
46
+ print('Если эти библиотеки уже были импортированы, перезапустите ядро.')
47
+
48
+
49
+ if __name__ == '__main__':
50
+ main()
text_annotation_submission_2026-11-18.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5acfc56943c9ad797f63916f0f19a9f2455b6af27682ad1311c0bcdd83895366
3
- size 370705
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d4af1c08b7abb75f8a120c9357b828c274b19baaf24d382b4c0f877d7abe8773
3
+ size 896388