Spaces:
Runtime error
Runtime error
пофіксив завантаження JSON
Browse files- app.py +32 -22
- classes_short.json +576 -1835
- embedding_cache.py +135 -0
- sdc_classifier.py +119 -14
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from sdc_classifier import SDCClassifier
|
3 |
from dotenv import load_dotenv
|
|
|
4 |
|
5 |
# Load environment variables
|
6 |
load_dotenv()
|
@@ -14,19 +15,7 @@ def main():
|
|
14 |
DEFAULT_SIGNATURES_FILE = "signatures.npz"
|
15 |
|
16 |
print("Завантаження початкових класів...")
|
17 |
-
classifier.
|
18 |
-
|
19 |
-
if classifier.classes_json:
|
20 |
-
print("Ініціалізація signatures...")
|
21 |
-
try:
|
22 |
-
init_message = classifier.initialize_signatures(
|
23 |
-
signatures_file=DEFAULT_SIGNATURES_FILE
|
24 |
-
)
|
25 |
-
print(f"Результат ініціалізації: {init_message}")
|
26 |
-
except Exception as e:
|
27 |
-
print(f"ПОПЕРЕДЖЕННЯ: Помилка при ініціалізації signatures: {str(e)}")
|
28 |
-
else:
|
29 |
-
print("Очікую завантаження класів через інтерфейс...")
|
30 |
|
31 |
with gr.Blocks() as demo:
|
32 |
gr.Markdown("# SDC Classifier з Gradio")
|
@@ -72,7 +61,8 @@ def main():
|
|
72 |
with gr.Row():
|
73 |
build_btn = gr.Button("Оновити signatures")
|
74 |
build_out = gr.Label(label="Статус signatures")
|
75 |
-
|
|
|
76 |
# Вкладка 2: Batch Processing
|
77 |
with gr.TabItem("Пакетна обробка"):
|
78 |
gr.Markdown("## 1) Завантаження даних")
|
@@ -122,17 +112,37 @@ def main():
|
|
122 |
# Підключення обробників подій
|
123 |
def update_with_file(file, model_name, force):
|
124 |
if file is None:
|
125 |
-
|
|
|
|
|
|
|
126 |
try:
|
127 |
-
|
128 |
-
|
129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
model_name=model_name,
|
131 |
-
signatures_file=
|
132 |
-
force_rebuild=
|
133 |
)
|
|
|
|
|
|
|
|
|
|
|
134 |
except Exception as e:
|
135 |
-
return f"Помилка при оновленні: {str(e)}"
|
136 |
|
137 |
single_process_btn.click(
|
138 |
fn=lambda text, threshold: classifier.process_single_text(text, threshold),
|
@@ -143,7 +153,7 @@ def main():
|
|
143 |
build_btn.click(
|
144 |
fn=update_with_file,
|
145 |
inputs=[json_file, model_choice, force_rebuild],
|
146 |
-
outputs=build_out
|
147 |
)
|
148 |
|
149 |
load_btn.click(
|
|
|
1 |
import gradio as gr
|
2 |
from sdc_classifier import SDCClassifier
|
3 |
from dotenv import load_dotenv
|
4 |
+
import json
|
5 |
|
6 |
# Load environment variables
|
7 |
load_dotenv()
|
|
|
15 |
DEFAULT_SIGNATURES_FILE = "signatures.npz"
|
16 |
|
17 |
print("Завантаження початкових класів...")
|
18 |
+
classifier.load_initial_state(DEFAULT_CLASSES_FILE, DEFAULT_SIGNATURES_FILE)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
with gr.Blocks() as demo:
|
21 |
gr.Markdown("# SDC Classifier з Gradio")
|
|
|
61 |
with gr.Row():
|
62 |
build_btn = gr.Button("Оновити signatures")
|
63 |
build_out = gr.Label(label="Статус signatures")
|
64 |
+
cache_stats = gr.JSON(label="Статистика кешу", value={})
|
65 |
+
|
66 |
# Вкладка 2: Batch Processing
|
67 |
with gr.TabItem("Пакетна обробка"):
|
68 |
gr.Markdown("## 1) Завантаження даних")
|
|
|
112 |
# Підключення обробників подій
|
113 |
def update_with_file(file, model_name, force):
|
114 |
if file is None:
|
115 |
+
# Відновлюємо базовий стан якщо файл видалено
|
116 |
+
classifier.restore_base_state()
|
117 |
+
return ("Відновлено базовий набір класів", classifier.get_cache_stats())
|
118 |
+
|
119 |
try:
|
120 |
+
# Для роботи з gradio File компонентом
|
121 |
+
if hasattr(file, 'name'): # Якщо це файловий об'єкт
|
122 |
+
with open(file.name, 'r', encoding='utf-8') as f:
|
123 |
+
new_classes = json.load(f)
|
124 |
+
else: # Якщо це строка
|
125 |
+
new_classes = json.loads(file)
|
126 |
+
|
127 |
+
if not isinstance(new_classes, dict):
|
128 |
+
return ("Помилка: JSON повинен містити словник класів", classifier.get_cache_stats())
|
129 |
+
|
130 |
+
# Завантажуємо нові класи без перезапису файлу за замовчуванням
|
131 |
+
classifier.load_classes(new_classes)
|
132 |
+
|
133 |
+
# Створюємо тимчасові signatures
|
134 |
+
result = classifier.initialize_signatures(
|
135 |
model_name=model_name,
|
136 |
+
signatures_file=None, # Не зберігаємо у файл
|
137 |
+
force_rebuild=True # Завжди перебудовуємо для нових класів
|
138 |
)
|
139 |
+
|
140 |
+
return (f"Тимчасові класи завантажено. {result}", classifier.get_cache_stats())
|
141 |
+
|
142 |
+
except json.JSONDecodeError:
|
143 |
+
return ("Помилка: Неправильний формат JSON файлу", classifier.get_cache_stats())
|
144 |
except Exception as e:
|
145 |
+
return (f"Помилка при оновленні: {str(e)}", classifier.get_cache_stats())
|
146 |
|
147 |
single_process_btn.click(
|
148 |
fn=lambda text, threshold: classifier.process_single_text(text, threshold),
|
|
|
153 |
build_btn.click(
|
154 |
fn=update_with_file,
|
155 |
inputs=[json_file, model_choice, force_rebuild],
|
156 |
+
outputs=[build_out, cache_stats]
|
157 |
)
|
158 |
|
159 |
load_btn.click(
|
classes_short.json
CHANGED
@@ -1,1836 +1,577 @@
|
|
1 |
{
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
"
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
"
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
"
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
"
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
"
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
"
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
"watery stools"
|
579 |
-
],
|
580 |
-
"Rhinorrhea": [
|
581 |
-
"excessive noise from nasal passage",
|
582 |
-
"increased nasal secretion",
|
583 |
-
"more mucus nasal",
|
584 |
-
"nasal discharge increased",
|
585 |
-
"nose drip",
|
586 |
-
"nose dripping",
|
587 |
-
"nose mucus abundant",
|
588 |
-
"rhinorrhea",
|
589 |
-
"rhinorrhoea"
|
590 |
-
],
|
591 |
-
"Cough": [
|
592 |
-
"a lot of phlegm",
|
593 |
-
"a lot of phlegm and mucus",
|
594 |
-
"achy coughing",
|
595 |
-
"alot of phlegm",
|
596 |
-
"alot of thick secretions",
|
597 |
-
"bark",
|
598 |
-
"barking",
|
599 |
-
"barks",
|
600 |
-
"blood cough",
|
601 |
-
"bringing up alot of yellow",
|
602 |
-
"can't bring up anything",
|
603 |
-
"can't bring up my secretions",
|
604 |
-
"choking on my my secretions",
|
605 |
-
"choking on my phlegm",
|
606 |
-
"coming up from my lungs",
|
607 |
-
"coming up out of my lungs",
|
608 |
-
"congested cough",
|
609 |
-
"copious amounts of sputum",
|
610 |
-
"coug",
|
611 |
-
"cough",
|
612 |
-
"cough type",
|
613 |
-
"cough up",
|
614 |
-
"cough up blood",
|
615 |
-
"cough with blood",
|
616 |
-
"cough with small blood",
|
617 |
-
"coughed",
|
618 |
-
"coughed up blood",
|
619 |
-
"coughing",
|
620 |
-
"coughing up",
|
621 |
-
"coughing up blood",
|
622 |
-
"coughing with a blood",
|
623 |
-
"coughing with blood",
|
624 |
-
"coughs",
|
625 |
-
"cougj",
|
626 |
-
"guns from my lungs",
|
627 |
-
"i have croup",
|
628 |
-
"junk coming from my lungs",
|
629 |
-
"junk i am bringing up",
|
630 |
-
"lungs are producing",
|
631 |
-
"more phlegm",
|
632 |
-
"my spit is creamy",
|
633 |
-
"ocugh",
|
634 |
-
"phlegm coming out",
|
635 |
-
"producing alot of secretions",
|
636 |
-
"sound like a seal",
|
637 |
-
"sputum i am bringing",
|
638 |
-
"still have phlegm",
|
639 |
-
"stuff coming from my lungs",
|
640 |
-
"weak cough"
|
641 |
-
],
|
642 |
-
"Prior scar dehiscence": [
|
643 |
-
"prior scar dehiscence"
|
644 |
-
],
|
645 |
-
"weakness": [
|
646 |
-
"a bit week",
|
647 |
-
"a little bit week",
|
648 |
-
"a little week",
|
649 |
-
"am eaker",
|
650 |
-
"asthenic",
|
651 |
-
"been week for a while",
|
652 |
-
"body is weaker",
|
653 |
-
"body is week",
|
654 |
-
"continue to be week",
|
655 |
-
"debility",
|
656 |
-
"decreased strength",
|
657 |
-
"enfeebled",
|
658 |
-
"feeling weaker",
|
659 |
-
"feeling faint",
|
660 |
-
"feeling week",
|
661 |
-
"feels faint",
|
662 |
-
"felt faint",
|
663 |
-
"general debility",
|
664 |
-
"i am week",
|
665 |
-
"i feel week",
|
666 |
-
"just as week",
|
667 |
-
"lassitude",
|
668 |
-
"loss of strength",
|
669 |
-
"loss strength",
|
670 |
-
"made me week",
|
671 |
-
"make me week",
|
672 |
-
"no longer week",
|
673 |
-
"not week anymore",
|
674 |
-
"physically week",
|
675 |
-
"so week",
|
676 |
-
"still week",
|
677 |
-
"strength decreased",
|
678 |
-
"strength loss",
|
679 |
-
"too week",
|
680 |
-
"weak",
|
681 |
-
"weakeness",
|
682 |
-
"weakness",
|
683 |
-
"weaknesses",
|
684 |
-
"wealness",
|
685 |
-
"werak"
|
686 |
-
],
|
687 |
-
"Sinusoidal Pattern": [
|
688 |
-
"sinusoidal pattern"
|
689 |
-
],
|
690 |
-
"Prior uterine rupture": [
|
691 |
-
"prior uterine rupture"
|
692 |
-
],
|
693 |
-
"Hypertonic Uterus": [
|
694 |
-
"hypertonic uterus"
|
695 |
-
],
|
696 |
-
"Unconsciousness": [
|
697 |
-
"unconsciousness"
|
698 |
-
],
|
699 |
-
"Headache": [
|
700 |
-
"ache head",
|
701 |
-
"brain hurts",
|
702 |
-
"cephalalgia",
|
703 |
-
"cephalalgias",
|
704 |
-
"cephalgia",
|
705 |
-
"cephalgias",
|
706 |
-
"cephalodynia",
|
707 |
-
"cephalodynias",
|
708 |
-
"cranial pain",
|
709 |
-
"cranial pains",
|
710 |
-
"frequent headaches",
|
711 |
-
"geadaches",
|
712 |
-
"ha",
|
713 |
-
"heachache",
|
714 |
-
"heache",
|
715 |
-
"heaches",
|
716 |
-
"head going to explode",
|
717 |
-
"head hurts",
|
718 |
-
"head ach",
|
719 |
-
"head ache",
|
720 |
-
"head aches",
|
721 |
-
"head achy",
|
722 |
-
"head hurts",
|
723 |
-
"head is pounding",
|
724 |
-
"head pain",
|
725 |
-
"head pain cephalgia",
|
726 |
-
"head pained",
|
727 |
-
"head pains",
|
728 |
-
"head soreness",
|
729 |
-
"head tingling",
|
730 |
-
"headac he",
|
731 |
-
"headach",
|
732 |
-
"headache",
|
733 |
-
"headaches",
|
734 |
-
"headahce",
|
735 |
-
"headahces",
|
736 |
-
"headahe",
|
737 |
-
"headhace",
|
738 |
-
"my head is killing me",
|
739 |
-
"my head was killing me",
|
740 |
-
"pain head",
|
741 |
-
"pain in head",
|
742 |
-
"pain in my head",
|
743 |
-
"pressure in head",
|
744 |
-
"sinus headache",
|
745 |
-
"sinus headaches"
|
746 |
-
],
|
747 |
-
"Dysuria": [
|
748 |
-
"burning go to the restroom",
|
749 |
-
"burning pee",
|
750 |
-
"burning urination",
|
751 |
-
"burning feeling in penis",
|
752 |
-
"burning urination",
|
753 |
-
"burning when urinate",
|
754 |
-
"dysuria",
|
755 |
-
"dysuria/painful urination",
|
756 |
-
"frequent painful peeing",
|
757 |
-
"go to the restroom burning",
|
758 |
-
"having issues pee",
|
759 |
-
"hurts to pee",
|
760 |
-
"hurts when pee",
|
761 |
-
"in pain to pee",
|
762 |
-
"irritation urinating",
|
763 |
-
"micturition painful",
|
764 |
-
"pain upon urination",
|
765 |
-
"pain urination",
|
766 |
-
"pain associated with micturition",
|
767 |
-
"pain during urination",
|
768 |
-
"pain emptying bladder",
|
769 |
-
"pain on micturition",
|
770 |
-
"pain on voiding",
|
771 |
-
"pain passing urine",
|
772 |
-
"pain passing water",
|
773 |
-
"pain when pee",
|
774 |
-
"pain while peeing",
|
775 |
-
"pain with urination",
|
776 |
-
"pain, peeing",
|
777 |
-
"painful urination",
|
778 |
-
"painful frequent urination",
|
779 |
-
"painful micturition",
|
780 |
-
"painful or difficult urination",
|
781 |
-
"painful urination",
|
782 |
-
"painful urine",
|
783 |
-
"passing water hurts",
|
784 |
-
"stinging urination",
|
785 |
-
"stings use the bathroom",
|
786 |
-
"uncomfortable urinating",
|
787 |
-
"urinating irritation",
|
788 |
-
"urinating uncomfortable",
|
789 |
-
"urination pain",
|
790 |
-
"urination painful",
|
791 |
-
"urination stinging",
|
792 |
-
"urination pain",
|
793 |
-
"urination painful",
|
794 |
-
"use the bathroom stings",
|
795 |
-
"voiding pain"
|
796 |
-
],
|
797 |
-
"Mental confusion": [
|
798 |
-
"acting confused",
|
799 |
-
"appeared confused",
|
800 |
-
"appears confused",
|
801 |
-
"can't concentrate",
|
802 |
-
"can't think clearly",
|
803 |
-
"can't think straight",
|
804 |
-
"cloudy-headed",
|
805 |
-
"confused losing track",
|
806 |
-
"confused about time",
|
807 |
-
"confused and demented",
|
808 |
-
"hard time paying attention",
|
809 |
-
"inability to think",
|
810 |
-
"losing track confused",
|
811 |
-
"mental confusion",
|
812 |
-
"mind is getting foggy",
|
813 |
-
"patient confused",
|
814 |
-
"pt confused",
|
815 |
-
"puzzlement",
|
816 |
-
"seemed confused",
|
817 |
-
"seemed confused",
|
818 |
-
"seems confused",
|
819 |
-
"slow thinking",
|
820 |
-
"slowed thinking",
|
821 |
-
"slower thinking",
|
822 |
-
"some brain fog",
|
823 |
-
"thinking is slowed"
|
824 |
-
],
|
825 |
-
"Chest pain": [
|
826 |
-
"aches in my chest",
|
827 |
-
"achy chest",
|
828 |
-
"angia",
|
829 |
-
"angina",
|
830 |
-
"burn in my chest",
|
831 |
-
"burning in the chest",
|
832 |
-
"chesl pain",
|
833 |
-
"chest achy",
|
834 |
-
"chest burns",
|
835 |
-
"chest hurting",
|
836 |
-
"chest hurts",
|
837 |
-
"chest pai",
|
838 |
-
"chest soreness",
|
839 |
-
"chest heard",
|
840 |
-
"chest hurt",
|
841 |
-
"chest hurts",
|
842 |
-
"chest is burning",
|
843 |
-
"chest just hurts",
|
844 |
-
"chest pain",
|
845 |
-
"chest pain at rest",
|
846 |
-
"chest pain or angina",
|
847 |
-
"chest pains",
|
848 |
-
"chest pains at rest",
|
849 |
-
"chest started to ache",
|
850 |
-
"chest twinges",
|
851 |
-
"chest wall pain",
|
852 |
-
"chest was aching",
|
853 |
-
"chest without pains",
|
854 |
-
"chestpain",
|
855 |
-
"chst pain",
|
856 |
-
"cp",
|
857 |
-
"cps",
|
858 |
-
"heart area pain and pressure",
|
859 |
-
"heart still hurt",
|
860 |
-
"heart still hurts",
|
861 |
-
"hurt in my chest",
|
862 |
-
"hurting chest",
|
863 |
-
"hurts chest",
|
864 |
-
"needles feeling in the middle of my chest",
|
865 |
-
"pai chest",
|
866 |
-
"pain moving my chest",
|
867 |
-
"pain and pressure heart area",
|
868 |
-
"pain behind my breastbone",
|
869 |
-
"pain behind sternum",
|
870 |
-
"pain chest",
|
871 |
-
"pain in chest",
|
872 |
-
"pain in my chest",
|
873 |
-
"pain in the center of my chest",
|
874 |
-
"pain in the chest",
|
875 |
-
"pain into my chest",
|
876 |
-
"pain right in the chest",
|
877 |
-
"pain thoracic",
|
878 |
-
"painful sensation in my chest",
|
879 |
-
"somebody put a stone on my chest",
|
880 |
-
"soreness chest",
|
881 |
-
"sternum pain",
|
882 |
-
"stethalgia",
|
883 |
-
"thoracalgia",
|
884 |
-
"thoracic pain",
|
885 |
-
"thorax pain",
|
886 |
-
"thorax painful",
|
887 |
-
"twinges in my chest"
|
888 |
-
],
|
889 |
-
"Abruption": [
|
890 |
-
"abruption",
|
891 |
-
"abruptions",
|
892 |
-
"abruptuion",
|
893 |
-
"placental abruption",
|
894 |
-
"placental abrution"
|
895 |
-
],
|
896 |
-
"Dysphagia": [
|
897 |
-
"dyphagia",
|
898 |
-
"dyspagia",
|
899 |
-
"dysphagia",
|
900 |
-
"pain swallowing"
|
901 |
-
],
|
902 |
-
"Melena": [
|
903 |
-
"black tarry poo",
|
904 |
-
"black tarry stool",
|
905 |
-
"black tarry stools",
|
906 |
-
"dark liquid stool",
|
907 |
-
"meiena",
|
908 |
-
"melena",
|
909 |
-
"tarry poop"
|
910 |
-
],
|
911 |
-
"Exertional presyncope": [
|
912 |
-
"exertional presyncope"
|
913 |
-
],
|
914 |
-
"Extreme fatique": [
|
915 |
-
"extreme fatique"
|
916 |
-
],
|
917 |
-
"Hepatosplenomegalia": [
|
918 |
-
"hepatosplenomegalia"
|
919 |
-
],
|
920 |
-
"Drooling": [
|
921 |
-
"dribble",
|
922 |
-
"dribbles",
|
923 |
-
"dribbling",
|
924 |
-
"dripping saliva",
|
925 |
-
"drool",
|
926 |
-
"drooled",
|
927 |
-
"drooling",
|
928 |
-
"droolingâ",
|
929 |
-
"drooping saliva",
|
930 |
-
"excessive salivation",
|
931 |
-
"mouth watering",
|
932 |
-
"oversalivation",
|
933 |
-
"saliva dripping",
|
934 |
-
"saliva drooping",
|
935 |
-
"slobbering",
|
936 |
-
"watery mouth"
|
937 |
-
],
|
938 |
-
"Bendopnea": [
|
939 |
-
"bend down breathing is worse",
|
940 |
-
"bend down can't catch my breath",
|
941 |
-
"bend down gasping air",
|
942 |
-
"bend over difficulties catching air",
|
943 |
-
"bending down can't breathe",
|
944 |
-
"bending down difficulty in breathing",
|
945 |
-
"bendopnea",
|
946 |
-
"bendopnoea",
|
947 |
-
"breathing is worse bend down",
|
948 |
-
"can't breathe bending down",
|
949 |
-
"can't catch my breath bend down",
|
950 |
-
"difficulties catching air bend over",
|
951 |
-
"difficulty in breathing bending down",
|
952 |
-
"dyspnea when bending forward",
|
953 |
-
"dyspnoea when bending forward",
|
954 |
-
"gasping air bend down",
|
955 |
-
"leaning forward shortness of breath",
|
956 |
-
"shortness of breath leaning forward",
|
957 |
-
"shortness of breath when bending forward"
|
958 |
-
],
|
959 |
-
"Palpitations": [
|
960 |
-
"beating fast heart",
|
961 |
-
"chest fluttering",
|
962 |
-
"chest flutters",
|
963 |
-
"chest symptom palpitation",
|
964 |
-
"fast heart rate",
|
965 |
-
"fast pulse",
|
966 |
-
"feel heart beating",
|
967 |
-
"feeling heart beats",
|
968 |
-
"felt heart beating",
|
969 |
-
"felt heart beating",
|
970 |
-
"flip flopping heart beats",
|
971 |
-
"flopping in my chest",
|
972 |
-
"flopping in my heart",
|
973 |
-
"flutter heart",
|
974 |
-
"fluttering chest",
|
975 |
-
"fluttering feeling in my chest",
|
976 |
-
"fluttering in heart",
|
977 |
-
"forceful beating of the heart",
|
978 |
-
"heart beating fast",
|
979 |
-
"heart beating harder",
|
980 |
-
"heart flutter",
|
981 |
-
"heart racing",
|
982 |
-
"heart beating fast",
|
983 |
-
"heart beating harder",
|
984 |
-
"heart beats fast",
|
985 |
-
"heart beats so fast",
|
986 |
-
"heart beats very fast",
|
987 |
-
"heart fast",
|
988 |
-
"heart fluttering",
|
989 |
-
"heart flutters",
|
990 |
-
"heart has been racing",
|
991 |
-
"heart irregularities",
|
992 |
-
"heart is beating really fast",
|
993 |
-
"heart is beating so fast",
|
994 |
-
"heart is beating too fast",
|
995 |
-
"heart is beating too hard",
|
996 |
-
"heart is being pushed",
|
997 |
-
"heart is flip-flop ping",
|
998 |
-
"heart is fluttering",
|
999 |
-
"heart is pounding",
|
1000 |
-
"heart is pounding hard",
|
1001 |
-
"heart is throbbing",
|
1002 |
-
"heart pounding",
|
1003 |
-
"heart pumping",
|
1004 |
-
"heart race",
|
1005 |
-
"heart races",
|
1006 |
-
"heart racing",
|
1007 |
-
"heart throb",
|
1008 |
-
"heart throbbing",
|
1009 |
-
"heart throbs",
|
1010 |
-
"heart was pounding",
|
1011 |
-
"loud and irregular heartbeat",
|
1012 |
-
"my heart is racing",
|
1013 |
-
"paipitaitons",
|
1014 |
-
"palpatations",
|
1015 |
-
"palpiptations",
|
1016 |
-
"palpitaitons",
|
1017 |
-
"palpitation",
|
1018 |
-
"palpitation(s)",
|
1019 |
-
"palpitations",
|
1020 |
-
"palpitions",
|
1021 |
-
"palptiations",
|
1022 |
-
"pounding heart",
|
1023 |
-
"pulse fast",
|
1024 |
-
"pulse rapid",
|
1025 |
-
"quick heartbeat",
|
1026 |
-
"quick pulse",
|
1027 |
-
"racing heart",
|
1028 |
-
"racy heart",
|
1029 |
-
"rapid heart beat",
|
1030 |
-
"rapid heart rate",
|
1031 |
-
"rapid heartbeat",
|
1032 |
-
"rapid heartbeats",
|
1033 |
-
"rapid pulse"
|
1034 |
-
],
|
1035 |
-
"abdominal adiposity": [
|
1036 |
-
"abdominal adiposity"
|
1037 |
-
],
|
1038 |
-
"Hypotension": [
|
1039 |
-
"hyotension",
|
1040 |
-
"hypopiesis",
|
1041 |
-
"hypotension",
|
1042 |
-
"hypotensive diseases",
|
1043 |
-
"hypotenstion",
|
1044 |
-
"vascular hypotensive disorder"
|
1045 |
-
],
|
1046 |
-
"Polydipsia": [
|
1047 |
-
"cottonmouth",
|
1048 |
-
"drink more water",
|
1049 |
-
"drinking more water",
|
1050 |
-
"dry mouth",
|
1051 |
-
"dry tongue",
|
1052 |
-
"excessive fluid consumption",
|
1053 |
-
"excessive fluid intake",
|
1054 |
-
"excessive thirst",
|
1055 |
-
"extreme thirst",
|
1056 |
-
"hydrodipsomania",
|
1057 |
-
"i drink lots of water",
|
1058 |
-
"i feel thirsty",
|
1059 |
-
"mouth is dry",
|
1060 |
-
"polydinsia",
|
1061 |
-
"polydipsia",
|
1062 |
-
"polydipsias",
|
1063 |
-
"polydypsia",
|
1064 |
-
"thirst",
|
1065 |
-
"thirst excessive",
|
1066 |
-
"thirsty"
|
1067 |
-
],
|
1068 |
-
"slurred speech": [
|
1069 |
-
"abnormal speech",
|
1070 |
-
"clipped speech",
|
1071 |
-
"confused speech",
|
1072 |
-
"delayed speech",
|
1073 |
-
"difficulty speaking",
|
1074 |
-
"difficulty talking",
|
1075 |
-
"dysarthria",
|
1076 |
-
"scamping speech",
|
1077 |
-
"slur speech",
|
1078 |
-
"slurred speech",
|
1079 |
-
"slurred speach",
|
1080 |
-
"slurred speech",
|
1081 |
-
"slurred words",
|
1082 |
-
"slurring speech",
|
1083 |
-
"slurring words",
|
1084 |
-
"speech slurred",
|
1085 |
-
"speech disorders",
|
1086 |
-
"speech is slurred",
|
1087 |
-
"speech slur",
|
1088 |
-
"speech slurred",
|
1089 |
-
"speech-slurring",
|
1090 |
-
"trouble speaking",
|
1091 |
-
"trouble with speech"
|
1092 |
-
],
|
1093 |
-
"Difficulty swallowing": [
|
1094 |
-
"able to swallow",
|
1095 |
-
"difficult to swallow",
|
1096 |
-
"difficulty sw allowing",
|
1097 |
-
"difficulty swalloing",
|
1098 |
-
"difficulty swallow ing",
|
1099 |
-
"difficulty swallowing"
|
1100 |
-
],
|
1101 |
-
"Neutropenia": [
|
1102 |
-
"neutropenia",
|
1103 |
-
"neutropenias",
|
1104 |
-
"neutropenic disorder",
|
1105 |
-
"neutrophils decreased"
|
1106 |
-
],
|
1107 |
-
"Exertional fatigue": [
|
1108 |
-
"exertional fatigue",
|
1109 |
-
"fatigue exertional",
|
1110 |
-
"post-exertional fatigue"
|
1111 |
-
],
|
1112 |
-
"Presyncope": [
|
1113 |
-
"about to faint",
|
1114 |
-
"about to lose consciousness",
|
1115 |
-
"almost fainted",
|
1116 |
-
"almost had syncope",
|
1117 |
-
"almost lost consciousness",
|
1118 |
-
"almost passed out",
|
1119 |
-
"almost passes out",
|
1120 |
-
"close to fainting",
|
1121 |
-
"close to losing consciousness",
|
1122 |
-
"close to passing out",
|
1123 |
-
"fainting near",
|
1124 |
-
"feel like pass out",
|
1125 |
-
"feel like passing out",
|
1126 |
-
"going loose my consciousness",
|
1127 |
-
"going to pass out",
|
1128 |
-
"going to faint",
|
1129 |
-
"going to pass out",
|
1130 |
-
"gonna pass out",
|
1131 |
-
"i almost fainted",
|
1132 |
-
"i am passing out",
|
1133 |
-
"i feel like i am passing out",
|
1134 |
-
"i was gonna fall",
|
1135 |
-
"loose my consciousness going",
|
1136 |
-
"loosing consciousness",
|
1137 |
-
"near fainting",
|
1138 |
-
"near syncopal episode",
|
1139 |
-
"near syncopal episodes",
|
1140 |
-
"near syncope",
|
1141 |
-
"near-syncope",
|
1142 |
-
"nearly fainted",
|
1143 |
-
"nearly had syncope",
|
1144 |
-
"nearly lost consciousness",
|
1145 |
-
"pass out feel like",
|
1146 |
-
"pre syncope",
|
1147 |
-
"pre-syncope",
|
1148 |
-
"presyncopal episode",
|
1149 |
-
"presyncopal episodes",
|
1150 |
-
"presyncope",
|
1151 |
-
"presyncopes",
|
1152 |
-
"pretty fuzzy",
|
1153 |
-
"tunnel vision"
|
1154 |
-
],
|
1155 |
-
"Telangiectasia": [
|
1156 |
-
"telangiectasia"
|
1157 |
-
],
|
1158 |
-
"Diplopia": [
|
1159 |
-
"diplopia",
|
1160 |
-
"diplopias",
|
1161 |
-
"dplopia",
|
1162 |
-
"i see everything double",
|
1163 |
-
"seeing double images (diplopia)"
|
1164 |
-
],
|
1165 |
-
"murmur of mitral regurgitation": [
|
1166 |
-
"murmur of mitral regurgitation"
|
1167 |
-
],
|
1168 |
-
"Epigastric pain": [
|
1169 |
-
"abdominal pain in the central upper belly",
|
1170 |
-
"achy epigastric",
|
1171 |
-
"epiagastric pain",
|
1172 |
-
"epigastic pain",
|
1173 |
-
"epigastralgia",
|
1174 |
-
"epigastric",
|
1175 |
-
"epigastric abdominal pain",
|
1176 |
-
"epigastric ache",
|
1177 |
-
"epigastric pain",
|
1178 |
-
"epigastrium pain",
|
1179 |
-
"epigstric pain",
|
1180 |
-
"pain epigastric",
|
1181 |
-
"pain in epigastrium",
|
1182 |
-
"pain in the upper abdomen"
|
1183 |
-
],
|
1184 |
-
"Peripheral Hypoperfusion": [
|
1185 |
-
"peripheral hypoperfusion"
|
1186 |
-
],
|
1187 |
-
"Sweating": [
|
1188 |
-
"body is sweaty",
|
1189 |
-
"drenching sweat",
|
1190 |
-
"dripping with sweat",
|
1191 |
-
"hidropoiesis",
|
1192 |
-
"hidrosis",
|
1193 |
-
"perspiration",
|
1194 |
-
"perspired",
|
1195 |
-
"perspiring",
|
1196 |
-
"sweat",
|
1197 |
-
"sweat on my forehead",
|
1198 |
-
"sweated",
|
1199 |
-
"sweating",
|
1200 |
-
"sweats",
|
1201 |
-
"sweaty"
|
1202 |
-
],
|
1203 |
-
"Stable angina": [
|
1204 |
-
"angina chronic stable",
|
1205 |
-
"angina stable",
|
1206 |
-
"exertional angina",
|
1207 |
-
"stable angina",
|
1208 |
-
"stable anginas",
|
1209 |
-
"stable chronic angina"
|
1210 |
-
],
|
1211 |
-
"Exertional dyspnea": [
|
1212 |
-
"chest gets so heavy in my exercise",
|
1213 |
-
"chest hurts every time i carry",
|
1214 |
-
"dyspneic with exertion",
|
1215 |
-
"exertional dyspnea",
|
1216 |
-
"neck and jaw get tight when i shovel",
|
1217 |
-
"pain by my shoulder blade in aerobics",
|
1218 |
-
"shortness of breath on exertion",
|
1219 |
-
"shortness of breath on moderate exertion",
|
1220 |
-
"tight when i climbed"
|
1221 |
-
],
|
1222 |
-
"Erythema": [
|
1223 |
-
"cutaneous redness",
|
1224 |
-
"enthema",
|
1225 |
-
"ertyhema",
|
1226 |
-
"ertythema",
|
1227 |
-
"erythea",
|
1228 |
-
"erythema",
|
1229 |
-
"erythemas",
|
1230 |
-
"erythematous condition",
|
1231 |
-
"erythematous conditions",
|
1232 |
-
"erythematous disorder",
|
1233 |
-
"erythma",
|
1234 |
-
"eythema",
|
1235 |
-
"injection (erythema)",
|
1236 |
-
"red skin",
|
1237 |
-
"redness of skin",
|
1238 |
-
"redness skin",
|
1239 |
-
"skin red",
|
1240 |
-
"skin reddened",
|
1241 |
-
"skin redness",
|
1242 |
-
"unusual change in color of skin to red (erythema)"
|
1243 |
-
],
|
1244 |
-
"Audible S3": [
|
1245 |
-
"audible s3"
|
1246 |
-
],
|
1247 |
-
"murmur of Tricuspid regurgitation": [
|
1248 |
-
"murmur of tricuspid regurgitation"
|
1249 |
-
],
|
1250 |
-
"Fatigue": [
|
1251 |
-
"decrease in energy",
|
1252 |
-
"decreased energy",
|
1253 |
-
"energy decreased",
|
1254 |
-
"energy loss",
|
1255 |
-
"exhausted",
|
1256 |
-
"exhaustion",
|
1257 |
-
"exhaustuion",
|
1258 |
-
"extremely tired",
|
1259 |
-
"fatig",
|
1260 |
-
"fatigue",
|
1261 |
-
"fatigued",
|
1262 |
-
"fatigues",
|
1263 |
-
"fatigueâ",
|
1264 |
-
"fatiguing",
|
1265 |
-
"fatique",
|
1266 |
-
"feeling of total lack of energy",
|
1267 |
-
"has no strength",
|
1268 |
-
"have no strength",
|
1269 |
-
"i am drained",
|
1270 |
-
"i am weak",
|
1271 |
-
"i am weaker",
|
1272 |
-
"i feel drained",
|
1273 |
-
"intense lack of energy",
|
1274 |
-
"lack of energy",
|
1275 |
-
"lacking energy",
|
1276 |
-
"lacking in energy",
|
1277 |
-
"loss of energy",
|
1278 |
-
"severe tiredness",
|
1279 |
-
"sluggish",
|
1280 |
-
"unusual lack of energy",
|
1281 |
-
"weariness",
|
1282 |
-
"worn out"
|
1283 |
-
],
|
1284 |
-
"Drowsiness": [
|
1285 |
-
"drowiness",
|
1286 |
-
"drowsiness",
|
1287 |
-
"drowsy",
|
1288 |
-
"sleepiness",
|
1289 |
-
"somnolence",
|
1290 |
-
"somnolence (sleepiness)",
|
1291 |
-
"somnolent"
|
1292 |
-
],
|
1293 |
-
"Hepatojugular Reflux": [
|
1294 |
-
"hepatojugular reflux"
|
1295 |
-
],
|
1296 |
-
"Increase of physical activity": [
|
1297 |
-
"increase of physical activity"
|
1298 |
-
],
|
1299 |
-
"Black stool": [
|
1300 |
-
"black stool",
|
1301 |
-
"black faeces",
|
1302 |
-
"black stool",
|
1303 |
-
"black stools",
|
1304 |
-
"stool black",
|
1305 |
-
"stool is dark"
|
1306 |
-
],
|
1307 |
-
"Exertional syncope": [
|
1308 |
-
"exertional syncope"
|
1309 |
-
],
|
1310 |
-
"Rhinitis": [
|
1311 |
-
"inflammation of nasal passage",
|
1312 |
-
"nasal catarrh",
|
1313 |
-
"nasal catarrhs",
|
1314 |
-
"rhinitides",
|
1315 |
-
"rhinitis"
|
1316 |
-
],
|
1317 |
-
"Hypokalemia": [
|
1318 |
-
"deficiency k",
|
1319 |
-
"deficiency potassium",
|
1320 |
-
"hypokalaemia",
|
1321 |
-
"hypokalaemic syndrome",
|
1322 |
-
"hypokalemia",
|
1323 |
-
"hypokalemias",
|
1324 |
-
"hypokalemic disorder",
|
1325 |
-
"hypokalemic syndrome",
|
1326 |
-
"hypopotassaemia",
|
1327 |
-
"hypopotassemia",
|
1328 |
-
"hypopotassemias",
|
1329 |
-
"k deficiency",
|
1330 |
-
"low potassium syndrome",
|
1331 |
-
"potassium [k] deficiency",
|
1332 |
-
"potassium deficiency",
|
1333 |
-
"potassium depletion",
|
1334 |
-
"syndrome hypokalaemic",
|
1335 |
-
"syndrome hypokalemic"
|
1336 |
-
],
|
1337 |
-
"Supraventricular tachycardia": [
|
1338 |
-
"supraventricular tachycardia",
|
1339 |
-
"supraventricular tachycardias",
|
1340 |
-
"svt",
|
1341 |
-
"svts",
|
1342 |
-
"tachycardia supraventricular"
|
1343 |
-
],
|
1344 |
-
"Severe dizziness": [
|
1345 |
-
"severe dizziness"
|
1346 |
-
],
|
1347 |
-
"Atrial tachycardia": [
|
1348 |
-
"atrial tachycardia",
|
1349 |
-
"atrial tachycardias",
|
1350 |
-
"tachycardia atrial"
|
1351 |
-
],
|
1352 |
-
"Dizziness when standing": [
|
1353 |
-
"dizziness when standing",
|
1354 |
-
"dizziness with standing",
|
1355 |
-
"dizzy when standing",
|
1356 |
-
"when standing dizzy"
|
1357 |
-
],
|
1358 |
-
"Tinnitus": [
|
1359 |
-
"ear noise",
|
1360 |
-
"ear noises",
|
1361 |
-
"ear ringing",
|
1362 |
-
"ear ringing sound",
|
1363 |
-
"ears ringing",
|
1364 |
-
"ears noises",
|
1365 |
-
"ears ring",
|
1366 |
-
"ears ringing",
|
1367 |
-
"in my ear ringing",
|
1368 |
-
"noise in ears",
|
1369 |
-
"noises in ear",
|
1370 |
-
"noises in head",
|
1371 |
-
"ringing in my ear",
|
1372 |
-
"ringing in ears",
|
1373 |
-
"ringing in ear",
|
1374 |
-
"ringing in ears",
|
1375 |
-
"ringing in the ear",
|
1376 |
-
"ringing in the ears",
|
1377 |
-
"ringing in the ears (tinnitus)",
|
1378 |
-
"ringing inthe ears",
|
1379 |
-
"ringing of ears",
|
1380 |
-
"ringing-buzzing-tinnitus",
|
1381 |
-
"ringing/buzzing/tinnitus",
|
1382 |
-
"tiinitus",
|
1383 |
-
"tinnitus"
|
1384 |
-
],
|
1385 |
-
"Rest dyspnea": [
|
1386 |
-
"rest dyspnea"
|
1387 |
-
],
|
1388 |
-
"Congestion": [
|
1389 |
-
"breathe through my mouth",
|
1390 |
-
"bunged up",
|
1391 |
-
"clogged nose",
|
1392 |
-
"clogged nostril",
|
1393 |
-
"clogged sinuses",
|
1394 |
-
"clogged up",
|
1395 |
-
"congastad",
|
1396 |
-
"congesion",
|
1397 |
-
"congested",
|
1398 |
-
"congestion",
|
1399 |
-
"congestions",
|
1400 |
-
"congsetion",
|
1401 |
-
"dryness in my sinuses",
|
1402 |
-
"i am congested",
|
1403 |
-
"i am not stuffed",
|
1404 |
-
"i can't breathe through my nose",
|
1405 |
-
"no nasal breathing",
|
1406 |
-
"nose breathing",
|
1407 |
-
"nose stuffed",
|
1408 |
-
"nose block",
|
1409 |
-
"nose blocks",
|
1410 |
-
"nose is all stuffed up",
|
1411 |
-
"nose is blocked",
|
1412 |
-
"nose is clogged",
|
1413 |
-
"nose is congested",
|
1414 |
-
"sinuress pressure",
|
1415 |
-
"sinus pressure",
|
1416 |
-
"sinus pressureâ",
|
1417 |
-
"sniffle",
|
1418 |
-
"sniffles",
|
1419 |
-
"sniffling",
|
1420 |
-
"stuffed nose",
|
1421 |
-
"stuffed up",
|
1422 |
-
"stuffiness",
|
1423 |
-
"stuffing nose",
|
1424 |
-
"stuffy",
|
1425 |
-
"stufy",
|
1426 |
-
"stuuf nose",
|
1427 |
-
"through the nose"
|
1428 |
-
],
|
1429 |
-
"Lightheadedness": [
|
1430 |
-
"head feeling light",
|
1431 |
-
"headed light",
|
1432 |
-
"headed lighted",
|
1433 |
-
"headedness light",
|
1434 |
-
"ightheadedness",
|
1435 |
-
"lighheadedness",
|
1436 |
-
"lighhtheaded",
|
1437 |
-
"light - headed",
|
1438 |
-
"light head",
|
1439 |
-
"light headed",
|
1440 |
-
"light headedness",
|
1441 |
-
"light-headed",
|
1442 |
-
"light-headed feeling",
|
1443 |
-
"light-headedness",
|
1444 |
-
"lighthead",
|
1445 |
-
"lightheaded",
|
1446 |
-
"lightheadedness",
|
1447 |
-
"lightheadness",
|
1448 |
-
"lightheaedness",
|
1449 |
-
"lite headed",
|
1450 |
-
"loss of equilibrium",
|
1451 |
-
"reeling sensation"
|
1452 |
-
],
|
1453 |
-
"Ear ache": [
|
1454 |
-
"ear ache",
|
1455 |
-
"ear aches",
|
1456 |
-
"ear hurts",
|
1457 |
-
"ear pain",
|
1458 |
-
"earache",
|
1459 |
-
"ears hurt",
|
1460 |
-
"issue with my ear",
|
1461 |
-
"otalgia"
|
1462 |
-
],
|
1463 |
-
"Hypoxia": [
|
1464 |
-
"hypoixa",
|
1465 |
-
"hypoxia",
|
1466 |
-
"hypoxic"
|
1467 |
-
],
|
1468 |
-
"Insomnia": [
|
1469 |
-
"could not sleep",
|
1470 |
-
"did not sleep night",
|
1471 |
-
"difficulty sleeping",
|
1472 |
-
"had no sleep",
|
1473 |
-
"hard night to fall a sleep",
|
1474 |
-
"i can't sleep at night",
|
1475 |
-
"i do not sleep",
|
1476 |
-
"insomnia",
|
1477 |
-
"losing sleep",
|
1478 |
-
"not sleep well",
|
1479 |
-
"not sleeping concerns",
|
1480 |
-
"not sleeping well",
|
1481 |
-
"not slept at all"
|
1482 |
-
],
|
1483 |
-
"Disorientation": [
|
1484 |
-
"disorientation"
|
1485 |
-
],
|
1486 |
-
"Blue lips": [
|
1487 |
-
"blue lip",
|
1488 |
-
"blue lips",
|
1489 |
-
"bluish lips",
|
1490 |
-
"cyanosis lips",
|
1491 |
-
"cyanosis of lip",
|
1492 |
-
"cyanosis of lips",
|
1493 |
-
"cyanotic lips",
|
1494 |
-
"labial cyanosis",
|
1495 |
-
"lip color blue",
|
1496 |
-
"lip cyanosis",
|
1497 |
-
"lip cyanotic",
|
1498 |
-
"lips are blue",
|
1499 |
-
"lips are bluish",
|
1500 |
-
"lips are purple",
|
1501 |
-
"lips blue",
|
1502 |
-
"lips cyanosed",
|
1503 |
-
"lips look bluish"
|
1504 |
-
],
|
1505 |
-
"Agitation": [
|
1506 |
-
"abnormal excitement",
|
1507 |
-
"agitated",
|
1508 |
-
"agitated behavior",
|
1509 |
-
"agitated behaviour",
|
1510 |
-
"agitation",
|
1511 |
-
"alot more restless",
|
1512 |
-
"excitement abnormal",
|
1513 |
-
"feathers are ruffled for no reason",
|
1514 |
-
"feeling agitated",
|
1515 |
-
"frantic",
|
1516 |
-
"i am so irritated",
|
1517 |
-
"kind of going crazy",
|
1518 |
-
"perturbed",
|
1519 |
-
"pulling my hair out",
|
1520 |
-
"restlessness",
|
1521 |
-
"unable to keep still",
|
1522 |
-
"vegitation"
|
1523 |
-
],
|
1524 |
-
"Junctional bradycardia": [
|
1525 |
-
"junctional bradycardia"
|
1526 |
-
],
|
1527 |
-
"Blue face": [
|
1528 |
-
"blue face",
|
1529 |
-
"bluish face",
|
1530 |
-
"face is blue"
|
1531 |
-
],
|
1532 |
-
"Malaise": [
|
1533 |
-
"malaise",
|
1534 |
-
"malaised",
|
1535 |
-
"maliase"
|
1536 |
-
],
|
1537 |
-
"Symptomatic palpitations": [
|
1538 |
-
"symptomatic palpitations"
|
1539 |
-
],
|
1540 |
-
"Constipation": [
|
1541 |
-
"constipate",
|
1542 |
-
"constipated",
|
1543 |
-
"constipating",
|
1544 |
-
"constipation",
|
1545 |
-
"contipation",
|
1546 |
-
"costiveness",
|
1547 |
-
"difficult passing motion",
|
1548 |
-
"difficulty defaecating",
|
1549 |
-
"difficulty defecating",
|
1550 |
-
"difficulty opening bowels",
|
1551 |
-
"difficulty passing stool",
|
1552 |
-
"have not done a crap",
|
1553 |
-
"no bowel movement",
|
1554 |
-
"trouble passing stool"
|
1555 |
-
],
|
1556 |
-
"Shortness of breath at rest": [
|
1557 |
-
"any difficulty in breathing rest",
|
1558 |
-
"shortness of breath at rest"
|
1559 |
-
],
|
1560 |
-
"Hallucination": [
|
1561 |
-
"feel like bugs are crawling up",
|
1562 |
-
"hallucina-tions",
|
1563 |
-
"hallucinating",
|
1564 |
-
"hallucination",
|
1565 |
-
"hallucinations",
|
1566 |
-
"hallucincations",
|
1567 |
-
"hallucintions",
|
1568 |
-
"hear strange voice",
|
1569 |
-
"hearing music but nothing is playing",
|
1570 |
-
"hearing the door bell but no one is there",
|
1571 |
-
"hearing things no one else hears",
|
1572 |
-
"hearing voices or seeing things",
|
1573 |
-
"i am hearing voices",
|
1574 |
-
"see delusions",
|
1575 |
-
"see things that can't be real",
|
1576 |
-
"seeing things that are not there",
|
1577 |
-
"smelling my friends perfume but she's not here",
|
1578 |
-
"voices in my head"
|
1579 |
-
],
|
1580 |
-
"Runny nose": [
|
1581 |
-
"blowing my nose",
|
1582 |
-
"blowing nose",
|
1583 |
-
"coryza",
|
1584 |
-
"fluid out of my nose",
|
1585 |
-
"mucus from sinuses",
|
1586 |
-
"nasal discharge",
|
1587 |
-
"nasal drainage",
|
1588 |
-
"nasal drip",
|
1589 |
-
"need to blow my nose",
|
1590 |
-
"nose running",
|
1591 |
-
"nose runny",
|
1592 |
-
"nose blowing",
|
1593 |
-
"nose is runny",
|
1594 |
-
"nose is dripping",
|
1595 |
-
"nose is running",
|
1596 |
-
"nose is runny",
|
1597 |
-
"nose running",
|
1598 |
-
"nose runs",
|
1599 |
-
"nosie running",
|
1600 |
-
"running nose",
|
1601 |
-
"running nosie",
|
1602 |
-
"running noise",
|
1603 |
-
"running nose",
|
1604 |
-
"runny nose",
|
1605 |
-
"runny nose is",
|
1606 |
-
"runny nese",
|
1607 |
-
"runny nose",
|
1608 |
-
"runny rose",
|
1609 |
-
"runnynose",
|
1610 |
-
"sneeze",
|
1611 |
-
"sneezed",
|
1612 |
-
"sneezing",
|
1613 |
-
"sniffle",
|
1614 |
-
"sniffles",
|
1615 |
-
"sniffling",
|
1616 |
-
"snotty",
|
1617 |
-
"unable to breathe through my nose"
|
1618 |
-
],
|
1619 |
-
"Heartburn": [
|
1620 |
-
"acidity",
|
1621 |
-
"burning chest",
|
1622 |
-
"burning reflux",
|
1623 |
-
"chest burning",
|
1624 |
-
"heart burn",
|
1625 |
-
"heartbum",
|
1626 |
-
"heartburn",
|
1627 |
-
"pyroses",
|
1628 |
-
"pyrosis"
|
1629 |
-
],
|
1630 |
-
"Rash": [
|
1631 |
-
"ragh",
|
1632 |
-
"rash",
|
1633 |
-
"rashas",
|
1634 |
-
"rashes",
|
1635 |
-
"red sores parts of my body",
|
1636 |
-
"red splotches foot"
|
1637 |
-
],
|
1638 |
-
"Systemic pain": [
|
1639 |
-
"generalized pain",
|
1640 |
-
"generalized pains",
|
1641 |
-
"systemic pain"
|
1642 |
-
],
|
1643 |
-
"Heart murmur": [
|
1644 |
-
"cardiac murmer",
|
1645 |
-
"cardiac murmur",
|
1646 |
-
"cardiac murmurs",
|
1647 |
-
"heart mumur",
|
1648 |
-
"heart murmur",
|
1649 |
-
"heart murmuring",
|
1650 |
-
"heart murmurs",
|
1651 |
-
"heart/arterial murmur nos",
|
1652 |
-
"mumurs",
|
1653 |
-
"murmer",
|
1654 |
-
"murmers",
|
1655 |
-
"murmrus",
|
1656 |
-
"murmur",
|
1657 |
-
"murmurs",
|
1658 |
-
"murmus"
|
1659 |
-
],
|
1660 |
-
"Acute Dyspnea": [
|
1661 |
-
"acute dyspnea",
|
1662 |
-
"acute dyspnoea",
|
1663 |
-
"dyspnea acute"
|
1664 |
-
],
|
1665 |
-
"Symptoms of hypoglycemia": [
|
1666 |
-
"symptoms of hypoglycemia"
|
1667 |
-
],
|
1668 |
-
"Paraesthesia": [
|
1669 |
-
"face is tingling",
|
1670 |
-
"meralgia paresthetica",
|
1671 |
-
"paraesthesia",
|
1672 |
-
"prickling sensation of my face"
|
1673 |
-
],
|
1674 |
-
"Severe symptoms of hypotension": [
|
1675 |
-
"severe symptoms of hypotension"
|
1676 |
-
],
|
1677 |
-
"Systemic inflammatory response syndrome": [
|
1678 |
-
"abacteraemic sepsis",
|
1679 |
-
"culture-negative sepsis",
|
1680 |
-
"sepsis syndrome",
|
1681 |
-
"sepsis syndromes",
|
1682 |
-
"septic syndrome",
|
1683 |
-
"sirs - system inflammatory response syndrome",
|
1684 |
-
"syndrome sepsis",
|
1685 |
-
"systemic inflammatory response syndrome"
|
1686 |
-
],
|
1687 |
-
"Severe symptoms of tachycardia": [
|
1688 |
-
"severe symptoms of tachycardia"
|
1689 |
-
],
|
1690 |
-
"Severe symptoms of BP or HR out of range": [
|
1691 |
-
"severe symptoms of blood pressure or hr out of range",
|
1692 |
-
"severe symptoms of bp or hr out of range"
|
1693 |
-
],
|
1694 |
-
"New or worsening pain": [
|
1695 |
-
"badly hurting",
|
1696 |
-
"hurting badly",
|
1697 |
-
"keep having pains",
|
1698 |
-
"new or worsening pain"
|
1699 |
-
],
|
1700 |
-
"Symptoms of tachycardia": [
|
1701 |
-
"symptoms of tachycardia"
|
1702 |
-
],
|
1703 |
-
"Symptoms of hyperglycemic crisis": [
|
1704 |
-
"symptoms of hyperglycemic crisis"
|
1705 |
-
],
|
1706 |
-
"Tired": [
|
1707 |
-
"listless",
|
1708 |
-
"low energy",
|
1709 |
-
"tatt",
|
1710 |
-
"tiered",
|
1711 |
-
"tired",
|
1712 |
-
"tiredness",
|
1713 |
-
"tiring",
|
1714 |
-
"trired"
|
1715 |
-
],
|
1716 |
-
"Tingling": [
|
1717 |
-
"tingally",
|
1718 |
-
"tingling",
|
1719 |
-
"tingly",
|
1720 |
-
"tinkling feeling"
|
1721 |
-
],
|
1722 |
-
"Lymphedema": [
|
1723 |
-
"chronic lymphovenous insufficiency",
|
1724 |
-
"lymph edema",
|
1725 |
-
"lymphandema",
|
1726 |
-
"lymphatic edema",
|
1727 |
-
"lymphatic oedema",
|
1728 |
-
"lymphedema",
|
1729 |
-
"lymphedemas",
|
1730 |
-
"lymphoedema",
|
1731 |
-
"lymphoedemas",
|
1732 |
-
"oedema lymphatic"
|
1733 |
-
],
|
1734 |
-
"Severe headache features": [
|
1735 |
-
"like hammer hit my head",
|
1736 |
-
"severe headache features"
|
1737 |
-
],
|
1738 |
-
"Meteorism": [
|
1739 |
-
"bloated",
|
1740 |
-
"bloating",
|
1741 |
-
"excessive gas",
|
1742 |
-
"feel gassy",
|
1743 |
-
"flatulence",
|
1744 |
-
"gassy feel",
|
1745 |
-
"meteorism"
|
1746 |
-
],
|
1747 |
-
"Diabetes mellitus symptoms confirmation": [
|
1748 |
-
"diabetes mellitus symptoms confirmation"
|
1749 |
-
],
|
1750 |
-
"Vaginismus": [
|
1751 |
-
"vaginismus"
|
1752 |
-
],
|
1753 |
-
"Nonsevere symptoms of hyperglycemia": [
|
1754 |
-
"nonsevere symptoms of hyperglycemia"
|
1755 |
-
],
|
1756 |
-
"Itching": [
|
1757 |
-
"itch",
|
1758 |
-
"itches",
|
1759 |
-
"itchi",
|
1760 |
-
"itchiness",
|
1761 |
-
"itching",
|
1762 |
-
"itchy",
|
1763 |
-
"pruritus",
|
1764 |
-
"pschy"
|
1765 |
-
],
|
1766 |
-
"Hoarseness": [
|
1767 |
-
"croaky voice",
|
1768 |
-
"do not have voice",
|
1769 |
-
"hoarse",
|
1770 |
-
"hoarse voice",
|
1771 |
-
"hoarseness",
|
1772 |
-
"hoarsenesses",
|
1773 |
-
"husky voice",
|
1774 |
-
"losing voice",
|
1775 |
-
"lost voice",
|
1776 |
-
"no voice",
|
1777 |
-
"raspy voice",
|
1778 |
-
"voice in and out",
|
1779 |
-
"voice chance",
|
1780 |
-
"voice change",
|
1781 |
-
"voice changes",
|
1782 |
-
"voice problems"
|
1783 |
-
],
|
1784 |
-
"Wheezing": [
|
1785 |
-
"breathing whistling",
|
1786 |
-
"lungs rattle",
|
1787 |
-
"rattle lungs",
|
1788 |
-
"wheeang",
|
1789 |
-
"wheeze",
|
1790 |
-
"wheezed",
|
1791 |
-
"wheezes",
|
1792 |
-
"wheezin",
|
1793 |
-
"wheezing",
|
1794 |
-
"wheezings",
|
1795 |
-
"wheezy",
|
1796 |
-
"whesaing",
|
1797 |
-
"whistling breathing"
|
1798 |
-
],
|
1799 |
-
"Stiffness": [
|
1800 |
-
"stiff",
|
1801 |
-
"stiffness"
|
1802 |
-
],
|
1803 |
-
"Severe symptoms of bleeding": [
|
1804 |
-
"severe symptoms of bleeding"
|
1805 |
-
],
|
1806 |
-
"Signs or symptoms of PE/DVT": [
|
1807 |
-
"signs or symptoms of pe/dvt"
|
1808 |
-
],
|
1809 |
-
"Trismus": [
|
1810 |
-
"jaw spasm",
|
1811 |
-
"jaw spasms",
|
1812 |
-
"lockjaw",
|
1813 |
-
"pain of muscles of mastication",
|
1814 |
-
"trismus"
|
1815 |
-
],
|
1816 |
-
"Symptoms of local inflammation": [
|
1817 |
-
"symptoms of local inflammation"
|
1818 |
-
],
|
1819 |
-
"Vertigo": [
|
1820 |
-
"feel i'm spinning round",
|
1821 |
-
"feel like things moving",
|
1822 |
-
"head revolving around",
|
1823 |
-
"head revolving round",
|
1824 |
-
"head spinning",
|
1825 |
-
"room is spinning",
|
1826 |
-
"room is spinning around",
|
1827 |
-
"rotation of self",
|
1828 |
-
"spinning sensation",
|
1829 |
-
"spinning sensations",
|
1830 |
-
"things are moving",
|
1831 |
-
"things are spinning",
|
1832 |
-
"verligo",
|
1833 |
-
"vertigo",
|
1834 |
-
"vertigos"
|
1835 |
-
]
|
1836 |
-
}
|
|
|
1 |
{
|
2 |
+
"Pain": [
|
3 |
+
"ache",
|
4 |
+
"aches",
|
5 |
+
"achey",
|
6 |
+
"aching",
|
7 |
+
"achy pain",
|
8 |
+
"arms burn",
|
9 |
+
"arthalgias",
|
10 |
+
"artharlgia",
|
11 |
+
"arthralgia",
|
12 |
+
"arthralgias",
|
13 |
+
"backache",
|
14 |
+
"backaches",
|
15 |
+
"dorsalgia",
|
16 |
+
"feeling achy",
|
17 |
+
"feels achy",
|
18 |
+
"feet hurt",
|
19 |
+
"felt achy",
|
20 |
+
"hurt",
|
21 |
+
"hurting",
|
22 |
+
"hurting worse",
|
23 |
+
"hurts",
|
24 |
+
"pain",
|
25 |
+
"painful",
|
26 |
+
"painful feeling",
|
27 |
+
"pains",
|
28 |
+
"paun",
|
29 |
+
"scratchy",
|
30 |
+
"sore",
|
31 |
+
"sores",
|
32 |
+
"spainful",
|
33 |
+
"twinge",
|
34 |
+
"twinges"
|
35 |
+
],
|
36 |
+
"Chest pain": [
|
37 |
+
"aches in my chest",
|
38 |
+
"achy , chest",
|
39 |
+
"angia",
|
40 |
+
"angina",
|
41 |
+
"burn in my chest",
|
42 |
+
"burning in the chest",
|
43 |
+
"chesl pain",
|
44 |
+
"chest , achy",
|
45 |
+
"chest , hurting",
|
46 |
+
"chest , hurts",
|
47 |
+
"chest , pai",
|
48 |
+
"chest , soreness",
|
49 |
+
"chest heard",
|
50 |
+
"chest hurt",
|
51 |
+
"chest hurts",
|
52 |
+
"chest is burning",
|
53 |
+
"chest just hurts",
|
54 |
+
"chest pain",
|
55 |
+
"chest pain at rest",
|
56 |
+
"chest pain or angina",
|
57 |
+
"chest pains",
|
58 |
+
"chest pains at rest",
|
59 |
+
"chest started to ache",
|
60 |
+
"chest twinges",
|
61 |
+
"chest wall pain",
|
62 |
+
"chest was aching",
|
63 |
+
"chest without pains",
|
64 |
+
"chestpain",
|
65 |
+
"chst pain",
|
66 |
+
"heart area , pain and pressure",
|
67 |
+
"heart still hurt",
|
68 |
+
"heart still hurts",
|
69 |
+
"hurt in my chest",
|
70 |
+
"hurting , chest",
|
71 |
+
"hurts , chest",
|
72 |
+
"needles feeling in the middle of my chest",
|
73 |
+
"pai , chest",
|
74 |
+
"pain , moving my chest",
|
75 |
+
"pain and pressure , heart area",
|
76 |
+
"pain behind my breastbone",
|
77 |
+
"pain behind sternum",
|
78 |
+
"pain in chest",
|
79 |
+
"pain in my chest",
|
80 |
+
"pain in the center of my chest",
|
81 |
+
"pain in the chest",
|
82 |
+
"pain into my chest",
|
83 |
+
"pain right in the chest",
|
84 |
+
"painful sensation in my chest",
|
85 |
+
"somebody put a stone on my chest",
|
86 |
+
"soreness , chest",
|
87 |
+
"sternum pain",
|
88 |
+
"twinges in my chest"
|
89 |
+
],
|
90 |
+
"Pleuritic chest pain": [
|
91 |
+
"breathe , starting to hurt",
|
92 |
+
"chest pain , with pleurisy",
|
93 |
+
"chest pain on breathing",
|
94 |
+
"chest pain while bending",
|
95 |
+
"chest wall pain , pleuritic",
|
96 |
+
"cp also pleuritic",
|
97 |
+
"deep breath pain",
|
98 |
+
"hurts to breathe",
|
99 |
+
"inhaling , pressure in the chest",
|
100 |
+
"pain , when inhaling",
|
101 |
+
"pain in the lungs",
|
102 |
+
"pain is pleuritic",
|
103 |
+
"pleuritic , chest wall pain",
|
104 |
+
"pleuritic chest pain",
|
105 |
+
"pleuritic chest pains",
|
106 |
+
"pleuritic chst pn",
|
107 |
+
"pleuritic right sided chest pain",
|
108 |
+
"pressure in the chest , inhaling",
|
109 |
+
"starting to hurt , breathe"
|
110 |
+
],
|
111 |
+
"Pain provoked by exertion": [
|
112 |
+
"pain , physical activity",
|
113 |
+
"pain , walking",
|
114 |
+
"pain by exertion",
|
115 |
+
"pain provoked by exertion",
|
116 |
+
"physical activity , pain"
|
117 |
+
],
|
118 |
+
"Physical Activity": [
|
119 |
+
"active with walks",
|
120 |
+
"actively walking",
|
121 |
+
"after taking a walk",
|
122 |
+
"been jogging",
|
123 |
+
"bikes 30 min",
|
124 |
+
"biking",
|
125 |
+
"block , jogged",
|
126 |
+
"blocks per day , walking",
|
127 |
+
"calisthenics",
|
128 |
+
"cleaning my yard",
|
129 |
+
"cycling",
|
130 |
+
"daily , walking",
|
131 |
+
"daily , walks",
|
132 |
+
"day of walking",
|
133 |
+
"doing the exercises",
|
134 |
+
"elliptical",
|
135 |
+
"every day , i walk",
|
136 |
+
"every day , jogging",
|
137 |
+
"every day , walking",
|
138 |
+
"every morning , walking",
|
139 |
+
"excercise",
|
140 |
+
"excerise",
|
141 |
+
"exercise",
|
142 |
+
"exercise , ultimate frisbee",
|
143 |
+
"exercise program",
|
144 |
+
"exercise regimen",
|
145 |
+
"exercise regularly",
|
146 |
+
"exercised",
|
147 |
+
"exercises",
|
148 |
+
"exercises regularly",
|
149 |
+
"exercises sporadically",
|
150 |
+
"exercises without symptoms",
|
151 |
+
"exercising",
|
152 |
+
"exercising regularly",
|
153 |
+
"flight of stairs",
|
154 |
+
"flights of stairs",
|
155 |
+
"go to the pool",
|
156 |
+
"gym",
|
157 |
+
"gym exercise",
|
158 |
+
"have not moved much",
|
159 |
+
"housecleaning",
|
160 |
+
"i am doings exercises",
|
161 |
+
"i walk , every day",
|
162 |
+
"i walk , miles",
|
163 |
+
"i walk everyday",
|
164 |
+
"i walked , miles",
|
165 |
+
"jogged , block",
|
166 |
+
"jogger",
|
167 |
+
"jogging , every day",
|
168 |
+
"just walked",
|
169 |
+
"just walking",
|
170 |
+
"long walk",
|
171 |
+
"mile walk",
|
172 |
+
"miles , i walk",
|
173 |
+
"miles , i walked",
|
174 |
+
"miles , walking",
|
175 |
+
"moderate exercise",
|
176 |
+
"moving more the usual",
|
177 |
+
"no activity",
|
178 |
+
"occasionally , walking",
|
179 |
+
"physical activities",
|
180 |
+
"physical activity",
|
181 |
+
"plays tennis",
|
182 |
+
"post workout",
|
183 |
+
"power walking",
|
184 |
+
"ran",
|
185 |
+
"ride my bike",
|
186 |
+
"run",
|
187 |
+
"running",
|
188 |
+
"runs 2-3 miles",
|
189 |
+
"short walk",
|
190 |
+
"start walking",
|
191 |
+
"started walking",
|
192 |
+
"stationary bike",
|
193 |
+
"swimming",
|
194 |
+
"swims",
|
195 |
+
"take a walk",
|
196 |
+
"taking a walk",
|
197 |
+
"tennis and walking",
|
198 |
+
"took , walk",
|
199 |
+
"treadmill , walking",
|
200 |
+
"twice a week , walking",
|
201 |
+
"ultimate frisbee , exercise",
|
202 |
+
"walk , daily",
|
203 |
+
"walk , mile",
|
204 |
+
"walk a few blocks",
|
205 |
+
"walk in the park",
|
206 |
+
"walk much",
|
207 |
+
"walked , miles",
|
208 |
+
"walked down , driveway and back",
|
209 |
+
"walking , blocks per day",
|
210 |
+
"walking , daily",
|
211 |
+
"walking , every day",
|
212 |
+
"walking , every morning",
|
213 |
+
"walking , miles",
|
214 |
+
"walking , occasionally",
|
215 |
+
"walking , treadmill",
|
216 |
+
"walking , twice a week",
|
217 |
+
"walking , walking occasionally",
|
218 |
+
"walking a few blocks",
|
219 |
+
"walking daily",
|
220 |
+
"walking much",
|
221 |
+
"walking occasionally , walking",
|
222 |
+
"walking program",
|
223 |
+
"walks , daily",
|
224 |
+
"walks , miles",
|
225 |
+
"walks a mile",
|
226 |
+
"weekly exercise",
|
227 |
+
"went to , store",
|
228 |
+
"working out",
|
229 |
+
"workout",
|
230 |
+
"workouts",
|
231 |
+
"works out",
|
232 |
+
"yoga"
|
233 |
+
],
|
234 |
+
"Physical Activity Limitation": [
|
235 |
+
"15-minute walk",
|
236 |
+
"able to do , activities",
|
237 |
+
"able to walk",
|
238 |
+
"can't even climb upstairs",
|
239 |
+
"can't even move",
|
240 |
+
"can't even vacuum my room",
|
241 |
+
"can't stand up",
|
242 |
+
"can't take 5-minutes run",
|
243 |
+
"excercise tolerance",
|
244 |
+
"exercise , limited",
|
245 |
+
"exercise tolerance",
|
246 |
+
"feels ok ambulating",
|
247 |
+
"hard to move",
|
248 |
+
"hard to work",
|
249 |
+
"i can't , walk",
|
250 |
+
"i can't move",
|
251 |
+
"limited , exercise",
|
252 |
+
"limited , physical activity",
|
253 |
+
"physical activities",
|
254 |
+
"physical activity",
|
255 |
+
"physical activity , limited",
|
256 |
+
"physical activity limitation",
|
257 |
+
"tired from 5-minutes run"
|
258 |
+
],
|
259 |
+
"Fatigue Threshold": [
|
260 |
+
"can not climb more than 1 flight",
|
261 |
+
"climbing stairs fatigue",
|
262 |
+
"exhausted",
|
263 |
+
"extremely tired",
|
264 |
+
"fatigue climbing stairs",
|
265 |
+
"fatigue threshold",
|
266 |
+
"have no strength",
|
267 |
+
"tire easily",
|
268 |
+
"weak"
|
269 |
+
],
|
270 |
+
"Chills": [
|
271 |
+
"chattering",
|
272 |
+
"chil",
|
273 |
+
"chill",
|
274 |
+
"chills",
|
275 |
+
"chils",
|
276 |
+
"coolness",
|
277 |
+
"i am freezing up",
|
278 |
+
"shivering",
|
279 |
+
"shivers"
|
280 |
+
],
|
281 |
+
"Office visit": [
|
282 |
+
"a complete physical",
|
283 |
+
"achedule an appointment",
|
284 |
+
"annual , scheduled",
|
285 |
+
"annual check up",
|
286 |
+
"annual check ups",
|
287 |
+
"annual checkup",
|
288 |
+
"annual physical",
|
289 |
+
"annual physicals",
|
290 |
+
"annual well visit",
|
291 |
+
"annual well visit exam",
|
292 |
+
"appointment , booked",
|
293 |
+
"appointment , canceled",
|
294 |
+
"appointment , cancelled",
|
295 |
+
"appointment , changed",
|
296 |
+
"appointment , scheduled",
|
297 |
+
"appointment , virtual",
|
298 |
+
"appointment schedule",
|
299 |
+
"appointment scheduled",
|
300 |
+
"appointments scheduled",
|
301 |
+
"apt , removed",
|
302 |
+
"booked , appointment",
|
303 |
+
"call , for appointment",
|
304 |
+
"cancel , appointment",
|
305 |
+
"canceled , appointment",
|
306 |
+
"cancelled , appointment",
|
307 |
+
"check up with , doctor",
|
308 |
+
"come , for appointment",
|
309 |
+
"do see , appointment",
|
310 |
+
"doctor , visit",
|
311 |
+
"for an appointment",
|
312 |
+
"for appointment , call",
|
313 |
+
"got , appointment",
|
314 |
+
"got you scheduled",
|
315 |
+
"had , appointment",
|
316 |
+
"have , appointment",
|
317 |
+
"have you scheduled",
|
318 |
+
"i had an appointment",
|
319 |
+
"i have an appointment",
|
320 |
+
"i have you rescheduled",
|
321 |
+
"made an appointment",
|
322 |
+
"made appointment",
|
323 |
+
"made appointment , acc",
|
324 |
+
"made appointments",
|
325 |
+
"make an appointment",
|
326 |
+
"make appointemt",
|
327 |
+
"make appointment",
|
328 |
+
"make appointment.",
|
329 |
+
"making an appointment",
|
330 |
+
"making appointment",
|
331 |
+
"my appointment",
|
332 |
+
"my doc , office",
|
333 |
+
"my doctor , office",
|
334 |
+
"next appointment",
|
335 |
+
"office , my doc",
|
336 |
+
"office , my doctor",
|
337 |
+
"office appointment",
|
338 |
+
"office visit",
|
339 |
+
"office visits",
|
340 |
+
"physical appointment",
|
341 |
+
"request , appointment",
|
342 |
+
"schedule an appointment",
|
343 |
+
"scheduled , annual",
|
344 |
+
"scheduled , appointment",
|
345 |
+
"scheduled an appointment",
|
346 |
+
"set up appointment",
|
347 |
+
"teleheaith",
|
348 |
+
"telehealth",
|
349 |
+
"telemed",
|
350 |
+
"virtual , appointment",
|
351 |
+
"visit , doctor",
|
352 |
+
"well checkup",
|
353 |
+
"wellness check",
|
354 |
+
"wellness visit",
|
355 |
+
"you are schedule",
|
356 |
+
"your appointment",
|
357 |
+
"your office"
|
358 |
+
],
|
359 |
+
"Chest discomfort": [
|
360 |
+
"burning sensation in chest",
|
361 |
+
"chest discomfort",
|
362 |
+
"chest heaviness",
|
363 |
+
"chest heavy",
|
364 |
+
"chest discomfort",
|
365 |
+
"chest heaviness",
|
366 |
+
"chest uneasiness",
|
367 |
+
"chestdiscomfort",
|
368 |
+
"disagreeable sensation in my chest",
|
369 |
+
"discomfort chest",
|
370 |
+
"discomfort side ribs",
|
371 |
+
"discomfort in chest",
|
372 |
+
"heaviness chest",
|
373 |
+
"heavy chest",
|
374 |
+
"heavy chest",
|
375 |
+
"hevy chest",
|
376 |
+
"side ribs discomfort"
|
377 |
+
],
|
378 |
+
"Chest pressure": [
|
379 |
+
"chest heaviness",
|
380 |
+
"chest pressure",
|
381 |
+
"chest tension",
|
382 |
+
"chest feels like weight on it",
|
383 |
+
"chest heaviness",
|
384 |
+
"chest pressure",
|
385 |
+
"front and back pressure",
|
386 |
+
"heart area pain and pressure",
|
387 |
+
"heaviness chest",
|
388 |
+
"heaviness in chest",
|
389 |
+
"numbness to chest",
|
390 |
+
"pain and pressure heart area",
|
391 |
+
"pressure chest",
|
392 |
+
"pressure front and back",
|
393 |
+
"pressure behind my chest",
|
394 |
+
"pressure in chest",
|
395 |
+
"pressure in my chest",
|
396 |
+
"pressure in the heart",
|
397 |
+
"pressure under my ribs",
|
398 |
+
"someone sitting on my chest",
|
399 |
+
"tense chest",
|
400 |
+
"tension chest",
|
401 |
+
"weight on it chest feels like"
|
402 |
+
],
|
403 |
+
"Chest tightness": [
|
404 |
+
"band-like chest",
|
405 |
+
"chest band-like",
|
406 |
+
"chest constricted",
|
407 |
+
"chest squeezing",
|
408 |
+
"chest tight",
|
409 |
+
"chest tightness",
|
410 |
+
"chest feels tight",
|
411 |
+
"chest felt tight",
|
412 |
+
"chest is feel tight",
|
413 |
+
"chest is closing",
|
414 |
+
"chest is not tight",
|
415 |
+
"chest is tight",
|
416 |
+
"chest pain is like a lightning bolt",
|
417 |
+
"chest tightness",
|
418 |
+
"constricted chest",
|
419 |
+
"squeezing chest",
|
420 |
+
"tight chest",
|
421 |
+
"tightness chest",
|
422 |
+
"tightness in chest",
|
423 |
+
"tightness in her chest",
|
424 |
+
"tightness in my chest"
|
425 |
+
],
|
426 |
+
"Dyspnea on exertion": [
|
427 |
+
"climbing severe shortness of breath",
|
428 |
+
"climbing shortness of breath",
|
429 |
+
"climbing up the stairs difficulty in breathing",
|
430 |
+
"dbysphea on exertion",
|
431 |
+
"difficulty in breathing climbing up the stairs",
|
432 |
+
"doe",
|
433 |
+
"during workouts shortness of breather",
|
434 |
+
"dyspnea on exertion",
|
435 |
+
"dyspnea during exertion",
|
436 |
+
"dyspnea exertion",
|
437 |
+
"dyspnea on exertion",
|
438 |
+
"dyspnea on exertion",
|
439 |
+
"dyspnea upon exertion",
|
440 |
+
"dyspnea with exercising",
|
441 |
+
"dyspnea with exertion",
|
442 |
+
"dyspneic on exertion",
|
443 |
+
"dyspneic with exertion",
|
444 |
+
"exercise short of breath",
|
445 |
+
"exertional shortness of breath",
|
446 |
+
"exertional shortness of breath",
|
447 |
+
"get out of breadth walking",
|
448 |
+
"heavy breathing walking",
|
449 |
+
"out of breath walking",
|
450 |
+
"severe shortness of breath climbing",
|
451 |
+
"shoriness of breath with exertion",
|
452 |
+
"short of breath exercise",
|
453 |
+
"short of breath on exertion",
|
454 |
+
"shortness of breath (shortness of breath) on exertion",
|
455 |
+
"shortness of breath climbing",
|
456 |
+
"shortness of breath going up",
|
457 |
+
"shortness of breath lift heavy",
|
458 |
+
"shortness of breath on exertion",
|
459 |
+
"shortness of breath sports",
|
460 |
+
"shortness of breath walking",
|
461 |
+
"shortness of breath when active",
|
462 |
+
"shortness of breath when i go up the stairs",
|
463 |
+
"shortness of breath with any exertion",
|
464 |
+
"shortness of breath with exertion",
|
465 |
+
"shortness of breath during exertion",
|
466 |
+
"shortness of breath exertion",
|
467 |
+
"shortness of breath on exertion",
|
468 |
+
"shortness of breath on ambulating",
|
469 |
+
"shortness of breath on exertion",
|
470 |
+
"shortness of breath upon exertion",
|
471 |
+
"shortness of breath with exertion",
|
472 |
+
"shortness of breather during workouts",
|
473 |
+
"sports shortness of breath",
|
474 |
+
"walking associated shortness of breath",
|
475 |
+
"walking get out of breadth",
|
476 |
+
"walking out of breath",
|
477 |
+
"when i go up the stairs shortness of breath"
|
478 |
+
],
|
479 |
+
"Hemoptysis": [
|
480 |
+
"blood phlegm",
|
481 |
+
"blood spit",
|
482 |
+
"blood spit up",
|
483 |
+
"blood cough",
|
484 |
+
"blood disappeared from my sputum",
|
485 |
+
"blood in cough",
|
486 |
+
"blood in expectoration",
|
487 |
+
"blood in sputum",
|
488 |
+
"blood in cough",
|
489 |
+
"blood tinged sputum",
|
490 |
+
"blood when cough",
|
491 |
+
"blood when coughed",
|
492 |
+
"blood when coughing",
|
493 |
+
"blood with cough",
|
494 |
+
"bloody cough",
|
495 |
+
"bloody phlegm",
|
496 |
+
"bloody sputum",
|
497 |
+
"cough has a blood",
|
498 |
+
"cough up blood",
|
499 |
+
"cough up blood",
|
500 |
+
"cough with blood",
|
501 |
+
"cough with blood",
|
502 |
+
"cough with small blood",
|
503 |
+
"coughed up blood",
|
504 |
+
"coughed without blood",
|
505 |
+
"coughing blood",
|
506 |
+
"coughing specks of blood",
|
507 |
+
"coughing red",
|
508 |
+
"coughing up blood",
|
509 |
+
"coughing up some blood",
|
510 |
+
"coughing with blood",
|
511 |
+
"coughing with blood",
|
512 |
+
"expectoration with blood",
|
513 |
+
"hemoptysis",
|
514 |
+
"npit",
|
515 |
+
"phlegm blood",
|
516 |
+
"phlegm pink",
|
517 |
+
"phlegm with a little blood",
|
518 |
+
"phlegm is bloody",
|
519 |
+
"pink phlegm",
|
520 |
+
"pink spit",
|
521 |
+
"red sputum",
|
522 |
+
"red in the cough",
|
523 |
+
"specks of blood coughing",
|
524 |
+
"spit blood",
|
525 |
+
"spit pink",
|
526 |
+
"spit up blood",
|
527 |
+
"spitting with blood",
|
528 |
+
"sputum red",
|
529 |
+
"sputum has a red"
|
530 |
+
],
|
531 |
+
"Self-reported hospitalization": [
|
532 |
+
"again in the hospital",
|
533 |
+
"back in the hospital",
|
534 |
+
"boro park rehab emanuel",
|
535 |
+
"emanuel boro park rehab",
|
536 |
+
"emanuel rehabilitation center",
|
537 |
+
"going to hospital",
|
538 |
+
"he is in the icu",
|
539 |
+
"hospital",
|
540 |
+
"i am admitted into the hospital",
|
541 |
+
"i am at the hospital",
|
542 |
+
"i am hospitalized",
|
543 |
+
"i am in rehab",
|
544 |
+
"i am in the barnabas",
|
545 |
+
"i am in the hospital",
|
546 |
+
"i am admitted",
|
547 |
+
"i am at the hospital",
|
548 |
+
"i am going hospital",
|
549 |
+
"i am hospitalised",
|
550 |
+
"i am hospitalized",
|
551 |
+
"i am in hospital",
|
552 |
+
"i am in medical center",
|
553 |
+
"i am in overlook.hosp",
|
554 |
+
"i am in the hospital",
|
555 |
+
"i arrived the hospital",
|
556 |
+
"i been in",
|
557 |
+
"i have been admitted",
|
558 |
+
"i just checked into hospital",
|
559 |
+
"i was in the hospital",
|
560 |
+
"i was the hospital",
|
561 |
+
"i was admitted",
|
562 |
+
"i was admitted hospital",
|
563 |
+
"i was hospilized",
|
564 |
+
"i was hospitalized",
|
565 |
+
"i was in the hospital",
|
566 |
+
"in nyu manhattan",
|
567 |
+
"in the barnabas i am",
|
568 |
+
"in the hospital again",
|
569 |
+
"medical center taken to",
|
570 |
+
"my stay in hospital",
|
571 |
+
"rehabilitation center emanuel",
|
572 |
+
"self-reported hospitalization",
|
573 |
+
"she is in the icu",
|
574 |
+
"still in hospital",
|
575 |
+
"taken to medical center"
|
576 |
+
]
|
577 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
embedding_cache.py
ADDED
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import sqlite3
|
2 |
+
import numpy as np
|
3 |
+
from typing import Optional, List
|
4 |
+
from pathlib import Path
|
5 |
+
import time
|
6 |
+
|
7 |
+
class EmbeddingCache:
|
8 |
+
def __init__(self, db_path: str = "embeddings_cache.db"):
|
9 |
+
"""
|
10 |
+
Ініціалізація кешу ембедінгів
|
11 |
+
|
12 |
+
Args:
|
13 |
+
db_path: шлях до файлу SQLite бази даних
|
14 |
+
"""
|
15 |
+
self.db_path = db_path
|
16 |
+
self._init_db()
|
17 |
+
self.hits = 0
|
18 |
+
self.misses = 0
|
19 |
+
|
20 |
+
def _init_db(self):
|
21 |
+
"""Ініціалізація структури бази даних"""
|
22 |
+
with sqlite3.connect(self.db_path) as conn:
|
23 |
+
conn.execute("""
|
24 |
+
CREATE TABLE IF NOT EXISTS embeddings (
|
25 |
+
text_hash TEXT PRIMARY KEY,
|
26 |
+
text TEXT NOT NULL,
|
27 |
+
model TEXT NOT NULL,
|
28 |
+
embedding BLOB NOT NULL,
|
29 |
+
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
30 |
+
)
|
31 |
+
""")
|
32 |
+
|
33 |
+
# Індекс для швидкого пошуку за хешем
|
34 |
+
conn.execute("""
|
35 |
+
CREATE INDEX IF NOT EXISTS idx_text_hash
|
36 |
+
ON embeddings(text_hash)
|
37 |
+
""")
|
38 |
+
|
39 |
+
def _get_hash(self, text: str, model: str) -> str:
|
40 |
+
"""Створення унікального хешу для тексту та моделі"""
|
41 |
+
return str(hash(f"{text}:{model}"))
|
42 |
+
|
43 |
+
def get(self, text: str, model: str) -> Optional[np.ndarray]:
|
44 |
+
"""
|
45 |
+
Отримання ембедінгу з кешу
|
46 |
+
|
47 |
+
Args:
|
48 |
+
text: текст для пошуку
|
49 |
+
model: назва моделі ембедінгів
|
50 |
+
|
51 |
+
Returns:
|
52 |
+
np.ndarray якщо знайдено, None якщо не знайдено
|
53 |
+
"""
|
54 |
+
text_hash = self._get_hash(text, model)
|
55 |
+
|
56 |
+
with sqlite3.connect(self.db_path) as conn:
|
57 |
+
result = conn.execute(
|
58 |
+
"SELECT embedding FROM embeddings WHERE text_hash = ?",
|
59 |
+
(text_hash,)
|
60 |
+
).fetchone()
|
61 |
+
|
62 |
+
if result:
|
63 |
+
self.hits += 1
|
64 |
+
return np.frombuffer(result[0], dtype=np.float32)
|
65 |
+
|
66 |
+
self.misses += 1
|
67 |
+
return None
|
68 |
+
|
69 |
+
def put(self, text: str, model: str, embedding: np.ndarray) -> None:
|
70 |
+
"""
|
71 |
+
Збереження ембедінгу в кеш
|
72 |
+
|
73 |
+
Args:
|
74 |
+
text: вхідний текст
|
75 |
+
model: назва моделі
|
76 |
+
embedding: ембедінг для збереження
|
77 |
+
"""
|
78 |
+
text_hash = self._get_hash(text, model)
|
79 |
+
|
80 |
+
with sqlite3.connect(self.db_path) as conn:
|
81 |
+
conn.execute(
|
82 |
+
"""
|
83 |
+
INSERT OR REPLACE INTO embeddings
|
84 |
+
(text_hash, text, model, embedding)
|
85 |
+
VALUES (?, ?, ?, ?)
|
86 |
+
""",
|
87 |
+
(
|
88 |
+
text_hash,
|
89 |
+
text,
|
90 |
+
model,
|
91 |
+
np.array(embedding, dtype=np.float32).tobytes()
|
92 |
+
)
|
93 |
+
)
|
94 |
+
|
95 |
+
def clear_old(self, days: int = 30) -> int:
|
96 |
+
"""
|
97 |
+
Очищення старих записів з кешу
|
98 |
+
|
99 |
+
Args:
|
100 |
+
days: кількість днів, старіші записи будуть видалені
|
101 |
+
|
102 |
+
Returns:
|
103 |
+
Кількість видалених записів
|
104 |
+
"""
|
105 |
+
with sqlite3.connect(self.db_path) as conn:
|
106 |
+
cursor = conn.execute(
|
107 |
+
"""
|
108 |
+
DELETE FROM embeddings
|
109 |
+
WHERE created_at < datetime('now', ?)
|
110 |
+
""",
|
111 |
+
(f"-{days} days",)
|
112 |
+
)
|
113 |
+
return cursor.rowcount
|
114 |
+
|
115 |
+
def get_stats(self) -> dict:
|
116 |
+
"""Отримання статистики використання кешу"""
|
117 |
+
with sqlite3.connect(self.db_path) as conn:
|
118 |
+
total = conn.execute(
|
119 |
+
"SELECT COUNT(*) FROM embeddings"
|
120 |
+
).fetchone()[0]
|
121 |
+
|
122 |
+
size = Path(self.db_path).stat().st_size / (1024 * 1024) # Size in MB
|
123 |
+
|
124 |
+
if self.hits + self.misses > 0:
|
125 |
+
hit_rate = self.hits / (self.hits + self.misses) * 100
|
126 |
+
else:
|
127 |
+
hit_rate = 0
|
128 |
+
|
129 |
+
return {
|
130 |
+
"total_entries": total,
|
131 |
+
"cache_size_mb": round(size, 2),
|
132 |
+
"hits": self.hits,
|
133 |
+
"misses": self.misses,
|
134 |
+
"hit_rate_percent": round(hit_rate, 2)
|
135 |
+
}
|
sdc_classifier.py
CHANGED
@@ -5,14 +5,16 @@ import json
|
|
5 |
from typing import Dict, List
|
6 |
from openai import OpenAI
|
7 |
from pathlib import Path
|
|
|
8 |
|
9 |
class SDCClassifier:
|
10 |
-
def __init__(self, openai_api_key: str = None):
|
11 |
"""
|
12 |
Ініціалізація класифікатора SDC
|
13 |
|
14 |
Args:
|
15 |
openai_api_key: API ключ для OpenAI (опціонально, можна взяти з env)
|
|
|
16 |
"""
|
17 |
self.client = OpenAI(api_key=openai_api_key or os.getenv("OPENAI_API_KEY"))
|
18 |
self.classes_json = {}
|
@@ -21,12 +23,72 @@ class SDCClassifier:
|
|
21 |
self.embeddings = None
|
22 |
self.embeddings_mean = None
|
23 |
self.embeddings_std = None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
def load_classes(self, json_path: str) -> dict:
|
26 |
"""Завантаження класів та їх хінтів з JSON файлу"""
|
27 |
try:
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
return self.classes_json
|
31 |
except FileNotFoundError:
|
32 |
print(f"Файл {json_path} не знайдено!")
|
@@ -34,7 +96,7 @@ class SDCClassifier:
|
|
34 |
except json.JSONDecodeError:
|
35 |
print(f"Помилка читання JSON з файлу {json_path}!")
|
36 |
return {}
|
37 |
-
|
38 |
def save_signatures(self, filename: str = "signatures.npz") -> None:
|
39 |
"""Зберігає signatures у NPZ файл"""
|
40 |
if self.class_signatures:
|
@@ -50,12 +112,40 @@ class SDCClassifier:
|
|
50 |
return None
|
51 |
|
52 |
def get_openai_embedding(self, text: str, model_name: str = "text-embedding-3-large") -> list:
|
53 |
-
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
response = self.client.embeddings.create(
|
55 |
input=text,
|
56 |
model=model_name
|
57 |
)
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
def embed_hints(self, hint_list: List[str], model_name: str) -> np.ndarray:
|
61 |
"""Створення ембедінгів для списку хінтів"""
|
@@ -76,19 +166,29 @@ class SDCClassifier:
|
|
76 |
|
77 |
return np.array(emb_list, dtype=np.float32)
|
78 |
|
|
|
79 |
def initialize_signatures(self, model_name: str = "text-embedding-3-large",
|
80 |
-
|
81 |
-
|
82 |
-
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
if not self.classes_json:
|
84 |
return "Помилка: Не знайдено жодного класу в classes.json"
|
85 |
|
86 |
print(f"Знайдено {len(self.classes_json)} класів")
|
87 |
|
88 |
-
|
|
|
89 |
try:
|
90 |
loaded_signatures = self.load_signatures(signatures_file)
|
91 |
if loaded_signatures and all(cls in loaded_signatures for cls in self.classes_json):
|
|
|
92 |
print("Успішно завантажено збережені signatures")
|
93 |
return f"Завантажено існуючі signatures для {len(self.class_signatures)} класів"
|
94 |
except Exception as e:
|
@@ -116,13 +216,18 @@ class SDCClassifier:
|
|
116 |
if not self.class_signatures:
|
117 |
return "Помилка: Не вдалося створити жодного signature"
|
118 |
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
121 |
|
122 |
-
return f"Створено
|
123 |
except Exception as e:
|
124 |
return f"Помилка при створенні signatures: {str(e)}"
|
125 |
-
|
126 |
def load_data(self, csv_path: str = "messages.csv", emb_path: str = "embeddings.npy"):
|
127 |
"""Завантаження даних з CSV та NPY файлів"""
|
128 |
self.df = pd.read_csv(csv_path)
|
|
|
5 |
from typing import Dict, List
|
6 |
from openai import OpenAI
|
7 |
from pathlib import Path
|
8 |
+
from embedding_cache import EmbeddingCache
|
9 |
|
10 |
class SDCClassifier:
|
11 |
+
def __init__(self, openai_api_key: str = None, cache_path: str = "embeddings_cache.db"):
|
12 |
"""
|
13 |
Ініціалізація класифікатора SDC
|
14 |
|
15 |
Args:
|
16 |
openai_api_key: API ключ для OpenAI (опціонально, можна взяти з env)
|
17 |
+
cache_path: шлях до файлу кешу ембедінгів
|
18 |
"""
|
19 |
self.client = OpenAI(api_key=openai_api_key or os.getenv("OPENAI_API_KEY"))
|
20 |
self.classes_json = {}
|
|
|
23 |
self.embeddings = None
|
24 |
self.embeddings_mean = None
|
25 |
self.embeddings_std = None
|
26 |
+
|
27 |
+
# Ініціалізація кешу
|
28 |
+
from embedding_cache import EmbeddingCache
|
29 |
+
self.cache = EmbeddingCache(cache_path)
|
30 |
+
|
31 |
+
# Базовий стан
|
32 |
+
self.base_classes_json = {}
|
33 |
+
self.base_signatures = None
|
34 |
+
|
35 |
+
def load_initial_state(self, classes_file: str, signatures_file: str) -> str:
|
36 |
+
"""
|
37 |
+
Завантаження початкового стану при старті застосунку
|
38 |
+
|
39 |
+
Args:
|
40 |
+
classes_file: шлях до файлу з класами
|
41 |
+
signatures_file: шлях до файлу з signatures
|
42 |
+
|
43 |
+
Returns:
|
44 |
+
str: повідомлення про результат завантаження
|
45 |
+
"""
|
46 |
+
try:
|
47 |
+
self.base_classes_json = self.load_classes(classes_file)
|
48 |
+
if os.path.exists(signatures_file):
|
49 |
+
self.base_signatures = self.load_signatures(signatures_file)
|
50 |
+
|
51 |
+
# Встановлюємо поточний стан як базовий
|
52 |
+
self.classes_json = self.base_classes_json.copy()
|
53 |
+
self.class_signatures = self.base_signatures.copy() if self.base_signatures else None
|
54 |
+
|
55 |
+
return f"Завантажено {len(self.base_classes_json)} базових класів"
|
56 |
+
except Exception as e:
|
57 |
+
return f"Помилка при завантаженні базового стану: {str(e)}"
|
58 |
+
|
59 |
+
def restore_base_state(self) -> None:
|
60 |
+
"""Відновлення базового стану"""
|
61 |
+
self.classes_json = self.base_classes_json.copy()
|
62 |
+
self.class_signatures = self.base_signatures.copy() if self.base_signatures else None
|
63 |
+
|
64 |
+
def load_initial_state(self, classes_file: str, signatures_file: str):
|
65 |
+
"""Завантаження початкового стану при старті застосунку"""
|
66 |
+
self.base_classes_json = self.load_classes(classes_file)
|
67 |
+
self.base_signatures = self.load_signatures(signatures_file)
|
68 |
+
|
69 |
+
# Встановлюємо поточний стан як базовий
|
70 |
+
self.classes_json = self.base_classes_json.copy()
|
71 |
+
self.class_signatures = self.base_signatures.copy() if self.base_signatures else None
|
72 |
+
|
73 |
+
def restore_base_state(self):
|
74 |
+
"""Відновлення базового стану"""
|
75 |
+
self.classes_json = self.base_classes_json.copy()
|
76 |
+
self.class_signatures = self.base_signatures.copy() if self.base_signatures else None
|
77 |
|
78 |
def load_classes(self, json_path: str) -> dict:
|
79 |
"""Завантаження класів та їх хінтів з JSON файлу"""
|
80 |
try:
|
81 |
+
# Якщо передано вміст файлу замість шляху
|
82 |
+
if isinstance(json_path, dict):
|
83 |
+
self.classes_json = json_path
|
84 |
+
else:
|
85 |
+
with open(json_path, 'r', encoding='utf-8') as f:
|
86 |
+
self.classes_json = json.load(f)
|
87 |
+
|
88 |
+
# Валідація структури
|
89 |
+
if not all(isinstance(hints, list) for hints in self.classes_json.values()):
|
90 |
+
raise ValueError("Кожен клас повинен мати список хінтів")
|
91 |
+
|
92 |
return self.classes_json
|
93 |
except FileNotFoundError:
|
94 |
print(f"Файл {json_path} не знайдено!")
|
|
|
96 |
except json.JSONDecodeError:
|
97 |
print(f"Помилка читання JSON з файлу {json_path}!")
|
98 |
return {}
|
99 |
+
|
100 |
def save_signatures(self, filename: str = "signatures.npz") -> None:
|
101 |
"""Зберігає signatures у NPZ файл"""
|
102 |
if self.class_signatures:
|
|
|
112 |
return None
|
113 |
|
114 |
def get_openai_embedding(self, text: str, model_name: str = "text-embedding-3-large") -> list:
|
115 |
+
"""
|
116 |
+
Отримання ембедінгу тексту через OpenAI API з використанням кешу
|
117 |
+
|
118 |
+
Args:
|
119 |
+
text: текст для ембедінгу
|
120 |
+
model_name: назва моделі OpenAI
|
121 |
+
|
122 |
+
Returns:
|
123 |
+
list: ембедінг тексту
|
124 |
+
"""
|
125 |
+
# Спроба отримати з кешу
|
126 |
+
cached_embedding = self.cache.get(text, model_name)
|
127 |
+
if cached_embedding is not None:
|
128 |
+
return cached_embedding.tolist()
|
129 |
+
|
130 |
+
# Якщо нема в кеші - отримуємо через API
|
131 |
response = self.client.embeddings.create(
|
132 |
input=text,
|
133 |
model=model_name
|
134 |
)
|
135 |
+
embedding = response.data[0].embedding
|
136 |
+
|
137 |
+
# Зберігаємо в кеш
|
138 |
+
self.cache.put(text, model_name, embedding)
|
139 |
+
|
140 |
+
return embedding
|
141 |
+
|
142 |
+
def get_cache_stats(self) -> dict:
|
143 |
+
"""Отримання статистики кешування"""
|
144 |
+
return self.cache.get_stats()
|
145 |
+
|
146 |
+
def clear_old_cache(self, days: int = 30) -> int:
|
147 |
+
"""Очищення старих записів з кешу"""
|
148 |
+
return self.cache.clear_old(days)
|
149 |
|
150 |
def embed_hints(self, hint_list: List[str], model_name: str) -> np.ndarray:
|
151 |
"""Створення ембедінгів для списку хінтів"""
|
|
|
166 |
|
167 |
return np.array(emb_list, dtype=np.float32)
|
168 |
|
169 |
+
|
170 |
def initialize_signatures(self, model_name: str = "text-embedding-3-large",
|
171 |
+
signatures_file: str = "signatures.npz",
|
172 |
+
force_rebuild: bool = False) -> str:
|
173 |
+
"""
|
174 |
+
Ініціалізує signatures: завантажує існуючі або створює нові
|
175 |
+
|
176 |
+
Args:
|
177 |
+
model_name: назва моделі для ембедінгів
|
178 |
+
signatures_file: шлях до файлу для збереження (None - не зберігати)
|
179 |
+
force_rebuild: примусово перебудувати signatures
|
180 |
+
"""
|
181 |
if not self.classes_json:
|
182 |
return "Помилка: Не знайдено жодного класу в classes.json"
|
183 |
|
184 |
print(f"Знайдено {len(self.classes_json)} класів")
|
185 |
|
186 |
+
# Завантажуємо існуючі signatures, якщо є файл і не примусове оновлення
|
187 |
+
if not force_rebuild and signatures_file and os.path.exists(signatures_file):
|
188 |
try:
|
189 |
loaded_signatures = self.load_signatures(signatures_file)
|
190 |
if loaded_signatures and all(cls in loaded_signatures for cls in self.classes_json):
|
191 |
+
self.class_signatures = loaded_signatures
|
192 |
print("Успішно завантажено збережені signatures")
|
193 |
return f"Завантажено існуючі signatures для {len(self.class_signatures)} класів"
|
194 |
except Exception as e:
|
|
|
216 |
if not self.class_signatures:
|
217 |
return "Помилка: Не вдалося створити жодного signature"
|
218 |
|
219 |
+
# Зберігаємо signatures тільки якщо вказано шлях до файлу
|
220 |
+
if signatures_file:
|
221 |
+
try:
|
222 |
+
self.save_signatures(signatures_file)
|
223 |
+
print("Signatures збережено у файл")
|
224 |
+
except Exception as e:
|
225 |
+
print(f"Помилка при збереженні signatures: {str(e)}")
|
226 |
|
227 |
+
return f"Створено нові signatures для {len(self.class_signatures)} класів"
|
228 |
except Exception as e:
|
229 |
return f"Помилка при створенні signatures: {str(e)}"
|
230 |
+
|
231 |
def load_data(self, csv_path: str = "messages.csv", emb_path: str = "embeddings.npy"):
|
232 |
"""Завантаження даних з CSV та NPY файлів"""
|
233 |
self.df = pd.read_csv(csv_path)
|