Spaces:
Sleeping
Sleeping
Upload 7 files
Browse files- animal_detector.db +0 -0
- breed_noise_info.py +2281 -0
- breed_recommendation.py +134 -0
- data_manager.py +938 -0
- history_manager.py +92 -0
- search_history.py +159 -0
- styles.py +892 -0
animal_detector.db
ADDED
Binary file (49.2 kB). View file
|
|
breed_noise_info.py
ADDED
@@ -0,0 +1,2281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
breed_noise_info = {
|
3 |
+
"Afghan_Hound": {
|
4 |
+
"noise_notes": """
|
5 |
+
Typical noise characteristics:
|
6 |
+
• Moderate barking tendency
|
7 |
+
• Howls occasionally
|
8 |
+
• Generally quiet indoors
|
9 |
+
• May bark at unfamiliar sounds
|
10 |
+
|
11 |
+
Noise level: Moderate
|
12 |
+
Barking triggers:
|
13 |
+
• Strangers approaching
|
14 |
+
• Other animals
|
15 |
+
• Unusual sounds
|
16 |
+
""",
|
17 |
+
"noise_level": "Moderate",
|
18 |
+
"source": "Breed Behavior Database, 2024"
|
19 |
+
},
|
20 |
+
|
21 |
+
"African_Hunting_Dog": {
|
22 |
+
"noise_notes": """
|
23 |
+
Typical noise characteristics:
|
24 |
+
• High vocal tendency
|
25 |
+
• Frequent howling
|
26 |
+
• Pack-oriented vocalizations
|
27 |
+
• Various vocal sounds
|
28 |
+
|
29 |
+
Noise level: High
|
30 |
+
Barking triggers:
|
31 |
+
• Pack communication
|
32 |
+
• Hunting instincts
|
33 |
+
• Territory defense
|
34 |
+
• Social interactions
|
35 |
+
""",
|
36 |
+
"noise_level": "High",
|
37 |
+
"source": "Breed Behavior Database, 2024"
|
38 |
+
},
|
39 |
+
|
40 |
+
"Airedale": {
|
41 |
+
"noise_notes": """
|
42 |
+
Typical noise characteristics:
|
43 |
+
• Alert barker
|
44 |
+
• Territorial vocalizations
|
45 |
+
• Moderate to high barking tendency
|
46 |
+
• Strong watchdog instincts
|
47 |
+
|
48 |
+
Noise level: High
|
49 |
+
Barking triggers:
|
50 |
+
• Territorial defense
|
51 |
+
• Stranger alerts
|
52 |
+
• Excitement
|
53 |
+
• Play time
|
54 |
+
""",
|
55 |
+
"noise_level": "High",
|
56 |
+
"source": "Breed Behavior Database, 2024"
|
57 |
+
},
|
58 |
+
|
59 |
+
"American_Staffordshire_Terrier": {
|
60 |
+
"noise_notes": """
|
61 |
+
Typical noise characteristics:
|
62 |
+
• Moderate barker
|
63 |
+
• Alert vocalizations
|
64 |
+
• Protective barking
|
65 |
+
• Generally quiet when content
|
66 |
+
|
67 |
+
Noise level: Moderate
|
68 |
+
Barking triggers:
|
69 |
+
• Protective instincts
|
70 |
+
• Excitement
|
71 |
+
• Play
|
72 |
+
• Unfamiliar situations
|
73 |
+
""",
|
74 |
+
"noise_level": "Moderate",
|
75 |
+
"source": "Breed Behavior Database, 2024"
|
76 |
+
},
|
77 |
+
|
78 |
+
"Appenzeller": {
|
79 |
+
"noise_notes": """
|
80 |
+
Typical noise characteristics:
|
81 |
+
• Frequent barker
|
82 |
+
• Alert vocalizations
|
83 |
+
• Herding-related barking
|
84 |
+
• Territorial sounds
|
85 |
+
|
86 |
+
Noise level: High
|
87 |
+
Barking triggers:
|
88 |
+
• Herding instincts
|
89 |
+
• Territory protection
|
90 |
+
• Movement
|
91 |
+
• Strange noises
|
92 |
+
""",
|
93 |
+
"noise_level": "High",
|
94 |
+
"source": "Breed Behavior Database, 2024"
|
95 |
+
},
|
96 |
+
|
97 |
+
"Australian_Terrier": {
|
98 |
+
"noise_notes": """
|
99 |
+
Typical noise characteristics:
|
100 |
+
• Vocal breed
|
101 |
+
• Alert barker
|
102 |
+
• High-pitched barking
|
103 |
+
• Territorial vocalizations
|
104 |
+
|
105 |
+
Noise level: High
|
106 |
+
Barking triggers:
|
107 |
+
• Small animals
|
108 |
+
• Strangers
|
109 |
+
• Environmental changes
|
110 |
+
• Excitement
|
111 |
+
""",
|
112 |
+
"noise_level": "High",
|
113 |
+
"source": "Breed Behavior Database, 2024"
|
114 |
+
},
|
115 |
+
|
116 |
+
"Bedlington_Terrier": {
|
117 |
+
"noise_notes": """
|
118 |
+
Typical noise characteristics:
|
119 |
+
• Moderate barker
|
120 |
+
• Alert vocalizations
|
121 |
+
• Playful barking
|
122 |
+
• Generally well-controlled
|
123 |
+
|
124 |
+
Noise level: Moderate
|
125 |
+
Barking triggers:
|
126 |
+
• Play time
|
127 |
+
• Excitement
|
128 |
+
• Strange sounds
|
129 |
+
• Visitors
|
130 |
+
""",
|
131 |
+
"noise_level": "Moderate",
|
132 |
+
"source": "Breed Behavior Database, 2024"
|
133 |
+
},
|
134 |
+
|
135 |
+
"Bernese_Mountain_Dog": {
|
136 |
+
"noise_notes": """
|
137 |
+
Typical noise characteristics:
|
138 |
+
• Low to moderate barker
|
139 |
+
• Deep bark when alert
|
140 |
+
• Generally quiet
|
141 |
+
• Calm demeanor
|
142 |
+
|
143 |
+
Noise level: Low
|
144 |
+
Barking triggers:
|
145 |
+
• Protection of family
|
146 |
+
• Unusual situations
|
147 |
+
• Greeting
|
148 |
+
• Play
|
149 |
+
""",
|
150 |
+
"noise_level": "Low",
|
151 |
+
"source": "Breed Behavior Database, 2024"
|
152 |
+
},
|
153 |
+
|
154 |
+
"Blenheim_Spaniel": {
|
155 |
+
"noise_notes": """
|
156 |
+
Typical noise characteristics:
|
157 |
+
• Moderate to high barker
|
158 |
+
• Alert barking
|
159 |
+
• Social vocalizations
|
160 |
+
• Attention-seeking barks
|
161 |
+
|
162 |
+
Noise level: Moderate-High
|
163 |
+
Barking triggers:
|
164 |
+
• Separation anxiety
|
165 |
+
• Attention seeking
|
166 |
+
• Excitement
|
167 |
+
• Unfamiliar sounds
|
168 |
+
""",
|
169 |
+
"noise_level": "Moderate-High",
|
170 |
+
"source": "Breed Behavior Database, 2024"
|
171 |
+
},
|
172 |
+
|
173 |
+
"Border_Collie": {
|
174 |
+
"noise_notes": """
|
175 |
+
Typical noise characteristics:
|
176 |
+
• Moderate barker
|
177 |
+
• Herding vocalizations
|
178 |
+
• Intelligent communication
|
179 |
+
• Task-oriented barking
|
180 |
+
|
181 |
+
Noise level: Moderate
|
182 |
+
Barking triggers:
|
183 |
+
• Herding instincts
|
184 |
+
• Mental stimulation needs
|
185 |
+
• Movement
|
186 |
+
• Work tasks
|
187 |
+
""",
|
188 |
+
"noise_level": "Moderate",
|
189 |
+
"source": "Breed Behavior Database, 2024"
|
190 |
+
},
|
191 |
+
|
192 |
+
"Border_Terrier": {
|
193 |
+
"noise_notes": """
|
194 |
+
Typical noise characteristics:
|
195 |
+
• Moderate to high barker
|
196 |
+
• Alert barking tendency
|
197 |
+
• Sharp, terrier-like barks
|
198 |
+
• Vocal when excited
|
199 |
+
|
200 |
+
Noise level: Moderate-High
|
201 |
+
Barking triggers:
|
202 |
+
• Small animals
|
203 |
+
• Territorial defense
|
204 |
+
• Excitement
|
205 |
+
• Play time
|
206 |
+
""",
|
207 |
+
"noise_level": "Moderate-High",
|
208 |
+
"source": "Breed Behavior Database, 2024"
|
209 |
+
},
|
210 |
+
|
211 |
+
"Boston_Bull": {
|
212 |
+
"noise_notes": """
|
213 |
+
Typical noise characteristics:
|
214 |
+
• Moderate barker
|
215 |
+
• Snoring tendency
|
216 |
+
• Alert vocalizations
|
217 |
+
• Excitement sounds
|
218 |
+
|
219 |
+
Noise level: Moderate
|
220 |
+
Barking triggers:
|
221 |
+
• Attention seeking
|
222 |
+
• Play invitation
|
223 |
+
• Doorbell/visitors
|
224 |
+
• Environmental changes
|
225 |
+
""",
|
226 |
+
"noise_level": "Moderate",
|
227 |
+
"source": "Breed Behavior Database, 2024"
|
228 |
+
},
|
229 |
+
|
230 |
+
"Bouvier_Des_Flandres": {
|
231 |
+
"noise_notes": """
|
232 |
+
Typical noise characteristics:
|
233 |
+
• Low to moderate barker
|
234 |
+
• Deep, intimidating bark
|
235 |
+
• Purposeful vocalizations
|
236 |
+
• Good vocal control
|
237 |
+
|
238 |
+
Noise level: Low-Moderate
|
239 |
+
Barking triggers:
|
240 |
+
• Protecting territory
|
241 |
+
• Herding instincts
|
242 |
+
• Suspicious activity
|
243 |
+
• Family protection
|
244 |
+
""",
|
245 |
+
"noise_level": "Low-Moderate",
|
246 |
+
"source": "Breed Behavior Database, 2024"
|
247 |
+
},
|
248 |
+
|
249 |
+
"Brabancon_Griffon": {
|
250 |
+
"noise_notes": """
|
251 |
+
Typical noise characteristics:
|
252 |
+
• Moderate to high barker
|
253 |
+
• Alert watch dog
|
254 |
+
• Attention-seeking barks
|
255 |
+
• Social vocalizations
|
256 |
+
|
257 |
+
Noise level: Moderate-High
|
258 |
+
Barking triggers:
|
259 |
+
• Separation anxiety
|
260 |
+
• Attention needs
|
261 |
+
• Strange noises
|
262 |
+
• Excitement
|
263 |
+
""",
|
264 |
+
"noise_level": "Moderate-High",
|
265 |
+
"source": "Breed Behavior Database, 2024"
|
266 |
+
},
|
267 |
+
|
268 |
+
"Brittany_Spaniel": {
|
269 |
+
"noise_notes": """
|
270 |
+
Typical noise characteristics:
|
271 |
+
• Moderate barker
|
272 |
+
• Hunting vocalizations
|
273 |
+
• Excited whining
|
274 |
+
• Alert barking
|
275 |
+
|
276 |
+
Noise level: Moderate
|
277 |
+
Barking triggers:
|
278 |
+
• Hunting instincts
|
279 |
+
• Bird sightings
|
280 |
+
• Exercise needs
|
281 |
+
• Social interaction
|
282 |
+
""",
|
283 |
+
"noise_level": "Moderate",
|
284 |
+
"source": "Breed Behavior Database, 2024"
|
285 |
+
},
|
286 |
+
|
287 |
+
"Cardigan": {
|
288 |
+
"noise_notes": """
|
289 |
+
Typical noise characteristics:
|
290 |
+
• Frequent barker
|
291 |
+
• Alert vocalizations
|
292 |
+
• Herding barks
|
293 |
+
• Watchdog tendency
|
294 |
+
|
295 |
+
Noise level: High
|
296 |
+
Barking triggers:
|
297 |
+
• Herding instincts
|
298 |
+
• Territory defense
|
299 |
+
• Moving objects
|
300 |
+
• Unfamiliar sounds
|
301 |
+
""",
|
302 |
+
"noise_level": "High",
|
303 |
+
"source": "Breed Behavior Database, 2024"
|
304 |
+
},
|
305 |
+
|
306 |
+
"Chesapeake_Bay_Retriever": {
|
307 |
+
"noise_notes": """
|
308 |
+
Typical noise characteristics:
|
309 |
+
• Moderate barker
|
310 |
+
• Deep bark
|
311 |
+
• Alert vocalizations
|
312 |
+
• Protective barking
|
313 |
+
|
314 |
+
Noise level: Moderate
|
315 |
+
Barking triggers:
|
316 |
+
• Water activities
|
317 |
+
• Protecting property
|
318 |
+
• Stranger alert
|
319 |
+
• Excitement
|
320 |
+
""",
|
321 |
+
"noise_level": "Moderate",
|
322 |
+
"source": "Breed Behavior Database, 2024"
|
323 |
+
},
|
324 |
+
|
325 |
+
"Chihuahua": {
|
326 |
+
"noise_notes": """
|
327 |
+
Typical noise characteristics:
|
328 |
+
• Frequent barker
|
329 |
+
• High-pitched barks
|
330 |
+
• Alert vocalizations
|
331 |
+
• Territorial barking
|
332 |
+
|
333 |
+
Noise level: High
|
334 |
+
Barking triggers:
|
335 |
+
• Strangers
|
336 |
+
• Other animals
|
337 |
+
• Protective instincts
|
338 |
+
• Attention seeking
|
339 |
+
""",
|
340 |
+
"noise_level": "High",
|
341 |
+
"source": "Breed Behavior Database, 2024"
|
342 |
+
},
|
343 |
+
|
344 |
+
"Dandie_Dinmont": {
|
345 |
+
"noise_notes": """
|
346 |
+
Typical noise characteristics:
|
347 |
+
• Moderate barker
|
348 |
+
• Deep bark for size
|
349 |
+
• Alert watchdog
|
350 |
+
• Territorial sounds
|
351 |
+
|
352 |
+
Noise level: Moderate
|
353 |
+
Barking triggers:
|
354 |
+
• Small animals
|
355 |
+
• Territory defense
|
356 |
+
• Strange noises
|
357 |
+
• Visitor alerts
|
358 |
+
""",
|
359 |
+
"noise_level": "Moderate",
|
360 |
+
"source": "Breed Behavior Database, 2024"
|
361 |
+
},
|
362 |
+
|
363 |
+
"Doberman": {
|
364 |
+
"noise_notes": """
|
365 |
+
Typical noise characteristics:
|
366 |
+
• Moderate barker
|
367 |
+
• Deep, intimidating bark
|
368 |
+
• Alert watchdog
|
369 |
+
• Controlled vocalizations
|
370 |
+
|
371 |
+
Noise level: Moderate
|
372 |
+
Barking triggers:
|
373 |
+
• Protection duties
|
374 |
+
• Suspicious activity
|
375 |
+
• Territory defense
|
376 |
+
• Family threats
|
377 |
+
""",
|
378 |
+
"noise_level": "Moderate",
|
379 |
+
"source": "Breed Behavior Database, 2024"
|
380 |
+
},
|
381 |
+
|
382 |
+
"English_Foxhound": {
|
383 |
+
"noise_notes": """
|
384 |
+
Typical noise characteristics:
|
385 |
+
• Very vocal breed
|
386 |
+
• Loud bay and howl
|
387 |
+
• Pack-oriented vocalizations
|
388 |
+
• Musical hunting voice
|
389 |
+
|
390 |
+
Noise level: High
|
391 |
+
Barking triggers:
|
392 |
+
• Scent trails
|
393 |
+
• Pack activities
|
394 |
+
• Hunting instincts
|
395 |
+
• Exercise excitement
|
396 |
+
""",
|
397 |
+
"noise_level": "High",
|
398 |
+
"source": "Breed Behavior Database, 2024"
|
399 |
+
},
|
400 |
+
|
401 |
+
"English_Setter": {
|
402 |
+
"noise_notes": """
|
403 |
+
Typical noise characteristics:
|
404 |
+
• Moderate barker
|
405 |
+
• Gentle vocalizations
|
406 |
+
• Alert barking
|
407 |
+
• Hunting-related sounds
|
408 |
+
|
409 |
+
Noise level: Moderate
|
410 |
+
Barking triggers:
|
411 |
+
• Bird sightings
|
412 |
+
• Hunting situations
|
413 |
+
• Social interaction
|
414 |
+
• Family activity
|
415 |
+
""",
|
416 |
+
"noise_level": "Moderate",
|
417 |
+
"source": "Breed Behavior Database, 2024"
|
418 |
+
},
|
419 |
+
|
420 |
+
"English_Springer": {
|
421 |
+
"noise_notes": """
|
422 |
+
Typical noise characteristics:
|
423 |
+
• Moderate to high barker
|
424 |
+
• Excited vocalizations
|
425 |
+
• Alert barking
|
426 |
+
• Social sounds
|
427 |
+
|
428 |
+
Noise level: Moderate-High
|
429 |
+
Barking triggers:
|
430 |
+
• Birds and small animals
|
431 |
+
• Excitement
|
432 |
+
• Social situations
|
433 |
+
• Play time
|
434 |
+
""",
|
435 |
+
"noise_level": "Moderate-High",
|
436 |
+
"source": "Breed Behavior Database, 2024"
|
437 |
+
},
|
438 |
+
|
439 |
+
"EntleBucher": {
|
440 |
+
"noise_notes": """
|
441 |
+
Typical noise characteristics:
|
442 |
+
• Frequent barker
|
443 |
+
• Loud, commanding bark
|
444 |
+
• Herding vocalizations
|
445 |
+
• Alert watchdog
|
446 |
+
|
447 |
+
Noise level: High
|
448 |
+
Barking triggers:
|
449 |
+
• Herding instincts
|
450 |
+
• Territory protection
|
451 |
+
• Stranger alerts
|
452 |
+
• Working activities
|
453 |
+
""",
|
454 |
+
"noise_level": "High",
|
455 |
+
"source": "Breed Behavior Database, 2024"
|
456 |
+
},
|
457 |
+
|
458 |
+
"Eskimo_Dog": {
|
459 |
+
"noise_notes": """
|
460 |
+
Typical noise characteristics:
|
461 |
+
• High vocal tendency
|
462 |
+
• Howling common
|
463 |
+
• Pack vocalizations
|
464 |
+
• Various vocal sounds
|
465 |
+
|
466 |
+
Noise level: High
|
467 |
+
Barking triggers:
|
468 |
+
• Pack communication
|
469 |
+
• Social interaction
|
470 |
+
• Environmental changes
|
471 |
+
• Excitement
|
472 |
+
""",
|
473 |
+
"noise_level": "High",
|
474 |
+
"source": "Breed Behavior Database, 2024"
|
475 |
+
},
|
476 |
+
|
477 |
+
"French_Bulldog": {
|
478 |
+
"noise_notes": """
|
479 |
+
Typical noise characteristics:
|
480 |
+
• Low to moderate barker
|
481 |
+
• Snoring and grunting
|
482 |
+
• Alert barking
|
483 |
+
• Quiet indoors
|
484 |
+
|
485 |
+
Noise level: Low-Moderate
|
486 |
+
Barking triggers:
|
487 |
+
• Play time
|
488 |
+
• Attention seeking
|
489 |
+
• Door alerts
|
490 |
+
• Excitement
|
491 |
+
""",
|
492 |
+
"noise_level": "Low-Moderate",
|
493 |
+
"source": "Breed Behavior Database, 2024"
|
494 |
+
},
|
495 |
+
|
496 |
+
"German_Shepherd": {
|
497 |
+
"noise_notes": """
|
498 |
+
Typical noise characteristics:
|
499 |
+
• Moderate to high barker
|
500 |
+
• Deep, authoritative bark
|
501 |
+
• Alert watchdog
|
502 |
+
• Intelligent communication
|
503 |
+
|
504 |
+
Noise level: Moderate-High
|
505 |
+
Barking triggers:
|
506 |
+
• Protection duties
|
507 |
+
• Territorial defense
|
508 |
+
• Work tasks
|
509 |
+
• Unusual situations
|
510 |
+
""",
|
511 |
+
"noise_level": "Moderate-High",
|
512 |
+
"source": "Breed Behavior Database, 2024"
|
513 |
+
},
|
514 |
+
|
515 |
+
"German_Short-Haired_Pointer": {
|
516 |
+
"noise_notes": """
|
517 |
+
Typical noise characteristics:
|
518 |
+
• Moderate barker
|
519 |
+
• Hunting vocalizations
|
520 |
+
• Alert barking
|
521 |
+
• Exercise-related sounds
|
522 |
+
|
523 |
+
Noise level: Moderate
|
524 |
+
Barking triggers:
|
525 |
+
• Bird sightings
|
526 |
+
• Hunting situations
|
527 |
+
• Exercise needs
|
528 |
+
• Excitement
|
529 |
+
""",
|
530 |
+
"noise_level": "Moderate",
|
531 |
+
"source": "Breed Behavior Database, 2024"
|
532 |
+
},
|
533 |
+
|
534 |
+
"Gordon_Setter": {
|
535 |
+
"noise_notes": """
|
536 |
+
Typical noise characteristics:
|
537 |
+
• Moderate barker
|
538 |
+
• Alert vocalizations
|
539 |
+
• Hunting-related sounds
|
540 |
+
• Social barking
|
541 |
+
|
542 |
+
Noise level: Moderate
|
543 |
+
Barking triggers:
|
544 |
+
• Game birds
|
545 |
+
• Family activities
|
546 |
+
• Strange noises
|
547 |
+
• Social situations
|
548 |
+
""",
|
549 |
+
"noise_level": "Moderate",
|
550 |
+
"source": "Breed Behavior Database, 2024"
|
551 |
+
},
|
552 |
+
|
553 |
+
"Great_Dane": {
|
554 |
+
"noise_notes": """
|
555 |
+
Typical noise characteristics:
|
556 |
+
• Low to moderate barker
|
557 |
+
• Deep, booming bark
|
558 |
+
• Generally quiet
|
559 |
+
• Alert watchdog
|
560 |
+
|
561 |
+
Noise level: Low-Moderate
|
562 |
+
Barking triggers:
|
563 |
+
• Territorial defense
|
564 |
+
• Stranger alerts
|
565 |
+
• Family protection
|
566 |
+
• Excitement
|
567 |
+
""",
|
568 |
+
"noise_level": "Low-Moderate",
|
569 |
+
"source": "Breed Behavior Database, 2024"
|
570 |
+
},
|
571 |
+
|
572 |
+
"Great_Pyrenees": {
|
573 |
+
"noise_notes": """
|
574 |
+
Typical noise characteristics:
|
575 |
+
• Moderate to high barker
|
576 |
+
• Deep, powerful bark
|
577 |
+
• Nocturnal barking tendency
|
578 |
+
• Guardian vocalizations
|
579 |
+
|
580 |
+
Noise level: High
|
581 |
+
Barking triggers:
|
582 |
+
• Night patrol
|
583 |
+
• Livestock protection
|
584 |
+
• Territory defense
|
585 |
+
• Suspicious activity
|
586 |
+
""",
|
587 |
+
"noise_level": "High",
|
588 |
+
"source": "Breed Behavior Database, 2024"
|
589 |
+
},
|
590 |
+
|
591 |
+
"Greater_Swiss_Mountain_Dog": {
|
592 |
+
"noise_notes": """
|
593 |
+
Typical noise characteristics:
|
594 |
+
• Moderate barker
|
595 |
+
• Deep, loud bark
|
596 |
+
• Alert watchdog
|
597 |
+
• Territorial vocalizations
|
598 |
+
|
599 |
+
Noise level: Moderate
|
600 |
+
Barking triggers:
|
601 |
+
• Territory protection
|
602 |
+
• Stranger alerts
|
603 |
+
• Working tasks
|
604 |
+
• Family activities
|
605 |
+
""",
|
606 |
+
"noise_level": "Moderate",
|
607 |
+
"source": "Breed Behavior Database, 2024"
|
608 |
+
},
|
609 |
+
|
610 |
+
"Ibizan_Hound": {
|
611 |
+
"noise_notes": """
|
612 |
+
Typical noise characteristics:
|
613 |
+
• Low to moderate barker
|
614 |
+
• Quiet indoors
|
615 |
+
• Alert barking
|
616 |
+
• Hunting vocalizations
|
617 |
+
|
618 |
+
Noise level: Low-Moderate
|
619 |
+
Barking triggers:
|
620 |
+
• Prey sighting
|
621 |
+
• Exercise time
|
622 |
+
• Strange sounds
|
623 |
+
• Excitement
|
624 |
+
""",
|
625 |
+
"noise_level": "Low-Moderate",
|
626 |
+
"source": "Breed Behavior Database, 2024"
|
627 |
+
},
|
628 |
+
|
629 |
+
"Irish_Setter": {
|
630 |
+
"noise_notes": """
|
631 |
+
Typical noise characteristics:
|
632 |
+
• Moderate barker
|
633 |
+
• Enthusiastic vocalizations
|
634 |
+
• Alert barking
|
635 |
+
• Social sounds
|
636 |
+
|
637 |
+
Noise level: Moderate
|
638 |
+
Barking triggers:
|
639 |
+
• Bird sightings
|
640 |
+
• Play time
|
641 |
+
• Social interaction
|
642 |
+
• Family activities
|
643 |
+
""",
|
644 |
+
"noise_level": "Moderate",
|
645 |
+
"source": "Breed Behavior Database, 2024"
|
646 |
+
},
|
647 |
+
|
648 |
+
"Irish_Terrier": {
|
649 |
+
"noise_notes": """
|
650 |
+
Typical noise characteristics:
|
651 |
+
• High vocal tendency
|
652 |
+
• Sharp, terrier bark
|
653 |
+
• Alert watchdog
|
654 |
+
• Territorial barking
|
655 |
+
|
656 |
+
Noise level: High
|
657 |
+
Barking triggers:
|
658 |
+
• Territory defense
|
659 |
+
• Small animals
|
660 |
+
• Excitement
|
661 |
+
• Strange sounds
|
662 |
+
""",
|
663 |
+
"noise_level": "High",
|
664 |
+
"source": "Breed Behavior Database, 2024"
|
665 |
+
},
|
666 |
+
|
667 |
+
"Irish_Water_Spaniel": {
|
668 |
+
"noise_notes": """
|
669 |
+
Typical noise characteristics:
|
670 |
+
• Moderate barker
|
671 |
+
• Alert vocalizations
|
672 |
+
• Water-related excitement
|
673 |
+
• Social barking
|
674 |
+
|
675 |
+
Noise level: Moderate
|
676 |
+
Barking triggers:
|
677 |
+
• Water activities
|
678 |
+
• Birds and prey
|
679 |
+
• Play time
|
680 |
+
• Family interaction
|
681 |
+
""",
|
682 |
+
"noise_level": "Moderate",
|
683 |
+
"source": "Breed Behavior Database, 2024"
|
684 |
+
},
|
685 |
+
|
686 |
+
"Irish_Wolfhound": {
|
687 |
+
"noise_notes": """
|
688 |
+
Typical noise characteristics:
|
689 |
+
• Low barker
|
690 |
+
• Deep, quiet bark
|
691 |
+
• Generally silent
|
692 |
+
• Calm demeanor
|
693 |
+
|
694 |
+
Noise level: Low
|
695 |
+
Barking triggers:
|
696 |
+
• Serious threats
|
697 |
+
• Family protection
|
698 |
+
• Greeting friends
|
699 |
+
• Rare occasions
|
700 |
+
""",
|
701 |
+
"noise_level": "Low",
|
702 |
+
"source": "Breed Behavior Database, 2024"
|
703 |
+
},
|
704 |
+
|
705 |
+
"Italian_Greyhound": {
|
706 |
+
"noise_notes": """
|
707 |
+
Typical noise characteristics:
|
708 |
+
• Moderate barker
|
709 |
+
• High-pitched bark
|
710 |
+
• Alert vocalizations
|
711 |
+
• Excitement whining
|
712 |
+
|
713 |
+
Noise level: Moderate
|
714 |
+
Barking triggers:
|
715 |
+
• Stranger alerts
|
716 |
+
• Excitement
|
717 |
+
• Anxiety
|
718 |
+
• Attention seeking
|
719 |
+
""",
|
720 |
+
"noise_level": "Moderate",
|
721 |
+
"source": "Breed Behavior Database, 2024"
|
722 |
+
},
|
723 |
+
|
724 |
+
"Japanese_Spaniel": {
|
725 |
+
"noise_notes": """
|
726 |
+
Typical noise characteristics:
|
727 |
+
• Frequent barker
|
728 |
+
• Alert watchdog
|
729 |
+
• High-pitched bark
|
730 |
+
• Social vocalizations
|
731 |
+
|
732 |
+
Noise level: High
|
733 |
+
Barking triggers:
|
734 |
+
• Stranger alerts
|
735 |
+
• Territorial defense
|
736 |
+
• Attention seeking
|
737 |
+
• Environmental changes
|
738 |
+
""",
|
739 |
+
"noise_level": "High",
|
740 |
+
"source": "Breed Behavior Database, 2024"
|
741 |
+
},
|
742 |
+
|
743 |
+
"Kerry_Blue_Terrier": {
|
744 |
+
"noise_notes": """
|
745 |
+
Typical noise characteristics:
|
746 |
+
• Moderate to high barker
|
747 |
+
• Alert watchdog
|
748 |
+
• Terrier vocalizations
|
749 |
+
• Protective barking
|
750 |
+
|
751 |
+
Noise level: Moderate-High
|
752 |
+
Barking triggers:
|
753 |
+
• Territory protection
|
754 |
+
• Small animals
|
755 |
+
• Excitement
|
756 |
+
• Strange noises
|
757 |
+
""",
|
758 |
+
"noise_level": "Moderate-High",
|
759 |
+
"source": "Breed Behavior Database, 2024"
|
760 |
+
},
|
761 |
+
|
762 |
+
"Labrador_Retriever": {
|
763 |
+
"noise_notes": """
|
764 |
+
Typical noise characteristics:
|
765 |
+
• Moderate barker
|
766 |
+
• Friendly vocalizations
|
767 |
+
• Alert barking
|
768 |
+
• Excitement sounds
|
769 |
+
|
770 |
+
Noise level: Moderate
|
771 |
+
Barking triggers:
|
772 |
+
• Greeting people
|
773 |
+
• Play time
|
774 |
+
• Water activities
|
775 |
+
• Family interaction
|
776 |
+
""",
|
777 |
+
"noise_level": "Moderate",
|
778 |
+
"source": "Breed Behavior Database, 2024"
|
779 |
+
},
|
780 |
+
|
781 |
+
"Lakeland_Terrier": {
|
782 |
+
"noise_notes": """
|
783 |
+
Typical noise characteristics:
|
784 |
+
• High vocal tendency
|
785 |
+
• Sharp terrier bark
|
786 |
+
• Alert watchdog
|
787 |
+
• Frequent barking
|
788 |
+
|
789 |
+
Noise level: High
|
790 |
+
Barking triggers:
|
791 |
+
• Small animals
|
792 |
+
• Territory defense
|
793 |
+
• Excitement
|
794 |
+
• Strange sounds
|
795 |
+
""",
|
796 |
+
"noise_level": "High",
|
797 |
+
"source": "Breed Behavior Database, 2024"
|
798 |
+
},
|
799 |
+
|
800 |
+
"Leonberg": {
|
801 |
+
"noise_notes": """
|
802 |
+
Typical noise characteristics:
|
803 |
+
• Low to moderate barker
|
804 |
+
• Deep, powerful bark
|
805 |
+
• Calm demeanor
|
806 |
+
• Alert watchdog
|
807 |
+
|
808 |
+
Noise level: Low-Moderate
|
809 |
+
Barking triggers:
|
810 |
+
• Family protection
|
811 |
+
• Territory defense
|
812 |
+
• Suspicious activity
|
813 |
+
• Greeting
|
814 |
+
""",
|
815 |
+
"noise_level": "Low-Moderate",
|
816 |
+
"source": "Breed Behavior Database, 2024"
|
817 |
+
},
|
818 |
+
|
819 |
+
"Lhasa": {
|
820 |
+
"noise_notes": """
|
821 |
+
Typical noise characteristics:
|
822 |
+
• Frequent barker
|
823 |
+
• Sharp, alert bark
|
824 |
+
• Watchdog vocalizations
|
825 |
+
• Territory defense
|
826 |
+
|
827 |
+
Noise level: High
|
828 |
+
Barking triggers:
|
829 |
+
• Stranger alerts
|
830 |
+
• Territory protection
|
831 |
+
• Unusual sounds
|
832 |
+
• Attention seeking
|
833 |
+
""",
|
834 |
+
"noise_level": "High",
|
835 |
+
"source": "Breed Behavior Database, 2024"
|
836 |
+
},
|
837 |
+
|
838 |
+
"Maltese_Dog": {
|
839 |
+
"noise_notes": """
|
840 |
+
Typical noise characteristics:
|
841 |
+
• High vocal tendency
|
842 |
+
• Sharp, high-pitched bark
|
843 |
+
• Alert watchdog
|
844 |
+
• Frequent barking
|
845 |
+
|
846 |
+
Noise level: High
|
847 |
+
Barking triggers:
|
848 |
+
• Stranger alerts
|
849 |
+
• Attention seeking
|
850 |
+
• Excitement
|
851 |
+
• Separation anxiety
|
852 |
+
""",
|
853 |
+
"noise_level": "High",
|
854 |
+
"source": "Breed Behavior Database, 2024"
|
855 |
+
},
|
856 |
+
|
857 |
+
"Mexican_Hairless": {
|
858 |
+
"noise_notes": """
|
859 |
+
Typical noise characteristics:
|
860 |
+
• Moderate barker
|
861 |
+
• Alert vocalizations
|
862 |
+
• Watchdog tendency
|
863 |
+
• Social sounds
|
864 |
+
|
865 |
+
Noise level: Moderate
|
866 |
+
Barking triggers:
|
867 |
+
• Territory defense
|
868 |
+
• Strange noises
|
869 |
+
• Social interaction
|
870 |
+
• Temperature changes
|
871 |
+
""",
|
872 |
+
"noise_level": "Moderate",
|
873 |
+
"source": "Breed Behavior Database, 2024"
|
874 |
+
},
|
875 |
+
|
876 |
+
"Newfoundland": {
|
877 |
+
"noise_notes": """
|
878 |
+
Typical noise characteristics:
|
879 |
+
• Low barker
|
880 |
+
• Deep, gentle bark
|
881 |
+
• Quiet nature
|
882 |
+
• Calm demeanor
|
883 |
+
|
884 |
+
Noise level: Low
|
885 |
+
Barking triggers:
|
886 |
+
• Water activities
|
887 |
+
• Family protection
|
888 |
+
• Greeting friends
|
889 |
+
• Rare threats
|
890 |
+
""",
|
891 |
+
"noise_level": "Low",
|
892 |
+
"source": "Breed Behavior Database, 2024"
|
893 |
+
},
|
894 |
+
|
895 |
+
"Norfolk_Terrier": {
|
896 |
+
"noise_notes": """
|
897 |
+
Typical noise characteristics:
|
898 |
+
• High vocal tendency
|
899 |
+
• Sharp terrier bark
|
900 |
+
• Alert watchdog
|
901 |
+
• Frequent barking
|
902 |
+
|
903 |
+
Noise level: High
|
904 |
+
Barking triggers:
|
905 |
+
• Small animals
|
906 |
+
• Territory defense
|
907 |
+
• Excitement
|
908 |
+
• Play time
|
909 |
+
""",
|
910 |
+
"noise_level": "High",
|
911 |
+
"source": "Breed Behavior Database, 2024"
|
912 |
+
},
|
913 |
+
|
914 |
+
"Norwegian_Elkhound": {
|
915 |
+
"noise_notes": """
|
916 |
+
Typical noise characteristics:
|
917 |
+
• Moderate to high barker
|
918 |
+
• Alert hunting bark
|
919 |
+
• Territory defense
|
920 |
+
• Pack vocalizations
|
921 |
+
|
922 |
+
Noise level: Moderate-High
|
923 |
+
Barking triggers:
|
924 |
+
• Hunting instincts
|
925 |
+
• Territory protection
|
926 |
+
• Pack communication
|
927 |
+
• Strange sounds
|
928 |
+
""",
|
929 |
+
"noise_level": "Moderate-High",
|
930 |
+
"source": "Breed Behavior Database, 2024"
|
931 |
+
},
|
932 |
+
|
933 |
+
"Norwich_Terrier": {
|
934 |
+
"noise_notes": """
|
935 |
+
Typical noise characteristics:
|
936 |
+
• High vocal tendency
|
937 |
+
• Sharp, fearless bark
|
938 |
+
• Alert watchdog
|
939 |
+
• Frequent barking
|
940 |
+
|
941 |
+
Noise level: High
|
942 |
+
Barking triggers:
|
943 |
+
• Small prey
|
944 |
+
• Territory defense
|
945 |
+
• Excitement
|
946 |
+
• Social interaction
|
947 |
+
""",
|
948 |
+
"noise_level": "High",
|
949 |
+
"source": "Breed Behavior Database, 2024"
|
950 |
+
},
|
951 |
+
|
952 |
+
"Old_English_Sheepdog": {
|
953 |
+
"noise_notes": """
|
954 |
+
Typical noise characteristics:
|
955 |
+
• Moderate barker
|
956 |
+
• Deep, resonant bark
|
957 |
+
• Herding vocalizations
|
958 |
+
• Alert watchdog
|
959 |
+
|
960 |
+
Noise level: Moderate
|
961 |
+
Barking triggers:
|
962 |
+
• Herding instincts
|
963 |
+
• Family protection
|
964 |
+
• Social interaction
|
965 |
+
• Moving objects
|
966 |
+
""",
|
967 |
+
"noise_level": "Moderate",
|
968 |
+
"source": "Breed Behavior Database, 2024"
|
969 |
+
},
|
970 |
+
|
971 |
+
"Pekinese": {
|
972 |
+
"noise_notes": """
|
973 |
+
Typical noise characteristics:
|
974 |
+
• High vocal tendency
|
975 |
+
• Sharp, frequent barks
|
976 |
+
• Alert watchdog
|
977 |
+
• Territory defense
|
978 |
+
|
979 |
+
Noise level: High
|
980 |
+
Barking triggers:
|
981 |
+
• Stranger alerts
|
982 |
+
• Territory protection
|
983 |
+
• Attention seeking
|
984 |
+
• Suspicious activity
|
985 |
+
""",
|
986 |
+
"noise_level": "High",
|
987 |
+
"source": "Breed Behavior Database, 2024"
|
988 |
+
},
|
989 |
+
|
990 |
+
"Pembroke": {
|
991 |
+
"noise_notes": """
|
992 |
+
Typical noise characteristics:
|
993 |
+
• High vocal tendency
|
994 |
+
• Sharp herding barks
|
995 |
+
• Alert vocalizations
|
996 |
+
• Frequent barking
|
997 |
+
|
998 |
+
Noise level: High
|
999 |
+
Barking triggers:
|
1000 |
+
• Herding instincts
|
1001 |
+
• Movement
|
1002 |
+
• Territory defense
|
1003 |
+
• Social interaction
|
1004 |
+
""",
|
1005 |
+
"noise_level": "High",
|
1006 |
+
"source": "Breed Behavior Database, 2024"
|
1007 |
+
},
|
1008 |
+
|
1009 |
+
"Pomeranian": {
|
1010 |
+
"noise_notes": """
|
1011 |
+
Typical noise characteristics:
|
1012 |
+
• Very vocal breed
|
1013 |
+
• High-pitched barks
|
1014 |
+
• Alert watchdog
|
1015 |
+
• Frequent barking
|
1016 |
+
|
1017 |
+
Noise level: High
|
1018 |
+
Barking triggers:
|
1019 |
+
• Stranger alerts
|
1020 |
+
• Attention seeking
|
1021 |
+
• Excitement
|
1022 |
+
• Territory defense
|
1023 |
+
""",
|
1024 |
+
"noise_level": "High",
|
1025 |
+
"source": "Breed Behavior Database, 2024"
|
1026 |
+
},
|
1027 |
+
|
1028 |
+
"Rhodesian_Ridgeback": {
|
1029 |
+
"noise_notes": """
|
1030 |
+
Typical noise characteristics:
|
1031 |
+
• Low to moderate barker
|
1032 |
+
• Deep, powerful bark
|
1033 |
+
• Alert watchdog
|
1034 |
+
• Controlled vocalizations
|
1035 |
+
|
1036 |
+
Noise level: Low-Moderate
|
1037 |
+
Barking triggers:
|
1038 |
+
• Serious threats
|
1039 |
+
• Territory defense
|
1040 |
+
• Family protection
|
1041 |
+
• Hunting instincts
|
1042 |
+
""",
|
1043 |
+
"noise_level": "Low-Moderate",
|
1044 |
+
"source": "Breed Behavior Database, 2024"
|
1045 |
+
},
|
1046 |
+
|
1047 |
+
"Rottweiler": {
|
1048 |
+
"noise_notes": """
|
1049 |
+
Typical noise characteristics:
|
1050 |
+
• Moderate barker
|
1051 |
+
• Deep, intimidating bark
|
1052 |
+
• Alert watchdog
|
1053 |
+
• Controlled vocalizations
|
1054 |
+
|
1055 |
+
Noise level: Moderate
|
1056 |
+
Barking triggers:
|
1057 |
+
• Territory defense
|
1058 |
+
• Family protection
|
1059 |
+
• Suspicious activity
|
1060 |
+
• Warning signals
|
1061 |
+
""",
|
1062 |
+
"noise_level": "Moderate",
|
1063 |
+
"source": "Breed Behavior Database, 2024"
|
1064 |
+
},
|
1065 |
+
|
1066 |
+
"Saint_Bernard": {
|
1067 |
+
"noise_notes": """
|
1068 |
+
Typical noise characteristics:
|
1069 |
+
• Low to moderate barker
|
1070 |
+
• Deep, powerful bark
|
1071 |
+
• Gentle nature
|
1072 |
+
• Quiet indoors
|
1073 |
+
|
1074 |
+
Noise level: Low-Moderate
|
1075 |
+
Barking triggers:
|
1076 |
+
• Family protection
|
1077 |
+
• Greeting visitors
|
1078 |
+
• Emergency alerts
|
1079 |
+
• Play time
|
1080 |
+
""",
|
1081 |
+
"noise_level": "Low-Moderate",
|
1082 |
+
"source": "Breed Behavior Database, 2024"
|
1083 |
+
},
|
1084 |
+
|
1085 |
+
"Saluki": {
|
1086 |
+
"noise_notes": """
|
1087 |
+
Typical noise characteristics:
|
1088 |
+
• Low barker
|
1089 |
+
• Quiet nature
|
1090 |
+
• Gentle vocalizations
|
1091 |
+
• Reserved temperament
|
1092 |
+
|
1093 |
+
Noise level: Low
|
1094 |
+
Barking triggers:
|
1095 |
+
• Prey sighting
|
1096 |
+
• Exercise time
|
1097 |
+
• Rare occasions
|
1098 |
+
• Social interaction
|
1099 |
+
""",
|
1100 |
+
"noise_level": "Low",
|
1101 |
+
"source": "Breed Behavior Database, 2024"
|
1102 |
+
},
|
1103 |
+
|
1104 |
+
"Samoyed": {
|
1105 |
+
"noise_notes": """
|
1106 |
+
Typical noise characteristics:
|
1107 |
+
• High vocal tendency
|
1108 |
+
• Howling common
|
1109 |
+
• Social vocalizations
|
1110 |
+
• Pack communication
|
1111 |
+
|
1112 |
+
Noise level: High
|
1113 |
+
Barking triggers:
|
1114 |
+
• Social interaction
|
1115 |
+
• Pack activities
|
1116 |
+
• Excitement
|
1117 |
+
• Attention seeking
|
1118 |
+
""",
|
1119 |
+
"noise_level": "High",
|
1120 |
+
"source": "Breed Behavior Database, 2024"
|
1121 |
+
},
|
1122 |
+
|
1123 |
+
"Scotch_Terrier": {
|
1124 |
+
"noise_notes": """
|
1125 |
+
Typical noise characteristics:
|
1126 |
+
• High vocal tendency
|
1127 |
+
• Sharp terrier bark
|
1128 |
+
• Alert watchdog
|
1129 |
+
• Frequent barking
|
1130 |
+
|
1131 |
+
Noise level: High
|
1132 |
+
Barking triggers:
|
1133 |
+
• Territory defense
|
1134 |
+
• Small animals
|
1135 |
+
• Stranger alerts
|
1136 |
+
• Excitement
|
1137 |
+
""",
|
1138 |
+
"noise_level": "High",
|
1139 |
+
"source": "Breed Behavior Database, 2024"
|
1140 |
+
},
|
1141 |
+
|
1142 |
+
"Scottish_Deerhound": {
|
1143 |
+
"noise_notes": """
|
1144 |
+
Typical noise characteristics:
|
1145 |
+
• Low barker
|
1146 |
+
• Quiet nature
|
1147 |
+
• Gentle vocalizations
|
1148 |
+
• Reserved temperament
|
1149 |
+
|
1150 |
+
Noise level: Low
|
1151 |
+
Barking triggers:
|
1152 |
+
• Prey sighting
|
1153 |
+
• Exercise time
|
1154 |
+
• Family interaction
|
1155 |
+
• Rare occasions
|
1156 |
+
""",
|
1157 |
+
"noise_level": "Low",
|
1158 |
+
"source": "Breed Behavior Database, 2024"
|
1159 |
+
},
|
1160 |
+
|
1161 |
+
"Sealyham_Terrier": {
|
1162 |
+
"noise_notes": """
|
1163 |
+
Typical noise characteristics:
|
1164 |
+
• High vocal tendency
|
1165 |
+
• Sharp terrier bark
|
1166 |
+
• Alert watchdog
|
1167 |
+
• Frequent barking
|
1168 |
+
|
1169 |
+
Noise level: High
|
1170 |
+
Barking triggers:
|
1171 |
+
• Small animals
|
1172 |
+
• Territory defense
|
1173 |
+
• Excitement
|
1174 |
+
• Strange noises
|
1175 |
+
""",
|
1176 |
+
"noise_level": "High",
|
1177 |
+
"source": "Breed Behavior Database, 2024"
|
1178 |
+
},
|
1179 |
+
|
1180 |
+
"Shetland_Sheepdog": {
|
1181 |
+
"noise_notes": """
|
1182 |
+
Typical noise characteristics:
|
1183 |
+
• High vocal tendency
|
1184 |
+
• Sharp herding barks
|
1185 |
+
• Alert watchdog
|
1186 |
+
• Frequent barking
|
1187 |
+
|
1188 |
+
Noise level: High
|
1189 |
+
Barking triggers:
|
1190 |
+
• Herding instincts
|
1191 |
+
• Moving objects
|
1192 |
+
• Strange sounds
|
1193 |
+
• Territory defense
|
1194 |
+
""",
|
1195 |
+
"noise_level": "High",
|
1196 |
+
"source": "Breed Behavior Database, 2024"
|
1197 |
+
},
|
1198 |
+
|
1199 |
+
"Shih-Tzu": {
|
1200 |
+
"noise_notes": """
|
1201 |
+
Typical noise characteristics:
|
1202 |
+
• Moderate barker
|
1203 |
+
• Alert watchdog
|
1204 |
+
• Social vocalizations
|
1205 |
+
• Attention seeking
|
1206 |
+
|
1207 |
+
Noise level: Moderate
|
1208 |
+
Barking triggers:
|
1209 |
+
• Visitor alerts
|
1210 |
+
• Attention needs
|
1211 |
+
• Play time
|
1212 |
+
• Social interaction
|
1213 |
+
""",
|
1214 |
+
"noise_level": "Moderate",
|
1215 |
+
"source": "Breed Behavior Database, 2024"
|
1216 |
+
},
|
1217 |
+
|
1218 |
+
"Siberian_Husky": {
|
1219 |
+
"noise_notes": """
|
1220 |
+
Typical noise characteristics:
|
1221 |
+
• High vocal tendency
|
1222 |
+
• Howling common
|
1223 |
+
• Pack vocalizations
|
1224 |
+
• Various vocal sounds
|
1225 |
+
|
1226 |
+
Noise level: High
|
1227 |
+
Barking triggers:
|
1228 |
+
• Pack communication
|
1229 |
+
• Social interaction
|
1230 |
+
• Excitement
|
1231 |
+
• Environmental changes
|
1232 |
+
""",
|
1233 |
+
"noise_level": "High",
|
1234 |
+
"source": "Breed Behavior Database, 2024"
|
1235 |
+
},
|
1236 |
+
|
1237 |
+
"Staffordshire_Bullterrier": {
|
1238 |
+
"noise_notes": """
|
1239 |
+
Typical noise characteristics:
|
1240 |
+
• Moderate barker
|
1241 |
+
• Deep bark
|
1242 |
+
• Alert watchdog
|
1243 |
+
• Generally quiet
|
1244 |
+
|
1245 |
+
Noise level: Moderate
|
1246 |
+
Barking triggers:
|
1247 |
+
• Protection duties
|
1248 |
+
• Play time
|
1249 |
+
• Excitement
|
1250 |
+
• Strange sounds
|
1251 |
+
""",
|
1252 |
+
"noise_level": "Moderate",
|
1253 |
+
"source": "Breed Behavior Database, 2024"
|
1254 |
+
},
|
1255 |
+
|
1256 |
+
"Sussex_Spaniel": {
|
1257 |
+
"noise_notes": """
|
1258 |
+
Typical noise characteristics:
|
1259 |
+
• High vocal tendency
|
1260 |
+
• Deep bark
|
1261 |
+
• Hunting vocalizations
|
1262 |
+
• Alert watchdog
|
1263 |
+
|
1264 |
+
Noise level: High
|
1265 |
+
Barking triggers:
|
1266 |
+
• Hunting instincts
|
1267 |
+
• Bird sighting
|
1268 |
+
• Social interaction
|
1269 |
+
• Territory defense
|
1270 |
+
""",
|
1271 |
+
"noise_level": "High",
|
1272 |
+
"source": "Breed Behavior Database, 2024"
|
1273 |
+
},
|
1274 |
+
|
1275 |
+
"Tibetan_Mastiff": {
|
1276 |
+
"noise_notes": """
|
1277 |
+
Typical noise characteristics:
|
1278 |
+
• Moderate to high barker
|
1279 |
+
• Deep, powerful bark
|
1280 |
+
• Nocturnal barking
|
1281 |
+
• Guardian vocalizations
|
1282 |
+
|
1283 |
+
Noise level: Moderate-High
|
1284 |
+
Barking triggers:
|
1285 |
+
• Territory defense
|
1286 |
+
• Night guarding
|
1287 |
+
• Stranger alerts
|
1288 |
+
• Suspicious activity
|
1289 |
+
""",
|
1290 |
+
"noise_level": "Moderate-High",
|
1291 |
+
"source": "Breed Behavior Database, 2024"
|
1292 |
+
},
|
1293 |
+
|
1294 |
+
"Tibetan_Terrier": {
|
1295 |
+
"noise_notes": """
|
1296 |
+
Typical noise characteristics:
|
1297 |
+
• Moderate barker
|
1298 |
+
• Alert watchdog
|
1299 |
+
• Social vocalizations
|
1300 |
+
• Sensitive nature
|
1301 |
+
|
1302 |
+
Noise level: Moderate
|
1303 |
+
Barking triggers:
|
1304 |
+
• Strange sounds
|
1305 |
+
• Visitor alerts
|
1306 |
+
• Excitement
|
1307 |
+
• Social interaction
|
1308 |
+
""",
|
1309 |
+
"noise_level": "Moderate",
|
1310 |
+
"source": "Breed Behavior Database, 2024"
|
1311 |
+
},
|
1312 |
+
|
1313 |
+
"Walker_Hound": {
|
1314 |
+
"noise_notes": """
|
1315 |
+
Typical noise characteristics:
|
1316 |
+
• Very vocal breed
|
1317 |
+
• Loud bay and howl
|
1318 |
+
• Hunting vocalizations
|
1319 |
+
• Musical voice
|
1320 |
+
|
1321 |
+
Noise level: High
|
1322 |
+
Barking triggers:
|
1323 |
+
• Scent trails
|
1324 |
+
• Hunting instincts
|
1325 |
+
• Pack activities
|
1326 |
+
• Excitement
|
1327 |
+
""",
|
1328 |
+
"noise_level": "High",
|
1329 |
+
"source": "Breed Behavior Database, 2024"
|
1330 |
+
},
|
1331 |
+
|
1332 |
+
"Weimaraner": {
|
1333 |
+
"noise_notes": """
|
1334 |
+
Typical noise characteristics:
|
1335 |
+
• Moderate to high barker
|
1336 |
+
• Deep, resonant bark
|
1337 |
+
• Alert hunting dog
|
1338 |
+
• Vocal when excited
|
1339 |
+
|
1340 |
+
Noise level: Moderate-High
|
1341 |
+
Barking triggers:
|
1342 |
+
• Hunting instincts
|
1343 |
+
• Exercise needs
|
1344 |
+
• Separation anxiety
|
1345 |
+
• Prey drive
|
1346 |
+
""",
|
1347 |
+
"noise_level": "Moderate-High",
|
1348 |
+
"source": "Breed Behavior Database, 2024"
|
1349 |
+
},
|
1350 |
+
|
1351 |
+
"Welsh_Springer_Spaniel": {
|
1352 |
+
"noise_notes": """
|
1353 |
+
Typical noise characteristics:
|
1354 |
+
• Moderate barker
|
1355 |
+
• Alert watchdog
|
1356 |
+
• Hunting vocalizations
|
1357 |
+
• Social sounds
|
1358 |
+
|
1359 |
+
Noise level: Moderate
|
1360 |
+
Barking triggers:
|
1361 |
+
• Birds and wildlife
|
1362 |
+
• Family activities
|
1363 |
+
• Excitement
|
1364 |
+
• Strange sounds
|
1365 |
+
""",
|
1366 |
+
"noise_level": "Moderate",
|
1367 |
+
"source": "Breed Behavior Database, 2024"
|
1368 |
+
},
|
1369 |
+
|
1370 |
+
"West_Highland_White_Terrier": {
|
1371 |
+
"noise_notes": """
|
1372 |
+
Typical noise characteristics:
|
1373 |
+
• High vocal tendency
|
1374 |
+
• Sharp terrier bark
|
1375 |
+
• Alert watchdog
|
1376 |
+
• Frequent barking
|
1377 |
+
|
1378 |
+
Noise level: High
|
1379 |
+
Barking triggers:
|
1380 |
+
• Small animals
|
1381 |
+
• Territory defense
|
1382 |
+
• Excitement
|
1383 |
+
• Attention seeking
|
1384 |
+
""",
|
1385 |
+
"noise_level": "High",
|
1386 |
+
"source": "Breed Behavior Database, 2024"
|
1387 |
+
},
|
1388 |
+
|
1389 |
+
"Yorkshire_Terrier": {
|
1390 |
+
"noise_notes": """
|
1391 |
+
Typical noise characteristics:
|
1392 |
+
• Very vocal breed
|
1393 |
+
• High-pitched bark
|
1394 |
+
• Alert watchdog
|
1395 |
+
• Frequent barking
|
1396 |
+
|
1397 |
+
Noise level: High
|
1398 |
+
Barking triggers:
|
1399 |
+
• Stranger alerts
|
1400 |
+
• Territory defense
|
1401 |
+
• Attention seeking
|
1402 |
+
• Excitement
|
1403 |
+
""",
|
1404 |
+
"noise_level": "High",
|
1405 |
+
"source": "Breed Behavior Database, 2024"
|
1406 |
+
},
|
1407 |
+
|
1408 |
+
"Affenpinscher": {
|
1409 |
+
"noise_notes": """
|
1410 |
+
Typical noise characteristics:
|
1411 |
+
• Moderate to high barker
|
1412 |
+
• Sharp, terrier-like bark
|
1413 |
+
• Alert watchdog
|
1414 |
+
• Social vocalizations
|
1415 |
+
|
1416 |
+
Noise level: Moderate-High
|
1417 |
+
Barking triggers:
|
1418 |
+
• Strange noises
|
1419 |
+
• Territory defense
|
1420 |
+
• Social interaction
|
1421 |
+
• Play time
|
1422 |
+
""",
|
1423 |
+
"noise_level": "Moderate-High",
|
1424 |
+
"source": "Breed Behavior Database, 2024"
|
1425 |
+
},
|
1426 |
+
|
1427 |
+
"Basenji": {
|
1428 |
+
"noise_notes": """
|
1429 |
+
Typical noise characteristics:
|
1430 |
+
• Rarely barks
|
1431 |
+
• Unique yodeling sound
|
1432 |
+
• Quiet nature
|
1433 |
+
• Alternative vocalizations
|
1434 |
+
|
1435 |
+
Noise level: Low
|
1436 |
+
Barking triggers:
|
1437 |
+
• Excitement
|
1438 |
+
• Play time
|
1439 |
+
• Social communication
|
1440 |
+
• Rare occasions
|
1441 |
+
""",
|
1442 |
+
"noise_level": "Low",
|
1443 |
+
"source": "Breed Behavior Database, 2024"
|
1444 |
+
},
|
1445 |
+
|
1446 |
+
"Basset": {
|
1447 |
+
"noise_notes": """
|
1448 |
+
Typical noise characteristics:
|
1449 |
+
• High vocal tendency
|
1450 |
+
• Deep, melodious howl
|
1451 |
+
• Hunting bay
|
1452 |
+
• Frequent vocalizations
|
1453 |
+
|
1454 |
+
Noise level: High
|
1455 |
+
Barking triggers:
|
1456 |
+
• Scent trails
|
1457 |
+
• Hunting instincts
|
1458 |
+
• Loneliness
|
1459 |
+
• Social interaction
|
1460 |
+
""",
|
1461 |
+
"noise_level": "High",
|
1462 |
+
"source": "Breed Behavior Database, 2024"
|
1463 |
+
},
|
1464 |
+
|
1465 |
+
"Beagle": {
|
1466 |
+
"noise_notes": """
|
1467 |
+
Typical noise characteristics:
|
1468 |
+
• Very vocal breed
|
1469 |
+
• Musical bay and howl
|
1470 |
+
• Hunting vocalizations
|
1471 |
+
• Frequent barking
|
1472 |
+
|
1473 |
+
Noise level: High
|
1474 |
+
Barking triggers:
|
1475 |
+
• Scent trails
|
1476 |
+
• Pack mentality
|
1477 |
+
• Excitement
|
1478 |
+
• Attention seeking
|
1479 |
+
""",
|
1480 |
+
"noise_level": "High",
|
1481 |
+
"source": "Breed Behavior Database, 2024"
|
1482 |
+
},
|
1483 |
+
|
1484 |
+
"Black-and-Tan_Coonhound": {
|
1485 |
+
"noise_notes": """
|
1486 |
+
Typical noise characteristics:
|
1487 |
+
• High vocal tendency
|
1488 |
+
• Deep, loud bay
|
1489 |
+
• Hunting vocalizations
|
1490 |
+
• Musical howl
|
1491 |
+
|
1492 |
+
Noise level: High
|
1493 |
+
Barking triggers:
|
1494 |
+
• Scent trails
|
1495 |
+
• Hunting situations
|
1496 |
+
• Pack communication
|
1497 |
+
• Excitement
|
1498 |
+
""",
|
1499 |
+
"noise_level": "High",
|
1500 |
+
"source": "Breed Behavior Database, 2024"
|
1501 |
+
},
|
1502 |
+
|
1503 |
+
"Bloodhound": {
|
1504 |
+
"noise_notes": """
|
1505 |
+
Typical noise characteristics:
|
1506 |
+
• Moderate to high barker
|
1507 |
+
• Deep, powerful bay
|
1508 |
+
• Tracking vocalizations
|
1509 |
+
• Distinctive howl
|
1510 |
+
|
1511 |
+
Noise level: Moderate-High
|
1512 |
+
Barking triggers:
|
1513 |
+
• Scent trailing
|
1514 |
+
• Pack communication
|
1515 |
+
• Exercise needs
|
1516 |
+
• Social interaction
|
1517 |
+
""",
|
1518 |
+
"noise_level": "Moderate-High",
|
1519 |
+
"source": "Breed Behavior Database, 2024"
|
1520 |
+
},
|
1521 |
+
|
1522 |
+
"Bluetick": {
|
1523 |
+
"noise_notes": """
|
1524 |
+
Typical noise characteristics:
|
1525 |
+
• High vocal tendency
|
1526 |
+
• Deep bay and howl
|
1527 |
+
• Hunting vocalizations
|
1528 |
+
• Musical voice
|
1529 |
+
|
1530 |
+
Noise level: High
|
1531 |
+
Barking triggers:
|
1532 |
+
• Scent tracking
|
1533 |
+
• Hunting activities
|
1534 |
+
• Pack communication
|
1535 |
+
• Excitement
|
1536 |
+
""",
|
1537 |
+
"noise_level": "High",
|
1538 |
+
"source": "Breed Behavior Database, 2024"
|
1539 |
+
},
|
1540 |
+
|
1541 |
+
"Borzoi": {
|
1542 |
+
"noise_notes": """
|
1543 |
+
Typical noise characteristics:
|
1544 |
+
• Low barker
|
1545 |
+
• Quiet nature
|
1546 |
+
• Gentle vocalizations
|
1547 |
+
• Reserved temperament
|
1548 |
+
|
1549 |
+
Noise level: Low
|
1550 |
+
Barking triggers:
|
1551 |
+
• Prey sighting
|
1552 |
+
• Rare occasions
|
1553 |
+
• Social interaction
|
1554 |
+
• Exercise time
|
1555 |
+
""",
|
1556 |
+
"noise_level": "Low",
|
1557 |
+
"source": "Breed Behavior Database, 2024"
|
1558 |
+
},
|
1559 |
+
|
1560 |
+
"Boxer": {
|
1561 |
+
"noise_notes": """
|
1562 |
+
Typical noise characteristics:
|
1563 |
+
• Moderate barker
|
1564 |
+
• Distinctive growl-talk
|
1565 |
+
• Alert watchdog
|
1566 |
+
• Social vocalizations
|
1567 |
+
|
1568 |
+
Noise level: Moderate
|
1569 |
+
Barking triggers:
|
1570 |
+
• Play time
|
1571 |
+
• Protection duties
|
1572 |
+
• Excitement
|
1573 |
+
• Social interaction
|
1574 |
+
""",
|
1575 |
+
"noise_level": "Moderate",
|
1576 |
+
"source": "Breed Behavior Database, 2024"
|
1577 |
+
},
|
1578 |
+
|
1579 |
+
"Briard": {
|
1580 |
+
"noise_notes": """
|
1581 |
+
Typical noise characteristics:
|
1582 |
+
• Moderate barker
|
1583 |
+
• Alert watchdog
|
1584 |
+
• Herding vocalizations
|
1585 |
+
• Protective barking
|
1586 |
+
|
1587 |
+
Noise level: Moderate
|
1588 |
+
Barking triggers:
|
1589 |
+
• Herding instincts
|
1590 |
+
• Territory defense
|
1591 |
+
• Family protection
|
1592 |
+
• Strange sounds
|
1593 |
+
""",
|
1594 |
+
"noise_level": "Moderate",
|
1595 |
+
"source": "Breed Behavior Database, 2024"
|
1596 |
+
},
|
1597 |
+
|
1598 |
+
"Bull_Mastiff": {
|
1599 |
+
"noise_notes": """
|
1600 |
+
Typical noise characteristics:
|
1601 |
+
• Low to moderate barker
|
1602 |
+
• Deep, powerful bark
|
1603 |
+
• Quiet nature
|
1604 |
+
• Alert watchdog
|
1605 |
+
|
1606 |
+
Noise level: Low-Moderate
|
1607 |
+
Barking triggers:
|
1608 |
+
• Serious threats
|
1609 |
+
• Territory defense
|
1610 |
+
• Family protection
|
1611 |
+
• Suspicious activity
|
1612 |
+
""",
|
1613 |
+
"noise_level": "Low-Moderate",
|
1614 |
+
"source": "Breed Behavior Database, 2024"
|
1615 |
+
},
|
1616 |
+
|
1617 |
+
"Cairn": {
|
1618 |
+
"noise_notes": """
|
1619 |
+
Typical noise characteristics:
|
1620 |
+
• High vocal tendency
|
1621 |
+
• Sharp terrier bark
|
1622 |
+
• Alert watchdog
|
1623 |
+
• Frequent barking
|
1624 |
+
|
1625 |
+
Noise level: High
|
1626 |
+
Barking triggers:
|
1627 |
+
• Small animals
|
1628 |
+
• Territory defense
|
1629 |
+
• Excitement
|
1630 |
+
• Attention seeking
|
1631 |
+
""",
|
1632 |
+
"noise_level": "High",
|
1633 |
+
"source": "Breed Behavior Database, 2024"
|
1634 |
+
},
|
1635 |
+
|
1636 |
+
"Chow": {
|
1637 |
+
"noise_notes": """
|
1638 |
+
Typical noise characteristics:
|
1639 |
+
• Moderate barker
|
1640 |
+
• Deep bark
|
1641 |
+
• Alert watchdog
|
1642 |
+
• Reserved nature
|
1643 |
+
|
1644 |
+
Noise level: Moderate
|
1645 |
+
Barking triggers:
|
1646 |
+
• Territory defense
|
1647 |
+
• Stranger alerts
|
1648 |
+
• Family protection
|
1649 |
+
• Suspicious activity
|
1650 |
+
""",
|
1651 |
+
"noise_level": "Moderate",
|
1652 |
+
"source": "Breed Behavior Database, 2024"
|
1653 |
+
},
|
1654 |
+
|
1655 |
+
"Clumber": {
|
1656 |
+
"noise_notes": """
|
1657 |
+
Typical noise characteristics:
|
1658 |
+
• Low to moderate barker
|
1659 |
+
• Deep bark
|
1660 |
+
• Gentle nature
|
1661 |
+
• Hunting vocalizations
|
1662 |
+
|
1663 |
+
Noise level: Low-Moderate
|
1664 |
+
Barking triggers:
|
1665 |
+
• Hunting activities
|
1666 |
+
• Bird sighting
|
1667 |
+
• Social interaction
|
1668 |
+
• Play time
|
1669 |
+
""",
|
1670 |
+
"noise_level": "Low-Moderate",
|
1671 |
+
"source": "Breed Behavior Database, 2024"
|
1672 |
+
},
|
1673 |
+
|
1674 |
+
"Cocker_Spaniel": {
|
1675 |
+
"noise_notes": """
|
1676 |
+
Typical noise characteristics:
|
1677 |
+
• Moderate to high barker
|
1678 |
+
• Alert watchdog
|
1679 |
+
• Excited vocalizations
|
1680 |
+
• Social barking
|
1681 |
+
|
1682 |
+
Noise level: Moderate-High
|
1683 |
+
Barking triggers:
|
1684 |
+
• Birds and wildlife
|
1685 |
+
• Excitement
|
1686 |
+
• Attention seeking
|
1687 |
+
• Social interaction
|
1688 |
+
""",
|
1689 |
+
"noise_level": "Moderate-High",
|
1690 |
+
"source": "Breed Behavior Database, 2024"
|
1691 |
+
},
|
1692 |
+
|
1693 |
+
"Collie": {
|
1694 |
+
"noise_notes": """
|
1695 |
+
Typical noise characteristics:
|
1696 |
+
• High vocal tendency
|
1697 |
+
• Herding barks
|
1698 |
+
• Alert watchdog
|
1699 |
+
• Frequent barking
|
1700 |
+
|
1701 |
+
Noise level: High
|
1702 |
+
Barking triggers:
|
1703 |
+
• Herding instincts
|
1704 |
+
• Moving objects
|
1705 |
+
• Territory defense
|
1706 |
+
• Family protection
|
1707 |
+
""",
|
1708 |
+
"noise_level": "High",
|
1709 |
+
"source": "Breed Behavior Database, 2024"
|
1710 |
+
},
|
1711 |
+
|
1712 |
+
"Curly-Coated_Retriever": {
|
1713 |
+
"noise_notes": """
|
1714 |
+
Typical noise characteristics:
|
1715 |
+
• Low to moderate barker
|
1716 |
+
• Gentle vocalizations
|
1717 |
+
• Alert watchdog
|
1718 |
+
• Controlled barking
|
1719 |
+
|
1720 |
+
Noise level: Low-Moderate
|
1721 |
+
Barking triggers:
|
1722 |
+
• Water activities
|
1723 |
+
• Hunting situations
|
1724 |
+
• Family protection
|
1725 |
+
• Play time
|
1726 |
+
""",
|
1727 |
+
"noise_level": "Low-Moderate",
|
1728 |
+
"source": "Breed Behavior Database, 2024"
|
1729 |
+
},
|
1730 |
+
|
1731 |
+
"Dhole": {
|
1732 |
+
"noise_notes": """
|
1733 |
+
Typical noise characteristics:
|
1734 |
+
• High vocal tendency
|
1735 |
+
• Pack vocalizations
|
1736 |
+
• Whistling sounds
|
1737 |
+
• Various calls
|
1738 |
+
|
1739 |
+
Noise level: High
|
1740 |
+
Barking triggers:
|
1741 |
+
• Pack communication
|
1742 |
+
• Hunting activities
|
1743 |
+
• Social interaction
|
1744 |
+
• Territory defense
|
1745 |
+
""",
|
1746 |
+
"noise_level": "High",
|
1747 |
+
"source": "Breed Behavior Database, 2024"
|
1748 |
+
},
|
1749 |
+
|
1750 |
+
"Dingo": {
|
1751 |
+
"noise_notes": """
|
1752 |
+
Typical noise characteristics:
|
1753 |
+
• Moderate vocal tendency
|
1754 |
+
• Howling common
|
1755 |
+
• Unique vocalizations
|
1756 |
+
• Wild-type sounds
|
1757 |
+
|
1758 |
+
Noise level: Moderate
|
1759 |
+
Barking triggers:
|
1760 |
+
• Territory marking
|
1761 |
+
• Pack communication
|
1762 |
+
• Hunting instincts
|
1763 |
+
• Environmental changes
|
1764 |
+
""",
|
1765 |
+
"noise_level": "Moderate",
|
1766 |
+
"source": "Breed Behavior Database, 2024"
|
1767 |
+
},
|
1768 |
+
|
1769 |
+
"Flat-Coated_Retriever": {
|
1770 |
+
"noise_notes": """
|
1771 |
+
Typical noise characteristics:
|
1772 |
+
• Moderate barker
|
1773 |
+
• Friendly vocalizations
|
1774 |
+
• Alert watchdog
|
1775 |
+
• Social sounds
|
1776 |
+
|
1777 |
+
Noise level: Moderate
|
1778 |
+
Barking triggers:
|
1779 |
+
• Play time
|
1780 |
+
• Greeting people
|
1781 |
+
• Water activities
|
1782 |
+
• Excitement
|
1783 |
+
""",
|
1784 |
+
"noise_level": "Moderate",
|
1785 |
+
"source": "Breed Behavior Database, 2024"
|
1786 |
+
},
|
1787 |
+
|
1788 |
+
"Giant_Schnauzer": {
|
1789 |
+
"noise_notes": """
|
1790 |
+
Typical noise characteristics:
|
1791 |
+
• Moderate to high barker
|
1792 |
+
• Deep, powerful bark
|
1793 |
+
• Alert watchdog
|
1794 |
+
• Protective vocalizations
|
1795 |
+
|
1796 |
+
Noise level: Moderate-High
|
1797 |
+
Barking triggers:
|
1798 |
+
• Territory defense
|
1799 |
+
• Family protection
|
1800 |
+
• Suspicious activity
|
1801 |
+
• Work duties
|
1802 |
+
""",
|
1803 |
+
"noise_level": "Moderate-High",
|
1804 |
+
"source": "Breed Behavior Database, 2024"
|
1805 |
+
},
|
1806 |
+
|
1807 |
+
"Golden_Retriever": {
|
1808 |
+
"noise_notes": """
|
1809 |
+
Typical noise characteristics:
|
1810 |
+
• Moderate barker
|
1811 |
+
• Friendly vocalizations
|
1812 |
+
• Social sounds
|
1813 |
+
• Gentle barking
|
1814 |
+
|
1815 |
+
Noise level: Moderate
|
1816 |
+
Barking triggers:
|
1817 |
+
• Greeting people
|
1818 |
+
• Play time
|
1819 |
+
• Excitement
|
1820 |
+
• Social interaction
|
1821 |
+
""",
|
1822 |
+
"noise_level": "Moderate",
|
1823 |
+
"source": "Breed Behavior Database, 2024"
|
1824 |
+
},
|
1825 |
+
|
1826 |
+
"Groenendael": {
|
1827 |
+
"noise_notes": """
|
1828 |
+
Typical noise characteristics:
|
1829 |
+
• High vocal tendency
|
1830 |
+
• Alert watchdog
|
1831 |
+
• Herding vocalizations
|
1832 |
+
• Protective barking
|
1833 |
+
|
1834 |
+
Noise level: High
|
1835 |
+
Barking triggers:
|
1836 |
+
• Herding instincts
|
1837 |
+
• Territory defense
|
1838 |
+
• Strange sounds
|
1839 |
+
• Family protection
|
1840 |
+
""",
|
1841 |
+
"noise_level": "High",
|
1842 |
+
"source": "Breed Behavior Database, 2024"
|
1843 |
+
},
|
1844 |
+
|
1845 |
+
"Keeshond": {
|
1846 |
+
"noise_notes": """
|
1847 |
+
Typical noise characteristics:
|
1848 |
+
• High vocal tendency
|
1849 |
+
• Alert barking
|
1850 |
+
• Social vocalizations
|
1851 |
+
• Watch dog barking
|
1852 |
+
|
1853 |
+
Noise level: High
|
1854 |
+
Barking triggers:
|
1855 |
+
• Stranger alerts
|
1856 |
+
• Social interaction
|
1857 |
+
• Excitement
|
1858 |
+
• Territory defense
|
1859 |
+
""",
|
1860 |
+
"noise_level": "High",
|
1861 |
+
"source": "Breed Behavior Database, 2024"
|
1862 |
+
},
|
1863 |
+
|
1864 |
+
"Kelpie": {
|
1865 |
+
"noise_notes": """
|
1866 |
+
Typical noise characteristics:
|
1867 |
+
• Moderate to high barker
|
1868 |
+
• Herding vocalizations
|
1869 |
+
• Alert watchdog
|
1870 |
+
• Work-related barking
|
1871 |
+
|
1872 |
+
Noise level: Moderate-High
|
1873 |
+
Barking triggers:
|
1874 |
+
• Herding instincts
|
1875 |
+
• Work activities
|
1876 |
+
• Moving objects
|
1877 |
+
• Territory defense
|
1878 |
+
""",
|
1879 |
+
"noise_level": "Moderate-High",
|
1880 |
+
"source": "Breed Behavior Database, 2024"
|
1881 |
+
},
|
1882 |
+
|
1883 |
+
"Komondor": {
|
1884 |
+
"noise_notes": """
|
1885 |
+
Typical noise characteristics:
|
1886 |
+
• Moderate barker
|
1887 |
+
• Deep, powerful bark
|
1888 |
+
• Guardian vocalizations
|
1889 |
+
• Nocturnal barking
|
1890 |
+
|
1891 |
+
Noise level: Moderate
|
1892 |
+
Barking triggers:
|
1893 |
+
• Livestock protection
|
1894 |
+
• Territory defense
|
1895 |
+
• Night guarding
|
1896 |
+
• Suspicious activity
|
1897 |
+
""",
|
1898 |
+
"noise_level": "Moderate",
|
1899 |
+
"source": "Breed Behavior Database, 2024"
|
1900 |
+
},
|
1901 |
+
|
1902 |
+
"Kuvasz": {
|
1903 |
+
"noise_notes": """
|
1904 |
+
Typical noise characteristics:
|
1905 |
+
• Moderate to high barker
|
1906 |
+
• Deep, powerful bark
|
1907 |
+
• Guardian vocalizations
|
1908 |
+
• Nocturnal activity
|
1909 |
+
|
1910 |
+
Noise level: Moderate-High
|
1911 |
+
Barking triggers:
|
1912 |
+
• Livestock protection
|
1913 |
+
• Territory defense
|
1914 |
+
• Night patrol
|
1915 |
+
• Suspicious activity
|
1916 |
+
""",
|
1917 |
+
"noise_level": "Moderate-High",
|
1918 |
+
"source": "Breed Behavior Database, 2024"
|
1919 |
+
},
|
1920 |
+
|
1921 |
+
"Malamute": {
|
1922 |
+
"noise_notes": """
|
1923 |
+
Typical noise characteristics:
|
1924 |
+
• High vocal tendency
|
1925 |
+
• Howling common
|
1926 |
+
• Various vocalizations
|
1927 |
+
• Pack sounds
|
1928 |
+
|
1929 |
+
Noise level: High
|
1930 |
+
Barking triggers:
|
1931 |
+
• Pack communication
|
1932 |
+
• Social interaction
|
1933 |
+
• Excitement
|
1934 |
+
• Environmental changes
|
1935 |
+
""",
|
1936 |
+
"noise_level": "High",
|
1937 |
+
"source": "Breed Behavior Database, 2024"
|
1938 |
+
},
|
1939 |
+
|
1940 |
+
"Malinois": {
|
1941 |
+
"noise_notes": """
|
1942 |
+
Typical noise characteristics:
|
1943 |
+
• Moderate to high barker
|
1944 |
+
• Alert watchdog
|
1945 |
+
• Working vocalizations
|
1946 |
+
• Protective barking
|
1947 |
+
|
1948 |
+
Noise level: Moderate-High
|
1949 |
+
Barking triggers:
|
1950 |
+
• Work duties
|
1951 |
+
• Protection tasks
|
1952 |
+
• Territory defense
|
1953 |
+
• Strange sounds
|
1954 |
+
""",
|
1955 |
+
"noise_level": "Moderate-High",
|
1956 |
+
"source": "Breed Behavior Database, 2024"
|
1957 |
+
},
|
1958 |
+
|
1959 |
+
"Miniature_Pinscher": {
|
1960 |
+
"noise_notes": """
|
1961 |
+
Typical noise characteristics:
|
1962 |
+
• High vocal tendency
|
1963 |
+
• Sharp, frequent barks
|
1964 |
+
• Alert watchdog
|
1965 |
+
• Territory defense
|
1966 |
+
|
1967 |
+
Noise level: High
|
1968 |
+
Barking triggers:
|
1969 |
+
• Stranger alerts
|
1970 |
+
• Territory defense
|
1971 |
+
• Excitement
|
1972 |
+
• Attention seeking
|
1973 |
+
""",
|
1974 |
+
"noise_level": "High",
|
1975 |
+
"source": "Breed Behavior Database, 2024"
|
1976 |
+
},
|
1977 |
+
|
1978 |
+
"Miniature_Poodle": {
|
1979 |
+
"noise_notes": """
|
1980 |
+
Typical noise characteristics:
|
1981 |
+
• Moderate to high barker
|
1982 |
+
• Alert watchdog
|
1983 |
+
• Social vocalizations
|
1984 |
+
• Excitement barking
|
1985 |
+
|
1986 |
+
Noise level: Moderate-High
|
1987 |
+
Barking triggers:
|
1988 |
+
• Stranger alerts
|
1989 |
+
• Social interaction
|
1990 |
+
• Attention seeking
|
1991 |
+
• Play time
|
1992 |
+
""",
|
1993 |
+
"noise_level": "Moderate-High",
|
1994 |
+
"source": "Breed Behavior Database, 2024"
|
1995 |
+
},
|
1996 |
+
|
1997 |
+
"Miniature_Schnauzer": {
|
1998 |
+
"noise_notes": """
|
1999 |
+
Typical noise characteristics:
|
2000 |
+
• High vocal tendency
|
2001 |
+
• Sharp terrier bark
|
2002 |
+
• Alert watchdog
|
2003 |
+
• Frequent barking
|
2004 |
+
|
2005 |
+
Noise level: High
|
2006 |
+
Barking triggers:
|
2007 |
+
• Territory defense
|
2008 |
+
• Stranger alerts
|
2009 |
+
• Excitement
|
2010 |
+
• Small animals
|
2011 |
+
""",
|
2012 |
+
"noise_level": "High",
|
2013 |
+
"source": "Breed Behavior Database, 2024"
|
2014 |
+
},
|
2015 |
+
|
2016 |
+
"Otterhound": {
|
2017 |
+
"noise_notes": """
|
2018 |
+
Typical noise characteristics:
|
2019 |
+
• High vocal tendency
|
2020 |
+
• Deep bay and howl
|
2021 |
+
• Hunting vocalizations
|
2022 |
+
• Musical voice
|
2023 |
+
|
2024 |
+
Noise level: High
|
2025 |
+
Barking triggers:
|
2026 |
+
• Scent tracking
|
2027 |
+
• Water activities
|
2028 |
+
• Pack communication
|
2029 |
+
• Excitement
|
2030 |
+
""",
|
2031 |
+
"noise_level": "High",
|
2032 |
+
"source": "Breed Behavior Database, 2024"
|
2033 |
+
},
|
2034 |
+
|
2035 |
+
"Papillon": {
|
2036 |
+
"noise_notes": """
|
2037 |
+
Typical noise characteristics:
|
2038 |
+
• Moderate to high barker
|
2039 |
+
• High-pitched bark
|
2040 |
+
• Alert watchdog
|
2041 |
+
• Social vocalizations
|
2042 |
+
|
2043 |
+
Noise level: Moderate-High
|
2044 |
+
Barking triggers:
|
2045 |
+
• Strange sounds
|
2046 |
+
• Visitor alerts
|
2047 |
+
• Excitement
|
2048 |
+
• Attention seeking
|
2049 |
+
""",
|
2050 |
+
"noise_level": "Moderate-High",
|
2051 |
+
"source": "Breed Behavior Database, 2024"
|
2052 |
+
},
|
2053 |
+
|
2054 |
+
"Pug": {
|
2055 |
+
"noise_notes": """
|
2056 |
+
Typical noise characteristics:
|
2057 |
+
• Low to moderate barker
|
2058 |
+
• Snoring common
|
2059 |
+
• Social vocalizations
|
2060 |
+
• Various sounds
|
2061 |
+
|
2062 |
+
Noise level: Low-Moderate
|
2063 |
+
Barking triggers:
|
2064 |
+
• Play time
|
2065 |
+
• Excitement
|
2066 |
+
• Attention seeking
|
2067 |
+
• Social interaction
|
2068 |
+
""",
|
2069 |
+
"noise_level": "Low-Moderate",
|
2070 |
+
"source": "Breed Behavior Database, 2024"
|
2071 |
+
},
|
2072 |
+
|
2073 |
+
"Redbone": {
|
2074 |
+
"noise_notes": """
|
2075 |
+
Typical noise characteristics:
|
2076 |
+
• High vocal tendency
|
2077 |
+
• Deep bay and howl
|
2078 |
+
• Hunting vocalizations
|
2079 |
+
• Musical voice
|
2080 |
+
|
2081 |
+
Noise level: High
|
2082 |
+
Barking triggers:
|
2083 |
+
• Scent trails
|
2084 |
+
• Hunting activities
|
2085 |
+
• Pack communication
|
2086 |
+
• Excitement
|
2087 |
+
""",
|
2088 |
+
"noise_level": "High",
|
2089 |
+
"source": "Breed Behavior Database, 2024"
|
2090 |
+
},
|
2091 |
+
|
2092 |
+
"Schipperke": {
|
2093 |
+
"noise_notes": """
|
2094 |
+
Typical noise characteristics:
|
2095 |
+
• High vocal tendency
|
2096 |
+
• Sharp, frequent barks
|
2097 |
+
• Alert watchdog
|
2098 |
+
• Territorial vocalizations
|
2099 |
+
|
2100 |
+
Noise level: High
|
2101 |
+
Barking triggers:
|
2102 |
+
• Stranger alerts
|
2103 |
+
• Territory defense
|
2104 |
+
• Excitement
|
2105 |
+
• Movement
|
2106 |
+
""",
|
2107 |
+
"noise_level": "High",
|
2108 |
+
"source": "Breed Behavior Database, 2024"
|
2109 |
+
},
|
2110 |
+
|
2111 |
+
"Silky_Terrier": {
|
2112 |
+
"noise_notes": """
|
2113 |
+
Typical noise characteristics:
|
2114 |
+
• High vocal tendency
|
2115 |
+
• Sharp terrier bark
|
2116 |
+
• Alert watchdog
|
2117 |
+
• Frequent barking
|
2118 |
+
|
2119 |
+
Noise level: High
|
2120 |
+
Barking triggers:
|
2121 |
+
• Small animals
|
2122 |
+
• Territory defense
|
2123 |
+
• Stranger alerts
|
2124 |
+
• Excitement
|
2125 |
+
""",
|
2126 |
+
"noise_level": "High",
|
2127 |
+
"source": "Breed Behavior Database, 2024"
|
2128 |
+
},
|
2129 |
+
|
2130 |
+
"Soft-Coated_Wheaten_Terrier": {
|
2131 |
+
"noise_notes": """
|
2132 |
+
Typical noise characteristics:
|
2133 |
+
• Moderate barker
|
2134 |
+
• Alert watchdog
|
2135 |
+
• Friendly vocalizations
|
2136 |
+
• Social sounds
|
2137 |
+
|
2138 |
+
Noise level: Moderate
|
2139 |
+
Barking triggers:
|
2140 |
+
• Greeting visitors
|
2141 |
+
• Play time
|
2142 |
+
• Excitement
|
2143 |
+
• Strange noises
|
2144 |
+
""",
|
2145 |
+
"noise_level": "Moderate",
|
2146 |
+
"source": "Breed Behavior Database, 2024"
|
2147 |
+
},
|
2148 |
+
|
2149 |
+
"Standard_Poodle": {
|
2150 |
+
"noise_notes": """
|
2151 |
+
Typical noise characteristics:
|
2152 |
+
• Moderate barker
|
2153 |
+
• Alert watchdog
|
2154 |
+
• Intelligent communication
|
2155 |
+
• Controlled barking
|
2156 |
+
|
2157 |
+
Noise level: Moderate
|
2158 |
+
Barking triggers:
|
2159 |
+
• Stranger alerts
|
2160 |
+
• Protection duties
|
2161 |
+
• Social interaction
|
2162 |
+
• Mental stimulation
|
2163 |
+
""",
|
2164 |
+
"noise_level": "Moderate",
|
2165 |
+
"source": "Breed Behavior Database, 2024"
|
2166 |
+
},
|
2167 |
+
|
2168 |
+
"Standard_Schnauzer": {
|
2169 |
+
"noise_notes": """
|
2170 |
+
Typical noise characteristics:
|
2171 |
+
• Moderate to high barker
|
2172 |
+
• Alert watchdog
|
2173 |
+
• Territorial vocalizations
|
2174 |
+
• Protective barking
|
2175 |
+
|
2176 |
+
Noise level: Moderate-High
|
2177 |
+
Barking triggers:
|
2178 |
+
• Territory defense
|
2179 |
+
• Family protection
|
2180 |
+
• Stranger alerts
|
2181 |
+
• Suspicious activity
|
2182 |
+
""",
|
2183 |
+
"noise_level": "Moderate-High",
|
2184 |
+
"source": "Breed Behavior Database, 2024"
|
2185 |
+
},
|
2186 |
+
|
2187 |
+
"Toy_Poodle": {
|
2188 |
+
"noise_notes": """
|
2189 |
+
Typical noise characteristics:
|
2190 |
+
• High vocal tendency
|
2191 |
+
• Sharp, frequent barks
|
2192 |
+
• Alert watchdog
|
2193 |
+
• Excited vocalizations
|
2194 |
+
|
2195 |
+
Noise level: High
|
2196 |
+
Barking triggers:
|
2197 |
+
• Stranger alerts
|
2198 |
+
• Attention seeking
|
2199 |
+
• Excitement
|
2200 |
+
• Social interaction
|
2201 |
+
""",
|
2202 |
+
"noise_level": "High",
|
2203 |
+
"source": "Breed Behavior Database, 2024"
|
2204 |
+
},
|
2205 |
+
|
2206 |
+
"Toy_Terrier": {
|
2207 |
+
"noise_notes": """
|
2208 |
+
Typical noise characteristics:
|
2209 |
+
• High vocal tendency
|
2210 |
+
• Sharp terrier bark
|
2211 |
+
• Alert watchdog
|
2212 |
+
• Frequent barking
|
2213 |
+
|
2214 |
+
Noise level: High
|
2215 |
+
Barking triggers:
|
2216 |
+
• Small animals
|
2217 |
+
• Territory defense
|
2218 |
+
• Attention seeking
|
2219 |
+
• Excitement
|
2220 |
+
""",
|
2221 |
+
"noise_level": "High",
|
2222 |
+
"source": "Breed Behavior Database, 2024"
|
2223 |
+
},
|
2224 |
+
|
2225 |
+
"Vizsla": {
|
2226 |
+
"noise_notes": """
|
2227 |
+
Typical noise characteristics:
|
2228 |
+
• Moderate barker
|
2229 |
+
• Alert hunting dog
|
2230 |
+
• Social vocalizations
|
2231 |
+
• Controlled barking
|
2232 |
+
|
2233 |
+
Noise level: Moderate
|
2234 |
+
Barking triggers:
|
2235 |
+
• Hunting situations
|
2236 |
+
• Exercise needs
|
2237 |
+
• Social interaction
|
2238 |
+
• Separation anxiety
|
2239 |
+
""",
|
2240 |
+
"noise_level": "Moderate",
|
2241 |
+
"source": "Breed Behavior Database, 2024"
|
2242 |
+
},
|
2243 |
+
|
2244 |
+
"Whippet": {
|
2245 |
+
"noise_notes": """
|
2246 |
+
Typical noise characteristics:
|
2247 |
+
• Low barker
|
2248 |
+
• Quiet nature
|
2249 |
+
• Gentle vocalizations
|
2250 |
+
• Reserved temperament
|
2251 |
+
|
2252 |
+
Noise level: Low
|
2253 |
+
Barking triggers:
|
2254 |
+
• Prey drive
|
2255 |
+
• Exercise time
|
2256 |
+
• Social interaction
|
2257 |
+
• Rare occasions
|
2258 |
+
""",
|
2259 |
+
"noise_level": "Low",
|
2260 |
+
"source": "Breed Behavior Database, 2024"
|
2261 |
+
},
|
2262 |
+
|
2263 |
+
"Wire-Haired_Fox_Terrier": {
|
2264 |
+
"noise_notes": """
|
2265 |
+
Typical noise characteristics:
|
2266 |
+
• High vocal tendency
|
2267 |
+
• Sharp terrier bark
|
2268 |
+
• Alert watchdog
|
2269 |
+
• Frequent barking
|
2270 |
+
|
2271 |
+
Noise level: High
|
2272 |
+
Barking triggers:
|
2273 |
+
• Small animals
|
2274 |
+
• Territory defense
|
2275 |
+
• Excitement
|
2276 |
+
• Strange sounds
|
2277 |
+
""",
|
2278 |
+
"noise_level": "High",
|
2279 |
+
"source": "Breed Behavior Database, 2024"
|
2280 |
+
}
|
2281 |
+
}
|
breed_recommendation.py
ADDED
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def create_recommendation_tab(UserPreferences, get_breed_recommendations, format_recommendation_html, history_component):
|
4 |
+
"""创建品种推荐标签页
|
5 |
+
|
6 |
+
Args:
|
7 |
+
UserPreferences: 用户偏好类
|
8 |
+
get_breed_recommendations: 获取品种推荐的函数
|
9 |
+
format_recommendation_html: 格式化推荐结果的函数
|
10 |
+
history_component: 历史记录组件
|
11 |
+
"""
|
12 |
+
with gr.TabItem("Breed Recommendation"):
|
13 |
+
gr.HTML("<p style='text-align: center;'>Tell us about your lifestyle, and we'll recommend the perfect dog breeds for you!</p>")
|
14 |
+
|
15 |
+
with gr.Row():
|
16 |
+
with gr.Column():
|
17 |
+
living_space = gr.Radio(
|
18 |
+
choices=["apartment", "house_small", "house_large"],
|
19 |
+
label="What type of living space do you have?",
|
20 |
+
info="Choose your current living situation",
|
21 |
+
value="apartment"
|
22 |
+
)
|
23 |
+
|
24 |
+
exercise_time = gr.Slider(
|
25 |
+
minimum=0,
|
26 |
+
maximum=180,
|
27 |
+
value=60,
|
28 |
+
label="Daily exercise time (minutes)",
|
29 |
+
info="Consider walks, play time, and training"
|
30 |
+
)
|
31 |
+
|
32 |
+
grooming_commitment = gr.Radio(
|
33 |
+
choices=["low", "medium", "high"],
|
34 |
+
label="Grooming commitment level",
|
35 |
+
info="Low: monthly, Medium: weekly, High: daily",
|
36 |
+
value="medium"
|
37 |
+
)
|
38 |
+
|
39 |
+
with gr.Column():
|
40 |
+
experience_level = gr.Radio(
|
41 |
+
choices=["beginner", "intermediate", "advanced"],
|
42 |
+
label="Dog ownership experience",
|
43 |
+
info="Be honest - this helps find the right match",
|
44 |
+
value="beginner"
|
45 |
+
)
|
46 |
+
|
47 |
+
has_children = gr.Checkbox(
|
48 |
+
label="Have children at home",
|
49 |
+
info="Helps recommend child-friendly breeds"
|
50 |
+
)
|
51 |
+
|
52 |
+
noise_tolerance = gr.Radio(
|
53 |
+
choices=["low", "medium", "high"],
|
54 |
+
label="Noise tolerance level",
|
55 |
+
info="Some breeds are more vocal than others",
|
56 |
+
value="medium"
|
57 |
+
)
|
58 |
+
|
59 |
+
get_recommendations_btn = gr.Button("Find My Perfect Match! 🔍", variant="primary")
|
60 |
+
recommendation_output = gr.HTML(label="Breed Recommendations")
|
61 |
+
|
62 |
+
def on_find_match_click(*args):
|
63 |
+
try:
|
64 |
+
user_prefs = UserPreferences(
|
65 |
+
living_space=args[0],
|
66 |
+
exercise_time=args[1],
|
67 |
+
grooming_commitment=args[2],
|
68 |
+
experience_level=args[3],
|
69 |
+
has_children=args[4],
|
70 |
+
noise_tolerance=args[5],
|
71 |
+
space_for_play=True if args[0] != "apartment" else False,
|
72 |
+
other_pets=False,
|
73 |
+
climate="moderate",
|
74 |
+
health_sensitivity="medium", # 新增: 默認中等敏感度
|
75 |
+
barking_acceptance=args[5] # 使用 noise_tolerance 作為 barking_acceptance
|
76 |
+
)
|
77 |
+
|
78 |
+
recommendations = get_breed_recommendations(user_prefs, top_n=10)
|
79 |
+
|
80 |
+
history_results = [{
|
81 |
+
'breed': rec['breed'],
|
82 |
+
'rank': rec['rank'],
|
83 |
+
'overall_score': rec['final_score'],
|
84 |
+
'base_score': rec['base_score'],
|
85 |
+
'bonus_score': rec['bonus_score'],
|
86 |
+
'scores': rec['scores']
|
87 |
+
} for rec in recommendations]
|
88 |
+
|
89 |
+
# 保存到歷史記錄,也需要更新保存的偏好設定
|
90 |
+
history_component.save_search(
|
91 |
+
user_preferences={
|
92 |
+
'living_space': args[0],
|
93 |
+
'exercise_time': args[1],
|
94 |
+
'grooming_commitment': args[2],
|
95 |
+
'experience_level': args[3],
|
96 |
+
'has_children': args[4],
|
97 |
+
'noise_tolerance': args[5],
|
98 |
+
'health_sensitivity': "medium",
|
99 |
+
'barking_acceptance': args[5]
|
100 |
+
},
|
101 |
+
results=history_results
|
102 |
+
)
|
103 |
+
|
104 |
+
return format_recommendation_html(recommendations)
|
105 |
+
|
106 |
+
except Exception as e:
|
107 |
+
print(f"Error in find match: {str(e)}")
|
108 |
+
import traceback
|
109 |
+
print(traceback.format_exc())
|
110 |
+
return "Error getting recommendations"
|
111 |
+
|
112 |
+
get_recommendations_btn.click(
|
113 |
+
fn=on_find_match_click,
|
114 |
+
inputs=[
|
115 |
+
living_space,
|
116 |
+
exercise_time,
|
117 |
+
grooming_commitment,
|
118 |
+
experience_level,
|
119 |
+
has_children,
|
120 |
+
noise_tolerance
|
121 |
+
],
|
122 |
+
outputs=recommendation_output
|
123 |
+
)
|
124 |
+
|
125 |
+
return {
|
126 |
+
'living_space': living_space,
|
127 |
+
'exercise_time': exercise_time,
|
128 |
+
'grooming_commitment': grooming_commitment,
|
129 |
+
'experience_level': experience_level,
|
130 |
+
'has_children': has_children,
|
131 |
+
'noise_tolerance': noise_tolerance,
|
132 |
+
'get_recommendations_btn': get_recommendations_btn,
|
133 |
+
'recommendation_output': recommendation_output
|
134 |
+
}
|
data_manager.py
ADDED
@@ -0,0 +1,938 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
import sqlite3
|
3 |
+
from dataclasses import dataclass
|
4 |
+
from typing import List, Dict, Optional
|
5 |
+
from decimal import Decimal
|
6 |
+
from breed_health_info import breed_health_info, default_health_note
|
7 |
+
from breed_noise_info import breed_noise_info
|
8 |
+
import numpy as np
|
9 |
+
import random
|
10 |
+
|
11 |
+
|
12 |
+
def create_table():
|
13 |
+
conn = sqlite3.connect('animal_detector.db')
|
14 |
+
cursor = conn.cursor()
|
15 |
+
|
16 |
+
cursor.execute('''
|
17 |
+
CREATE TABLE IF NOT EXISTS AnimalCatalog (
|
18 |
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
19 |
+
Species TEXT NOT NULL,
|
20 |
+
Breed TEXT NOT NULL,
|
21 |
+
Size_Category TEXT,
|
22 |
+
Typical_Lifespan TEXT,
|
23 |
+
Temperament TEXT,
|
24 |
+
Care_Level TEXT,
|
25 |
+
Good_With_Children BOOLEAN,
|
26 |
+
Exercise_Needs TEXT,
|
27 |
+
Grooming_Needs TEXT,
|
28 |
+
Brief_Description TEXT
|
29 |
+
)
|
30 |
+
''')
|
31 |
+
|
32 |
+
conn.commit()
|
33 |
+
cursor.close()
|
34 |
+
conn.close()
|
35 |
+
|
36 |
+
# 創建表
|
37 |
+
create_table()
|
38 |
+
|
39 |
+
def insert_dog_data():
|
40 |
+
conn = sqlite3.connect('animal_detector.db')
|
41 |
+
cursor = conn.cursor()
|
42 |
+
|
43 |
+
dog_data = [
|
44 |
+
('Dog', 'Afghan_Hound', 'Large', '12-18 years', 'Independent, dignified, aloof', 'High', True, 'High', 'High', 'Known for their long, silky coat and regal appearance, Afghan Hounds are ancient sighthounds with a unique, elegant presence.'),
|
45 |
+
('Dog', 'African_Hunting_Dog', 'Medium', '10-12 years', 'Social, intelligent, energetic', 'Very High', False, 'Very High', 'Low', 'Also called African Wild Dogs, these are not domestic dogs and are endangered in their native habitats.'),
|
46 |
+
('Dog', 'Airedale', 'Large', '10-12 years', 'Friendly, clever, courageous', 'High', True, 'High', 'High', 'Known as the "King of Terriers," Airedales are the largest of the terrier breeds and very versatile. Originally from Aire Valley of Yorkshire, they served in police and military roles while maintaining their hunting abilities.'),
|
47 |
+
('Dog', 'American_Staffordshire_Terrier', 'Medium', '12-16 years', 'Confident, good-natured, courageous', 'Moderate', True, 'High', 'Low', 'Often confused with Pit Bulls, Am Staffs are strong, muscular dogs with a gentle and loving nature.'),
|
48 |
+
('Dog', 'Appenzeller', 'Medium', '12-15 years', 'Reliable, fearless, lively', 'High', True, 'High', 'Moderate', 'Swiss mountain dogs known for their agility and enthusiasm, Appenzellers make excellent working and family dogs. Traditional cattle herders from the Swiss Alps, they combine working intelligence with devoted guardianship.'),
|
49 |
+
('Dog', 'Australian_Terrier', 'Small', '12-15 years', 'Courageous, spirited, alert', 'Moderate', True, 'Moderate', 'Moderate', 'Small, sturdy terriers originally bred to control rodents, known for their confident personality. First breed developed in Australia, combining the tenacity of old terrier breeds with adaptability to harsh conditions.'),
|
50 |
+
('Dog', 'Bedlington_Terrier', 'Medium', '11-16 years', 'Mild, gentle, lively', 'High', True, 'Moderate', 'High', 'Known for their lamb-like appearance, Bedlington Terriers are energetic and good with families. Despite their gentle look, they were originally miners\' dogs bred for hunting vermin and remain surprisingly fast and athletic.'),
|
51 |
+
('Dog', 'Bernese_Mountain_Dog', 'Large', '6-8 years', 'Good-natured, calm, strong', 'High', True, 'Moderate', 'High', 'Large, tri-colored Swiss working dogs known for their gentle nature and striking appearance. Despite their short lifespan, they are excellent family companions and draft dogs. Often called "Berners", they are patient with children but prone to heat sensitivity due to their thick coat.'),
|
52 |
+
('Dog', 'Blenheim_Spaniel', 'Small', '12-14 years', 'Affectionate, gentle, lively', 'Moderate', True, 'Moderate', 'High', 'A color variety of the Cavalier King Charles Spaniel, known for their red and white coat and friendly nature.'),
|
53 |
+
('Dog', 'Border_Collie', 'Medium', '12-15 years', 'Intelligent, energetic, alert', 'High', True, 'Very High', 'Moderate', 'Often considered the most intelligent dog breed, Border Collies are tireless workers with intense herding instincts. Known for their "eye" - a distinctive herding gaze, they excel in dog sports and need constant mental stimulation to prevent boredom.'),
|
54 |
+
('Dog', 'Border_Terrier', 'Small', '12-15 years', 'Affectionate, intelligent, even-tempered', 'Moderate', True, 'High', 'Low', 'Small but tough terriers with an otter-like head, known for their friendly and adaptable nature.'),
|
55 |
+
('Dog', 'Boston_Bull', 'Small', '11-13 years', 'Friendly, lively, intelligent', 'Moderate', True, 'Moderate', 'Low', 'Also known as Boston Terriers, these "American Gentlemen" are friendly and adaptable. First bred in Boston as fighting dogs, they evolved into beloved companions known for their tuxedo-like coat pattern and gentle disposition.'),
|
56 |
+
('Dog', 'Bouvier_Des_Flandres', 'Large', '10-12 years', 'Gentle, loyal, rational', 'High', True, 'High', 'High', 'Large, powerful herding dogs with a tousled coat, known for their versatility and even temperament. Originally bred as cattle drivers in Flanders, they excel in various roles from farm work to family protection.'),
|
57 |
+
('Dog', 'Brabancon_Griffon', 'Small', '12-15 years', 'Self-important, sensitive, affectionate', 'Moderate', False, 'Moderate', 'Low', 'Also known as the Brussels Griffon, these small dogs have a distinctive beard and mustache, giving them an almost human-like expression.'),
|
58 |
+
('Dog', 'Brittany_Spaniel', 'Medium', '12-14 years', 'Bright, fun-loving, upbeat', 'High', True, 'High', 'Moderate', 'Versatile hunting dogs and active companions, Brittanys are known for their energy and intelligence. Originally from France, these agile bird dogs excel in both hunting and family life with their eager and athletic nature.'),
|
59 |
+
('Dog', 'Cardigan', 'Small', '12-15 years', 'Affectionate, loyal, intelligent', 'Moderate', True, 'Moderate', 'Moderate', 'Distinguished from Pembroke Welsh Corgis by their long tail, Cardigans are intelligent herding dogs with a fox-like appearance.'),
|
60 |
+
('Dog', 'Chesapeake_Bay_Retriever', 'Large', '10-13 years', 'Bright, sensitive, affectionate', 'High', True, 'High', 'Moderate', 'Known for their waterproof coat, Chessies are strong swimmers and excellent retrievers. Developed in the American Chesapeake Bay region, they are famous for their ability to work in icy waters and their distinctive wavy coat.'),
|
61 |
+
('Dog', 'Chihuahua', 'Small', '12-20 years', 'Charming, graceful, sassy', 'Moderate', False, 'Low', 'Low', 'One of the smallest dog breeds, known for their big personalities and loyalty to their owners. Named after Mexico\'s largest state, they are ancient companions with terrier-like attitudes and remarkably long lifespans for dogs.'),
|
62 |
+
('Dog', 'Dandie_Dinmont', 'Small', '12-15 years', 'Independent, intelligent, dignified', 'Moderate', True, 'Moderate', 'Moderate', 'Recognizable by their long body and distinctive topknot of hair on their head. Named after a character in Sir Walter Scott novel, these unique terriers combine determination with dignity, making them distinctive companions.'),
|
63 |
+
('Dog', 'Doberman', 'Large', '10-12 years', 'Loyal, fearless, alert', 'High', True, 'High', 'Low', 'Sleek, athletic dogs known for their intelligence and loyalty, often used as guard dogs. Highly trainable and protective, they excel in both working roles and as family guardians.'),
|
64 |
+
('Dog', 'English_Foxhound', 'Medium', '10-13 years', 'Friendly, active, gentle', 'High', True, 'Very High', 'Low', 'Athletic, pack-oriented hounds originally bred for fox hunting in England. Known for their stamina, melodious voice, and strong hunting instincts.'),
|
65 |
+
('Dog', 'English_Setter', 'Large', '10-12 years', 'Gentle, friendly, placid', 'High', True, 'High', 'High', 'Known for their speckled coat or "belton" markings, English Setters are elegant bird dogs and affectionate companions.'),
|
66 |
+
('Dog', 'English_Springer', 'Medium', '12-14 years', 'Friendly, playful, obedient', 'High', True, 'High', 'High', 'Energetic and eager to please, Springers are excellent hunting dogs and loving family pets. Their name comes from their hunting style of "springing" at game birds, combining strong work ethics with a merry, affectionate family nature.'),
|
67 |
+
('Dog', 'EntleBucher', 'Medium', '11-13 years', 'Loyal, enthusiastic, intelligent', 'High', True, 'High', 'Low', 'The smallest of the Swiss Mountain Dogs, known for their agility and herding abilities. Originally from the Swiss valley of Entlebuch, they combine the strength of mountain dogs with remarkable agility and quick thinking.'),
|
68 |
+
('Dog', 'Eskimo_Dog', 'Large', '10-15 years', 'Alert, loyal, intelligent', 'High', True, 'High', 'High', 'Also known as the Canadian Eskimo Dog, these are strong, resilient working dogs adapted to Arctic conditions. Ancient breed used by Inuit people for hunting and transportation, known for their power and endurance.'),
|
69 |
+
('Dog', 'French_Bulldog', 'Small', '10-12 years', 'Playful, adaptable, smart', 'Moderate', True, 'Low', 'Low', 'French Bulldogs are small, muscular dogs with a smooth coat, short face, and bat-like ears. They are affectionate, playful, and well-suited for family living.'),
|
70 |
+
('Dog', 'German_Shepherd', 'Large', '10-13 years', 'Confident, courageous, smart', 'High', True, 'High', 'Moderate', 'Versatile working dogs, German Shepherds excel in various roles from police work to family protection.'),
|
71 |
+
('Dog', 'German_Short-Haired_Pointer', 'Large', '10-12 years', 'Friendly, intelligent, willing to please', 'High', True, 'Very High', 'Moderate', 'Versatile hunting dogs known for their pointer stance, these dogs excel in both water and land retrieving.'),
|
72 |
+
('Dog', 'Gordon_Setter', 'Large', '10-12 years', 'Confident, fearless, alert', 'High', True, 'High', 'High', 'The largest of the setter breeds, Gordon Setters are known for their black and tan coloring and loyal nature. Developed in Scotland, these noble bird dogs combine strong hunting abilities with devoted family loyalty.'),
|
73 |
+
('Dog', 'Great_Dane', 'Giant', '7-10 years', 'Friendly, patient, dependable', 'High', True, 'Moderate', 'Low', 'One of the largest dog breeds, Great Danes are known as gentle giants with a friendly disposition. Originally bred for hunting large game, these noble giants now excel as loving family companions despite their imposing size.'),
|
74 |
+
('Dog', 'Great_Pyrenees', 'Large', '10-12 years', 'Patient, calm, gentle', 'High', True, 'Moderate', 'High', 'Large, powerful dogs originally bred to guard livestock, known for their gentle and protective nature. These ancient guardians of the Pyrenees mountains combine strength and nobility with a deep devotion to family and flock.'),
|
75 |
+
('Dog', 'Greater_Swiss_Mountain_dog', 'Large', '8-11 years', 'Faithful, alert, vigilant', 'Moderate', True, 'Moderate', 'Low', 'Large, strong working dogs with a tricolor coat, Swissies are gentle giants with a calm temperament.'),
|
76 |
+
('Dog', 'Ibizan_Hound', 'Medium', '12-14 years', 'Even-tempered, loyal, independent', 'Moderate', True, 'High', 'Low', 'Sleek, athletic sighthounds known for their large, erect ears and red and white coats. Ancient breed from Balearic Islands, they can jump remarkable heights and were bred to hunt rabbits in difficult terrain.'),
|
77 |
+
('Dog', 'Irish_Setter', 'Large', '11-15 years', 'Outgoing, sweet-tempered, active', 'High', True, 'High', 'High', 'Recognizable by their rich red coat, Irish Setters are energetic and playful dogs that love family life.'),
|
78 |
+
('Dog', 'Irish_Terrier', 'Medium', '12-16 years', 'Bold, daring, intelligent', 'Moderate', True, 'High', 'Moderate', 'Known as the Daredevil of dogdom, Irish Terriers are courageous and loyal with a distinctive red coat. One of the oldest terrier breeds, they earned fame for their bravery as messenger dogs in World War I.'),
|
79 |
+
('Dog', 'Irish_Water_Spaniel', 'Large', '10-12 years', 'Playful, brave, intelligent', 'High', True, 'High', 'High', 'Largest of the spaniels, known for their curly, liver-colored coat and rat-like tail. These distinctive water retrievers combine the agility of a spaniel with the endurance of a retriever, featuring a water-repellent double coat.'),
|
80 |
+
('Dog', 'Irish_Wolfhound', 'Giant', '6-8 years', 'Gentle, patient, dignified', 'High', True, 'Moderate', 'Moderate', 'The tallest of all dog breeds, Irish Wolfhounds are gentle giants known for their calm and friendly nature. Ancient warriors of Ireland, they once hunted wolves but now serve as peaceful family companions.'),
|
81 |
+
('Dog', 'Italian_Greyhound', 'Small', '12-15 years', 'Sensitive, alert, playful', 'Moderate', False, 'Moderate', 'Low', 'Miniature sighthounds known for their elegant appearance and affectionate nature, Italian Greyhounds make excellent companion dogs.'),
|
82 |
+
('Dog', 'Japanese_Spaniel', 'Small', '10-12 years', 'Charming, noble, affectionate', 'Moderate', False, 'Low', 'High', 'Also known as the Japanese Chin, these small companion dogs have a distinctive flat face and were once favorites of Japanese nobility.'),
|
83 |
+
('Dog', 'Kerry_Blue_Terrier', 'Medium', '12-15 years', 'Alert, adaptable, people-oriented', 'High', True, 'High', 'High', 'Medium-sized terriers with a distinctive blue coat, known for their versatility and intelligence. Originally from County Kerry, Ireland, they were all-purpose farm dogs that evolved into capable working and companion animals.'),
|
84 |
+
('Dog', 'Labrador_Retriever', 'Large', '10-12 years', 'Friendly, outgoing, even-tempered', 'Moderate', True, 'High', 'Moderate', 'One of the most popular dog breeds, known for their friendly nature and excellent retrieving skills. Originally from Newfoundland, these versatile dogs excel as family companions, service dogs, and working retrievers.'),
|
85 |
+
('Dog', 'Lakeland_Terrier', 'Small', '12-16 years', 'Bold, friendly, confident', 'Moderate', True, 'High', 'High', 'Named after the Lake District in England, these terriers are sturdy and bold with a wiry coat. Developed to protect sheep from foxes, they remain confident and fearless while being adaptable family companions.'),
|
86 |
+
('Dog', 'Leonberg', 'Giant', '7-9 years', 'Gentle, friendly, intelligent', 'High', True, 'Moderate', 'High', 'Large, muscular dogs with a lion-like mane, known for their gentle nature and water rescue abilities. Created in the German town of Leonberg, these gentle giants combine strength with remarkable patience and grace.'),
|
87 |
+
('Dog', 'Lhasa', 'Small', '12-15 years', 'Confident, smart, comical', 'High', False, 'Low', 'High', 'Lhasa Apsos are small but sturdy dogs with a long, flowing coat. They were originally bred as indoor sentinel dogs in Buddhist monasteries.'),
|
88 |
+
('Dog', 'Maltese_Dog', 'Small', '12-15 years', 'Gentle, playful, charming', 'High', False, 'Low', 'High', 'Small, elegant dogs with long, silky white coats, known for their sweet and affectionate nature. Ancient breed of Mediterranean origin, they were cherished by nobles for centuries and remain adaptable, gentle companions.'),
|
89 |
+
('Dog', 'Mexican_Hairless', 'Varies', '12-15 years', 'Loyal, alert, cheerful', 'Moderate', True, 'Moderate', 'Low', 'Also known as the Xoloitzcuintli, these dogs come in three sizes and can be either hairless or coated, known for their ancient history in Mexico.'),
|
90 |
+
('Dog', 'Newfoundland', 'Giant', '8-10 years', 'Sweet, patient, devoted', 'High', True, 'Moderate', 'High', 'Large, strong dogs known for their water rescue abilities and gentle nature, especially with children. These powerful swimmers have a natural lifesaving instinct and are famous for their calm, noble temperament.'),
|
91 |
+
('Dog', 'Norfolk_Terrier', 'Small', '12-15 years', 'Fearless, spirited, companionable', 'Moderate', True, 'Moderate', 'Moderate', 'Small, sturdy terriers with a wiry coat, known for their playful and affectionate nature.'),
|
92 |
+
('Dog', 'Norwegian_Elkhound', 'Medium', '12-15 years', 'Bold, playful, loyal', 'High', True, 'High', 'High', 'Ancient Nordic breed known for their silver-gray coat and curled tail, originally used for hunting moose and other large game.'),
|
93 |
+
('Dog', 'Norwich_Terrier', 'Small', '12-15 years', 'Fearless, loyal, affectionate', 'Moderate', True, 'Moderate', 'Moderate', 'One of the smallest terriers, Norwich Terriers are hardy, fearless, and affectionate companions.'),
|
94 |
+
('Dog', 'Old_English_Sheepdog', 'Large', '10-12 years', 'Adaptable, gentle, intelligent', 'High', True, 'Moderate', 'High', 'Recognizable by their shaggy coat, Old English Sheepdogs are adaptable and good-natured. Once droving dogs of western England, they combine herding ability with a playful, protective nature toward their families.'),
|
95 |
+
('Dog', 'Pekinese', 'Small', '12-14 years', 'Affectionate, loyal, regal in manner', 'Moderate', False, 'Low', 'High', 'Also spelled Pekingese, these small dogs with flat faces and long coats were once sacred to Chinese royalty.'),
|
96 |
+
('Dog', 'Pembroke', 'Small', '12-15 years', 'Affectionate, intelligent, outgoing', 'Moderate', True, 'Moderate', 'Moderate', 'Known for their short legs and long bodies, Pembroke Welsh Corgis are herding dogs favored by the British royal family.'),
|
97 |
+
('Dog', 'Pomeranian', 'Small', '12-16 years', 'Lively, bold, inquisitive', 'Moderate', False, 'Low', 'High', 'Small, fluffy dogs with fox-like faces, known for their vivacious personalities and luxurious coats. Once larger sled dogs, these bred-down companions retain their bold spirit and were favored by royalty including Queen Victoria.'),
|
98 |
+
('Dog', 'Rhodesian_Ridgeback', 'Large', '10-12 years', 'Dignified, intelligent, strong-willed', 'Moderate', True, 'High', 'Low', 'Large, muscular dogs known for the ridge of hair along their backs, originally bred to hunt lions in Africa.'),
|
99 |
+
('Dog', 'Rottweiler', 'Large', '8-10 years', 'Loyal, loving, confident guardian', 'High', True, 'High', 'Low', 'Powerful and protective, Rottweilers are excellent guard dogs but also loving family companions when well-trained.'),
|
100 |
+
('Dog', 'Saint_Bernard', 'Giant', '8-10 years', 'Gentle, patient, friendly', 'High', True, 'Moderate', 'High', 'Known for their massive size and gentle nature, Saint Bernards were originally bred for rescue work in the Swiss Alps.'),
|
101 |
+
('Dog', 'Saluki', 'Large', '12-14 years', 'Gentle, dignified, independent-minded', 'High', True, 'High', 'Low', 'Ancient sighthounds known for their grace and speed, Salukis have a distinctive feathered coat and ears.'),
|
102 |
+
('Dog', 'Samoyed', 'Medium', '12-14 years', 'Friendly, gentle, adaptable', 'High', True, 'High', 'High', 'Beautiful white Arctic dogs known for their "smiling" expression and thick, fluffy coat. Originally bred for sledding and herding reindeer, they combine working dog capability with a warm, family-friendly nature.'),
|
103 |
+
('Dog', 'Scotch_Terrier', 'Small', '11-13 years', 'Independent, confident, spirited', 'Moderate', True, 'Moderate', 'High', 'Also known as the Scottish Terrier, these distinctive dogs with beards and eyebrows are known for their dignified, almost human-like personality.'),
|
104 |
+
('Dog', 'Scottish_Deerhound', 'Large', '8-11 years', 'Gentle, dignified, polite', 'High', True, 'High', 'Moderate', 'Large, wiry-coated sighthounds resembling Greyhounds, known for their gentle nature and hunting ability.'),
|
105 |
+
('Dog', 'Sealyham_Terrier', 'Small', '12-14 years', 'Alert, outgoing, calm', 'Moderate', True, 'Moderate', 'High', 'Originally bred for hunting, Sealyhams are now rare but make charming and sturdy companions. Developed in Wales to hunt badgers and otters, they combine terrier tenacity with a surprisingly calm demeanor.'),
|
106 |
+
('Dog', 'Shetland_Sheepdog', 'Small', '12-14 years', 'Playful, energetic, intelligent', 'High', True, 'High', 'High', 'Small herding dogs resembling miniature Collies, known for their intelligence and agility. Originally from the Shetland Islands, these "Shelties" excel in obedience, herding, and agility competitions while being devoted family companions.'),
|
107 |
+
('Dog', 'Shih-Tzu', 'Small', '10-16 years', 'Affectionate, playful, outgoing', 'High', True, 'Low', 'High', 'Small, affectionate companion dogs known for their long, silky coat and sweet personality. Originally bred for Chinese royalty, they are excellent lap dogs and adapt well to both city and suburban life.'),
|
108 |
+
('Dog', 'Siberian_Husky', 'Medium', '12-14 years', 'Outgoing, mischievous, loyal', 'High', True, 'Very High', 'Moderate', 'Beautiful sled dogs known for their striking blue eyes, thick coats, and wolf-like appearance. Originally bred by the Chukchi people of northeastern Asia, they combine endurance with a friendly, adventurous spirit.'),
|
109 |
+
('Dog', 'Staffordshire_Bullterrier', 'Medium', '12-14 years', 'Courageous, intelligent, loyal', 'Moderate', True, 'High', 'Low', 'Strong, muscular terriers known for their courage and affectionate nature, especially with children.'),
|
110 |
+
('Dog', 'Sussex_Spaniel', 'Medium', '11-13 years', 'Calm, friendly, merry', 'Moderate', True, 'Moderate', 'Moderate', 'Rare breed of spaniel known for their golden-liver coat and low-set body, originally bred for hunting.'),
|
111 |
+
('Dog', 'Tibetan_Mastiff', 'Large', '10-12 years', 'Independent, reserved, intelligent', 'High', False, 'Moderate', 'High', 'Ancient guardian breed known for their massive size and thick coat, Tibetan Mastiffs are independent and protective.'),
|
112 |
+
('Dog', 'Tibetan_Terrier', 'Medium', '12-15 years', 'Affectionate, sensitive, clever', 'High', True, 'Moderate', 'High', 'Not actually terriers, these dogs were bred in Tibet and are known for their profuse, long coat.'),
|
113 |
+
('Dog', 'Walker_Hound', 'Large', '12-13 years', 'Smart, brave, friendly', 'Moderate', True, 'High', 'Low', 'Also known as the Treeing Walker Coonhound, these dogs are excellent hunters with a distinctive bark. Developed in Kentucky from Virginia Hounds, they are renowned for their speed, endurance, and melodious voice.'),
|
114 |
+
('Dog', 'Weimaraner', 'Large', '10-13 years', 'Friendly, fearless, obedient', 'High', True, 'High', 'Low', 'Known as the "Gray Ghost," Weimaraners are athletic and intelligent dogs with a distinctive silver-gray coat.'),
|
115 |
+
('Dog', 'Welsh_Springer_Spaniel', 'Medium', '12-15 years', 'Active, loyal, affectionate', 'High', True, 'High', 'Moderate', 'Similar to English Springers but with a distinctive red and white coat, Welsh Springers are devoted and energetic.'),
|
116 |
+
('Dog', 'West_Highland_White_Terrier', 'Small', '12-16 years', 'Friendly, hardy, confident', 'Moderate', True, 'Moderate', 'High', 'Commonly known as "Westies," these white terriers are friendly and sturdy with a bright personality.'),
|
117 |
+
('Dog', 'Yorkshire_Terrier', 'Small', '13-16 years', 'Affectionate, sprightly, tomboyish', 'High', False, 'Moderate', 'High', 'Popular toy breed known for their long silky coat and feisty personality. Despite their small size, they maintain a brave terrier spirit and were originally bred as ratters in Yorkshire mills.'),
|
118 |
+
('Dog', 'Affenpinscher', 'Small', '12-15 years', 'Confident, amusing, stubborn', 'Moderate', False, 'Moderate', 'Moderate', 'Small terrier-like toys known as "monkey dogs" due to their distinctive facial appearance.'),
|
119 |
+
('Dog', 'Basenji', 'Small', '12-16 years', 'Independent, smart, poised', 'Moderate', False, 'High', 'Low', 'Ancient African breed known for their inability to bark, instead making a unique yodel-like sound. Called "the barkless dog," they are intelligent hunters with cat-like cleanliness and independent nature.'),
|
120 |
+
('Dog', 'Basset', 'Medium', '10-12 years', 'Patient, low-key, charming', 'Moderate', True, 'Low', 'Moderate', 'Short-legged, long-bodied hounds known for their excellent sense of smell and gentle dispositions. Second only to Bloodhounds in scenting ability, these French-origin dogs combine persistence with a sweet, patient nature.'),
|
121 |
+
('Dog', 'Beagle', 'Small', '12-15 years', 'Merry, friendly, curious', 'Moderate', True, 'High', 'Low', 'Small hound dogs known for their excellent sense of smell and friendly, outgoing personalities. Popular family pets and skilled scent hunters, famous for their melodious bay and pack mentality.'),
|
122 |
+
('Dog', 'Black-and-Tan_Coonhound', 'Large', '10-12 years', 'Even-tempered, easygoing, friendly', 'Moderate', True, 'High', 'Low', 'Large, powerful scent hounds known for their distinctive black and tan coloration and melodious bay.'),
|
123 |
+
('Dog', 'Bloodhound', 'Large', '10-12 years', 'Gentle, patient, stubborn', 'High', True, 'Moderate', 'Moderate', 'Known for their exceptional sense of smell, Bloodhounds are large, gentle dogs often used in tracking.'),
|
124 |
+
('Dog', 'Bluetick', 'Large', '11-12 years', 'Friendly, intelligent, active', 'Moderate', True, 'High', 'Low', 'Known for their mottled blue coat, Bluetick Coonhounds are skilled hunting dogs with a keen sense of smell and a melodious howl.'),
|
125 |
+
('Dog', 'Borzoi', 'Large', '10-12 years', 'Quiet, gentle, athletic', 'High', True, 'Moderate', 'High', 'Also known as Russian Wolfhounds, Borzois are elegant sighthounds known for their silky coat and graceful demeanor.'),
|
126 |
+
('Dog', 'Boxer', 'Large', '10-12 years', 'Fun-loving, bright, active', 'Moderate', True, 'High', 'Low', 'Playful and energetic, Boxers are known for their patient and protective nature with children. Originally developed in Germany as working dogs, they combine strength with a uniquely playful and clownish personality.'),
|
127 |
+
('Dog', 'Briard', 'Large', '10-12 years', 'Confident, smart, loyal', 'High', True, 'High', 'High', 'Large French herding dogs with a distinctive long, wavy coat, Briards are loyal and protective. Known as "hearts wrapped in fur," they served as WWI sentries and now excel as both working dogs and devoted family guardians.'),
|
128 |
+
('Dog', 'Bull_mastiff', 'Large', '8-10 years', 'Affectionate, loyal, quiet', 'Moderate', True, 'Moderate', 'Low', 'Large, powerful dogs originally bred to guard estates, Bullmastiffs are gentle giants with a calm demeanor.'),
|
129 |
+
('Dog', 'Cairn', 'Small', '13-15 years', 'Alert, cheerful, busy', 'Moderate', True, 'Moderate', 'Moderate', 'Small, rugged terriers known for their shaggy coat and lively personality. Originally bred to hunt in the Scottish Highlands, these hardy dogs are intelligent and make excellent watchdogs despite their small size.'),
|
130 |
+
('Dog', 'Chow', 'Medium', '8-12 years', 'Aloof, loyal, quiet', 'High', False, 'Low', 'High', 'Ancient Chinese breed known for their lion-like mane and blue-black tongues. Independent and dignified, they make excellent watchdogs but require early socialization.'),
|
131 |
+
('Dog', 'Clumber', 'Large', '10-12 years', 'Gentle, loyal, thoughtful', 'Moderate', True, 'Moderate', 'High', 'The largest of the spaniels, Clumbers are known for their distinctive white coat and calm demeanor. Developed in France and England, these dignified hunters combine power with a methodical hunting style and gentle nature.'),
|
132 |
+
('Dog', 'Cocker_Spaniel', 'Small', '10-14 years', 'Gentle, smart, happy', 'High', True, 'Moderate', 'High', 'Known for their long, silky ears and expressive eyes, Cockers are popular family dogs with a merry disposition.'),
|
133 |
+
('Dog', 'Collie', 'Large', '10-14 years', 'Devoted, graceful, proud', 'High', True, 'High', 'High', 'Made famous by "Lassie," Collies are intelligent herding dogs known for their loyalty and grace. Their remarkable intuition and gentle nature make them exceptional family guardians, especially with children.'),
|
134 |
+
('Dog', 'Curly-Coated_Retriever', 'Large', '10-12 years', 'Confident, independent, intelligent', 'Moderate', True, 'High', 'Low', 'Sporting dogs with a distinctive curly coat, known for their excellent swimming and retrieving abilities.'),
|
135 |
+
('Dog', 'Dhole', 'Medium', '10-13 years', 'Social, intelligent, athletic', 'High', False, 'High', 'Low', 'Also known as the Asiatic wild dog, Dholes are not typically kept as pets but are important in Asian ecosystems.'),
|
136 |
+
('Dog', 'Dingo', 'Medium', '10-13 years', 'Independent, intelligent, alert', 'High', False, 'High', 'Low', 'Native wild dogs of Australia, dingoes are not typically kept as pets and are important to the Australian ecosystem.'),
|
137 |
+
('Dog', 'Flat-Coated_Retriever', 'Large', '8-10 years', 'Optimistic, good-humored, outgoing', 'High', True, 'Very High', 'Moderate', 'Known for their shiny black or liver-colored coat, Flat-coated Retrievers are energetic and playful, excelling in both hunting and family life.'),
|
138 |
+
('Dog', 'Giant_Schnauzer', 'Large', '10-12 years', 'Loyal, intelligent, powerful', 'High', True, 'High', 'High', 'Large and powerful, Giant Schnauzers were originally bred as working dogs and require plenty of exercise.'),
|
139 |
+
('Dog', 'Golden_Retriever', 'Large', '10-12 years', 'Intelligent, friendly, devoted', 'High', True, 'High', 'High', 'Beautiful, golden-coated dogs known for their gentle nature and excellence in various roles. Popular as family companions, therapy dogs, and service animals, they excel in both work and companionship with their eager-to-please attitude.'),
|
140 |
+
('Dog', 'Groenendael', 'Large', '10-12 years', 'Intelligent, protective, loyal', 'High', True, 'High', 'High', 'The black variety of Belgian Shepherd, Groenendaels are intelligent working dogs with a long, black coat. Named after their village of origin, they excel in police work, herding, and as vigilant family guardians.'),
|
141 |
+
('Dog', 'Keeshond', 'Medium', '12-15 years', 'Friendly, lively, outgoing', 'Moderate', True, 'Moderate', 'High', 'Distinctive "spectacles" marking around their eyes, Keeshonds are fluffy, fox-like dogs known for their friendly and affectionate nature.'),
|
142 |
+
('Dog', 'Kelpie', 'Medium', '10-13 years', 'Intelligent, energetic, loyal', 'High', True, 'Very High', 'Low', 'Australian herding dogs known for their incredible work ethic and agility. Developed to work in harsh outback conditions, they are renowned for their ability to herd from above, often running across the backs of sheep in large flocks.'),
|
143 |
+
('Dog', 'Komondor', 'Large', '10-12 years', 'Steady, fearless, affectionate', 'High', True, 'Moderate', 'High', 'Large Hungarian sheepdogs known for their distinctive corded white coat, resembling dreadlocks. Their unique coat once helped them blend in with sheep flocks while protecting them from wolves.'),
|
144 |
+
('Dog', 'Kuvasz', 'Large', '10-12 years', 'Protective, loyal, patient', 'High', True, 'Moderate', 'High', 'Large, white guardian dogs from Hungary, Kuvaszok are protective of their families and independent. Once royal guards of Hungarian nobility, they combine impressive strength with natural protective instincts.'),
|
145 |
+
('Dog', 'Malamute', 'Large', '10-12 years', 'Affectionate, loyal, playful', 'High', True, 'Very High', 'High', 'Large, powerful sled dogs with thick coats, known for their strength and endurance. Originally bred by the Mahlemut tribe for hauling heavy loads in arctic conditions, they combine impressive power with a friendly, family-oriented nature.'),
|
146 |
+
('Dog', 'Malinois', 'Medium', '12-14 years', 'Confident, smart, hardworking', 'High', True, 'High', 'Moderate', 'One of four varieties of Belgian Shepherd, known for their intelligence and use in police and military work.'),
|
147 |
+
('Dog', 'Miniature_Pinscher', 'Small', '12-16 years', 'Fearless, energetic, alert', 'Moderate', False, 'Moderate', 'Low', 'Often called King of Toys, Miniature Pinschers are small, energetic dogs with a big personality. Despite their small size, these fearless dogs possess proud carriage and spirited animation.'),
|
148 |
+
('Dog', 'Miniature_Poodle', 'Small', '12-15 years', 'Intelligent, active, alert', 'High', True, 'Moderate', 'High', 'Smaller version of the Standard Poodle, known for their intelligence and hypoallergenic coat. Popular show dogs and companions, they retain their larger relatives high intelligence while being more adaptable to city living.'),
|
149 |
+
('Dog', 'Miniature_Schnauzer', 'Small', '12-15 years', 'Friendly, smart, obedient', 'Moderate', True, 'Moderate', 'High', 'The smallest of the Schnauzer breeds, known for their distinctive beard and eyebrows. Originally ratters and farm dogs, they combine intelligence with a spunky personality, making excellent watchdogs and family companions.'),
|
150 |
+
('Dog', 'Otterhound', 'Large', '10-13 years', 'Friendly, boisterous, even-tempered', 'High', True, 'High', 'High', 'Large, shaggy-coated hounds originally bred for hunting otters, now a rare breed. Known for their strong swimming ability and powerful nose, with less than 1000 remaining worldwide, making them rarer than giant pandas.'),
|
151 |
+
('Dog', 'Papillon', 'Small', '13-15 years', 'Happy, alert, friendly', 'Moderate', True, 'Moderate', 'Moderate', 'Small, elegant dogs known for their butterfly-like ears and lively personalities. Despite their delicate appearance, they are surprisingly athletic and intelligent, ranking among the top 10 smartest dog breeds. Also called the Continental Toy Spaniel.'),
|
152 |
+
('Dog', 'Pug', 'Small', '12-15 years', 'Charming, mischievous, loving', 'Moderate', True, 'Low', 'Moderate', 'Small, wrinkly-faced dogs known for their charming personality and comical expression. Once favored by Chinese emperors, these "multum in parvo" (much in little) dogs are excellent companions but need attention to their breathing and temperature regulation.'),
|
153 |
+
('Dog', 'Redbone', 'Large', '10-12 years', 'Even-tempered, amiable, eager to please', 'Moderate', True, 'High', 'Low', 'Known for their solid red coat, Redbone Coonhounds are athletic, warm-hearted dogs originally bred for hunting. Developed in the American South, they excel at tracking and treeing with remarkable stamina and a melodious voice.'),
|
154 |
+
('Dog', 'Schipperke', 'Small', '13-15 years', 'Confident, alert, curious', 'Moderate', True, 'Moderate', 'Moderate', 'Small, black dogs with a fox-like face, Schipperkes are known for their distinctive ruff and small, pointed ears. Originally Belgian barge dogs, these little captains earned their name as boat watchdogs and ratters.'),
|
155 |
+
('Dog', 'Silky_terrier', 'Small', '12-15 years', 'Friendly, quick, alert', 'Moderate', False, 'Moderate', 'High', 'Similar to Yorkshire Terriers but larger, Silky Terriers are playful and enjoy being part of family activities. Developed in Australia, they combine the refinement of toy dogs with the sturdy nature of working terriers.'),
|
156 |
+
('Dog', 'Soft-Coated_Wheaten_Terrier', 'Medium', '12-14 years', 'Happy, steady, self-confident', 'High', True, 'High', 'High', 'Known for their soft, wheat-colored coat and friendly demeanor, they make great family dogs. Developed in Ireland as farm dogs, they combined versatility in herding and hunting with a uniquely soft coat unlike other terriers.'),
|
157 |
+
('Dog', 'Standard_Poodle', 'Large', '10-18 years', 'Intelligent, active, dignified', 'High', True, 'High', 'High', 'Highly intelligent and elegant dogs, known for their hypoallergenic coat and versatility in various dog sports.'),
|
158 |
+
('Dog', 'Standard_Schnauzer', 'Medium', '13-16 years', 'Friendly, intelligent, obedient', 'High', True, 'High', 'High', 'The original Schnauzer breed, known for their distinctive beard and eyebrows and versatile working abilities.'),
|
159 |
+
('Dog', 'Toy_Poodle', 'Small', '12-18 years', 'Intelligent, lively, playful', 'High', True, 'Moderate', 'High', 'The smallest variety of Poodle, known for their intelligence, agility, and hypoallergenic coat. Despite their diminutive size, they retain the intelligence and athletic ability of their larger relatives.'),
|
160 |
+
('Dog', 'Toy_Terrier', 'Small', '12-16 years', 'Lively, bold, intelligent', 'Moderate', False, 'Moderate', 'Low', 'A general term for small terrier breeds, often referring to breeds like the English Toy Terrier or Toy Fox Terrier.'),
|
161 |
+
('Dog', 'Vizsla', 'Medium', '10-14 years', 'Affectionate, energetic, gentle', 'High', True, 'High', 'Low', 'Known for their golden-rust coat, Vizslas are versatile hunters and loving family companions. These Hungarian pointers are often called "velcro dogs" for their strong desire to stay close to their owners.'),
|
162 |
+
('Dog', 'Whippet', 'Medium', '12-15 years', 'Gentle, affectionate, quiet', 'Low', True, 'High', 'Low', 'Slender, athletic sighthounds known for their speed - capable of reaching 35mph. Despite high exercise needs, they are calm indoor companions and excellent apartment dogs.'),
|
163 |
+
('Dog', 'Wire-Haired_Fox_Terrier', 'Small', '12-15 years', 'Alert, confident, gregarious', 'High', True, 'High', 'High', 'Energetic and wire-coated, these terriers were originally bred for fox hunting. Their tough, dense coat and fearless nature made them ideal for flushing foxes from their dens, and they remain bold and spirited companions.'),
|
164 |
+
]
|
165 |
+
|
166 |
+
cursor.executemany('''
|
167 |
+
INSERT INTO AnimalCatalog (Species, Breed, Size_Category, Typical_Lifespan, Temperament, Care_Level, Good_With_Children, Exercise_Needs, Grooming_Needs, Brief_Description)
|
168 |
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
169 |
+
''', dog_data)
|
170 |
+
|
171 |
+
conn.commit()
|
172 |
+
cursor.close()
|
173 |
+
conn.close()
|
174 |
+
|
175 |
+
def get_dog_description(breed):
|
176 |
+
try:
|
177 |
+
conn = sqlite3.connect('animal_detector.db')
|
178 |
+
cursor = conn.cursor()
|
179 |
+
|
180 |
+
breed_name = breed.split('(')[0].strip()
|
181 |
+
|
182 |
+
cursor.execute("""
|
183 |
+
SELECT * FROM AnimalCatalog
|
184 |
+
WHERE Breed = ? OR Breed LIKE ? OR Breed LIKE ?
|
185 |
+
""", (breed_name, f"{breed_name}%", f"%{breed_name}"))
|
186 |
+
|
187 |
+
result = cursor.fetchone()
|
188 |
+
|
189 |
+
cursor.close()
|
190 |
+
conn.close()
|
191 |
+
|
192 |
+
if result:
|
193 |
+
# 標準化運動需求值
|
194 |
+
exercise_needs = result[8]
|
195 |
+
normalized_exercise = exercise_needs.strip().title()
|
196 |
+
if normalized_exercise not in ["Very High", "High", "Moderate", "Low"]:
|
197 |
+
normalized_exercise = "High" # 預設值
|
198 |
+
|
199 |
+
description = {
|
200 |
+
"Breed": result[2],
|
201 |
+
"Size": result[3],
|
202 |
+
"Lifespan": result[4],
|
203 |
+
"Temperament": result[5],
|
204 |
+
"Care Level": result[6],
|
205 |
+
"Good with Children": "Yes" if result[7] else "No",
|
206 |
+
"Exercise Needs": normalized_exercise,
|
207 |
+
"Grooming Needs": result[9],
|
208 |
+
"Description": result[10]
|
209 |
+
}
|
210 |
+
return description
|
211 |
+
else:
|
212 |
+
print(f"No data found for breed: {breed_name}")
|
213 |
+
return None
|
214 |
+
|
215 |
+
except Exception as e:
|
216 |
+
print(f"Error in get_dog_description: {str(e)}")
|
217 |
+
return None
|
218 |
+
|
219 |
+
insert_dog_data()
|
220 |
+
|
221 |
+
|
222 |
+
@dataclass
|
223 |
+
class UserPreferences:
|
224 |
+
"""使用者偏好設定的資料結構"""
|
225 |
+
living_space: str # "apartment", "house_small", "house_large"
|
226 |
+
exercise_time: int # minutes per day
|
227 |
+
grooming_commitment: str # "low", "medium", "high"
|
228 |
+
experience_level: str # "beginner", "intermediate", "advanced"
|
229 |
+
has_children: bool
|
230 |
+
noise_tolerance: str # "low", "medium", "high"
|
231 |
+
space_for_play: bool
|
232 |
+
other_pets: bool
|
233 |
+
climate: str # "cold", "moderate", "hot"
|
234 |
+
health_sensitivity: str = "medium" # 設置默認值
|
235 |
+
barking_acceptance: str = None
|
236 |
+
|
237 |
+
def __post_init__(self):
|
238 |
+
"""在初始化後運行,用於設置派生值"""
|
239 |
+
if self.barking_acceptance is None:
|
240 |
+
self.barking_acceptance = self.noise_tolerance
|
241 |
+
|
242 |
+
|
243 |
+
def calculate_compatibility_score(breed_info: dict, user_prefs: UserPreferences) -> dict:
|
244 |
+
"""計算品種與使用者條件的相容性分數"""
|
245 |
+
scores = {}
|
246 |
+
try:
|
247 |
+
# 1. 空間相容性計算
|
248 |
+
def calculate_space_score(size, living_space, has_yard):
|
249 |
+
base_scores = {
|
250 |
+
"Small": {"apartment": 0.95, "house_small": 1.0, "house_large": 0.90},
|
251 |
+
"Medium": {"apartment": 0.65, "house_small": 0.90, "house_large": 1.0},
|
252 |
+
"Large": {"apartment": 0.35, "house_small": 0.75, "house_large": 1.0},
|
253 |
+
"Giant": {"apartment": 0.15, "house_small": 0.55, "house_large": 1.0}
|
254 |
+
}
|
255 |
+
|
256 |
+
base_score = base_scores.get(size, base_scores["Medium"])[living_space]
|
257 |
+
adjustments = 0
|
258 |
+
|
259 |
+
# 特殊情況調整
|
260 |
+
if living_space == "apartment":
|
261 |
+
if size == "Small":
|
262 |
+
adjustments += 0.05
|
263 |
+
elif size in ["Large", "Giant"]:
|
264 |
+
adjustments -= 0.15
|
265 |
+
|
266 |
+
if has_yard and living_space in ["house_small", "house_large"]:
|
267 |
+
adjustments += 0.05
|
268 |
+
|
269 |
+
return min(1.0, max(0, base_score + adjustments))
|
270 |
+
|
271 |
+
# 2. 運動相容性計算
|
272 |
+
def calculate_exercise_score(breed_exercise_needs, user_exercise_time):
|
273 |
+
exercise_needs = {
|
274 |
+
'VERY HIGH': 120,
|
275 |
+
'HIGH': 90,
|
276 |
+
'MODERATE': 60,
|
277 |
+
'LOW': 30,
|
278 |
+
'VARIES': 60
|
279 |
+
}
|
280 |
+
|
281 |
+
breed_need = exercise_needs.get(breed_exercise_needs.strip().upper(), 60)
|
282 |
+
difference = abs(user_exercise_time - breed_need) / breed_need
|
283 |
+
|
284 |
+
if difference == 0:
|
285 |
+
return 1.0
|
286 |
+
elif difference <= 0.2:
|
287 |
+
return 0.95
|
288 |
+
elif difference <= 0.4:
|
289 |
+
return 0.85
|
290 |
+
elif difference <= 0.6:
|
291 |
+
return 0.70
|
292 |
+
elif difference <= 0.8:
|
293 |
+
return 0.50
|
294 |
+
else:
|
295 |
+
return 0.30
|
296 |
+
|
297 |
+
# 3. 美容需求計算
|
298 |
+
def calculate_grooming_score(breed_grooming_needs, user_commitment, breed_size):
|
299 |
+
base_scores = {
|
300 |
+
"High": {"low": 0.3, "medium": 0.7, "high": 1.0},
|
301 |
+
"Moderate": {"low": 0.5, "medium": 0.9, "high": 1.0},
|
302 |
+
"Low": {"low": 1.0, "medium": 0.95, "high": 0.9}
|
303 |
+
}
|
304 |
+
|
305 |
+
base_score = base_scores.get(breed_grooming_needs, base_scores["Moderate"])[user_commitment]
|
306 |
+
|
307 |
+
if breed_size == "Large" and user_commitment == "low":
|
308 |
+
base_score *= 0.80
|
309 |
+
elif breed_size == "Giant" and user_commitment == "low":
|
310 |
+
base_score *= 0.70
|
311 |
+
|
312 |
+
return base_score
|
313 |
+
|
314 |
+
# 4. 經驗等級計算
|
315 |
+
def calculate_experience_score(care_level, user_experience, temperament):
|
316 |
+
base_scores = {
|
317 |
+
"High": {"beginner": 0.3, "intermediate": 0.7, "advanced": 1.0},
|
318 |
+
"Moderate": {"beginner": 0.6, "intermediate": 0.9, "advanced": 1.0},
|
319 |
+
"Low": {"beginner": 0.9, "intermediate": 1.0, "advanced": 1.0}
|
320 |
+
}
|
321 |
+
|
322 |
+
score = base_scores.get(care_level, base_scores["Moderate"])[user_experience]
|
323 |
+
|
324 |
+
temperament_lower = temperament.lower()
|
325 |
+
if user_experience == "beginner":
|
326 |
+
if any(trait in temperament_lower for trait in ['stubborn', 'independent', 'intelligent']):
|
327 |
+
score *= 0.80
|
328 |
+
if any(trait in temperament_lower for trait in ['easy', 'gentle', 'friendly']):
|
329 |
+
score *= 1.15
|
330 |
+
|
331 |
+
return min(1.0, score)
|
332 |
+
|
333 |
+
def calculate_health_score(breed_name: str) -> float:
|
334 |
+
if breed_name not in breed_health_info:
|
335 |
+
return 0.5
|
336 |
+
|
337 |
+
health_notes = breed_health_info[breed_name]['health_notes'].lower()
|
338 |
+
|
339 |
+
# 嚴重健康問題
|
340 |
+
severe_conditions = [
|
341 |
+
'cancer', 'cardiomyopathy', 'epilepsy', 'dysplasia',
|
342 |
+
'bloat', 'progressive', 'syndrome'
|
343 |
+
]
|
344 |
+
|
345 |
+
# 中等健康問題
|
346 |
+
moderate_conditions = [
|
347 |
+
'allergies', 'infections', 'thyroid', 'luxation',
|
348 |
+
'skin problems', 'ear'
|
349 |
+
]
|
350 |
+
|
351 |
+
severe_count = sum(1 for condition in severe_conditions if condition in health_notes)
|
352 |
+
moderate_count = sum(1 for condition in moderate_conditions if condition in health_notes)
|
353 |
+
|
354 |
+
health_score = 1.0
|
355 |
+
health_score -= (severe_count * 0.1)
|
356 |
+
health_score -= (moderate_count * 0.05)
|
357 |
+
|
358 |
+
# 特殊條件調整
|
359 |
+
if user_prefs.has_children:
|
360 |
+
if 'requires frequent' in health_notes or 'regular monitoring' in health_notes:
|
361 |
+
health_score *= 0.9
|
362 |
+
|
363 |
+
if user_prefs.experience_level == 'beginner':
|
364 |
+
if 'requires frequent' in health_notes or 'requires experienced' in health_notes:
|
365 |
+
health_score *= 0.8
|
366 |
+
|
367 |
+
return max(0.3, min(1.0, health_score))
|
368 |
+
|
369 |
+
def calculate_noise_score(breed_name: str, user_noise_tolerance: str) -> float:
|
370 |
+
if breed_name not in breed_noise_info:
|
371 |
+
return 0.5
|
372 |
+
|
373 |
+
noise_info = breed_noise_info[breed_name]
|
374 |
+
noise_level = noise_info['noise_level'].lower()
|
375 |
+
|
376 |
+
|
377 |
+
# 基礎噪音分數矩陣
|
378 |
+
noise_matrix = {
|
379 |
+
'low': {'low': 1.0, 'medium': 0.8, 'high': 0.6},
|
380 |
+
'medium': {'low': 0.7, 'medium': 1.0, 'high': 0.8},
|
381 |
+
'high': {'low': 0.4, 'medium': 0.7, 'high': 1.0}
|
382 |
+
}
|
383 |
+
|
384 |
+
# 從噪音矩陣獲取基礎分數
|
385 |
+
base_score = noise_matrix.get(noise_level, {'low': 0.7, 'medium': 0.7, 'high': 0.7})[user_noise_tolerance]
|
386 |
+
|
387 |
+
# 特殊情況調整
|
388 |
+
special_adjustments = 0
|
389 |
+
if user_prefs.has_children and noise_level == 'high':
|
390 |
+
special_adjustments -= 0.1
|
391 |
+
if user_prefs.living_space == 'apartment':
|
392 |
+
if noise_level == 'high':
|
393 |
+
special_adjustments -= 0.15
|
394 |
+
elif noise_level == 'medium':
|
395 |
+
special_adjustments -= 0.05
|
396 |
+
|
397 |
+
final_score = base_score + special_adjustments
|
398 |
+
return max(0.3, min(1.0, final_score))
|
399 |
+
|
400 |
+
# 計算所有基礎分數
|
401 |
+
scores = {
|
402 |
+
'space': calculate_space_score(breed_info['Size'], user_prefs.living_space, user_prefs.space_for_play),
|
403 |
+
'exercise': calculate_exercise_score(breed_info.get('Exercise Needs', 'Moderate'), user_prefs.exercise_time),
|
404 |
+
'grooming': calculate_grooming_score(breed_info.get('Grooming Needs', 'Moderate'), user_prefs.grooming_commitment.lower(), breed_info['Size']),
|
405 |
+
'experience': calculate_experience_score(breed_info.get('Care Level', 'Moderate'), user_prefs.experience_level, breed_info.get('Temperament', '')),
|
406 |
+
'health': calculate_health_score(breed_info.get('Breed', '')),
|
407 |
+
'noise': calculate_noise_score(breed_info.get('Breed', ''), user_prefs.noise_tolerance)
|
408 |
+
}
|
409 |
+
|
410 |
+
# 更新權重配置
|
411 |
+
weights = {
|
412 |
+
'space': 0.20,
|
413 |
+
'exercise': 0.20,
|
414 |
+
'grooming': 0.15,
|
415 |
+
'experience': 0.15,
|
416 |
+
'health': 0.15,
|
417 |
+
'noise': 0.15
|
418 |
+
}
|
419 |
+
|
420 |
+
# 基礎分數計算
|
421 |
+
base_score = sum(score * weights[category]
|
422 |
+
for category, score in scores.items()
|
423 |
+
if category != 'overall')
|
424 |
+
|
425 |
+
# 額外調整
|
426 |
+
adjustments = 0
|
427 |
+
|
428 |
+
# 1. 適應性加分
|
429 |
+
if breed_info.get('Adaptability', 'Medium') == 'High':
|
430 |
+
adjustments += 0.02
|
431 |
+
|
432 |
+
# 2. 氣候相容性
|
433 |
+
if user_prefs.climate in breed_info.get('Suitable Climate', '').split(','):
|
434 |
+
adjustments += 0.02
|
435 |
+
|
436 |
+
# 3. 其他寵物相容性
|
437 |
+
if user_prefs.other_pets and breed_info.get('Good with Other Pets') == 'Yes':
|
438 |
+
adjustments += 0.02
|
439 |
+
|
440 |
+
final_score = min(1.0, max(0, base_score + adjustments))
|
441 |
+
scores['overall'] = round(final_score, 4)
|
442 |
+
|
443 |
+
# 四捨五入所有分數
|
444 |
+
for key in scores:
|
445 |
+
scores[key] = round(scores[key], 4)
|
446 |
+
|
447 |
+
return scores
|
448 |
+
|
449 |
+
except Exception as e:
|
450 |
+
print(f"Error in calculate_compatibility_score: {str(e)}")
|
451 |
+
return {k: 0.5 for k in ['space', 'exercise', 'grooming', 'experience', 'health', 'noise', 'overall']}
|
452 |
+
|
453 |
+
|
454 |
+
def get_breed_recommendations(user_prefs: UserPreferences, top_n: int = 10) -> List[Dict]:
|
455 |
+
"""基於使用者偏好推薦狗品種,確保正確的分數排序"""
|
456 |
+
print("Starting get_breed_recommendations")
|
457 |
+
recommendations = []
|
458 |
+
seen_breeds = set()
|
459 |
+
|
460 |
+
try:
|
461 |
+
# 獲取所有品種
|
462 |
+
conn = sqlite3.connect('animal_detector.db')
|
463 |
+
cursor = conn.cursor()
|
464 |
+
cursor.execute("SELECT Breed FROM AnimalCatalog")
|
465 |
+
all_breeds = cursor.fetchall()
|
466 |
+
conn.close()
|
467 |
+
|
468 |
+
# 收集所有品種的分數
|
469 |
+
for breed_tuple in all_breeds:
|
470 |
+
breed = breed_tuple[0]
|
471 |
+
base_breed = breed.split('(')[0].strip()
|
472 |
+
|
473 |
+
if base_breed in seen_breeds:
|
474 |
+
continue
|
475 |
+
seen_breeds.add(base_breed)
|
476 |
+
|
477 |
+
# 獲取品種資訊
|
478 |
+
breed_info = get_dog_description(breed)
|
479 |
+
if not isinstance(breed_info, dict):
|
480 |
+
continue
|
481 |
+
|
482 |
+
# 獲取噪音資訊
|
483 |
+
noise_info = breed_noise_info.get(breed, {
|
484 |
+
"noise_notes": "Noise information not available",
|
485 |
+
"noise_level": "Unknown",
|
486 |
+
"source": "N/A"
|
487 |
+
})
|
488 |
+
|
489 |
+
# 將噪音資訊整合到品種資訊中
|
490 |
+
breed_info['noise_info'] = noise_info
|
491 |
+
|
492 |
+
# 計算基礎相容性分數
|
493 |
+
compatibility_scores = calculate_compatibility_score(breed_info, user_prefs)
|
494 |
+
|
495 |
+
# 計算品種特定加分
|
496 |
+
breed_bonus = 0.0
|
497 |
+
|
498 |
+
# 壽命加分
|
499 |
+
try:
|
500 |
+
lifespan = breed_info.get('Lifespan', '10-12 years')
|
501 |
+
years = [int(x) for x in lifespan.split('-')[0].split()[0:1]]
|
502 |
+
longevity_bonus = min(0.02, (max(years) - 10) * 0.005)
|
503 |
+
breed_bonus += longevity_bonus
|
504 |
+
except:
|
505 |
+
pass
|
506 |
+
|
507 |
+
# 性格特徵加分
|
508 |
+
temperament = breed_info.get('Temperament', '').lower()
|
509 |
+
positive_traits = ['friendly', 'gentle', 'affectionate', 'intelligent']
|
510 |
+
negative_traits = ['aggressive', 'stubborn', 'dominant']
|
511 |
+
|
512 |
+
breed_bonus += sum(0.01 for trait in positive_traits if trait in temperament)
|
513 |
+
breed_bonus -= sum(0.01 for trait in negative_traits if trait in temperament)
|
514 |
+
|
515 |
+
# 與孩童相容性加分
|
516 |
+
if user_prefs.has_children:
|
517 |
+
if breed_info.get('Good with Children') == 'Yes':
|
518 |
+
breed_bonus += 0.02
|
519 |
+
elif breed_info.get('Good with Children') == 'No':
|
520 |
+
breed_bonus -= 0.03
|
521 |
+
|
522 |
+
# 噪音相關加分
|
523 |
+
if user_prefs.noise_tolerance == 'low':
|
524 |
+
if noise_info['noise_level'].lower() == 'high':
|
525 |
+
breed_bonus -= 0.03
|
526 |
+
elif noise_info['noise_level'].lower() == 'low':
|
527 |
+
breed_bonus += 0.02
|
528 |
+
elif user_prefs.noise_tolerance == 'high':
|
529 |
+
if noise_info['noise_level'].lower() == 'high':
|
530 |
+
breed_bonus += 0.01
|
531 |
+
|
532 |
+
# 計算最終分數
|
533 |
+
breed_bonus = round(breed_bonus, 4)
|
534 |
+
final_score = round(compatibility_scores['overall'] + breed_bonus, 4)
|
535 |
+
|
536 |
+
recommendations.append({
|
537 |
+
'breed': breed,
|
538 |
+
'base_score': round(compatibility_scores['overall'], 4),
|
539 |
+
'bonus_score': round(breed_bonus, 4),
|
540 |
+
'final_score': final_score,
|
541 |
+
'scores': compatibility_scores,
|
542 |
+
'info': breed_info,
|
543 |
+
'noise_info': noise_info # 添加噪音資訊到推薦結果
|
544 |
+
})
|
545 |
+
# 嚴格按照 final_score 排序
|
546 |
+
recommendations.sort(key=lambda x: (round(-x['final_score'], 4), x['breed'] )) # 負號使其降序排列,並確保4位小數
|
547 |
+
|
548 |
+
# 選擇前N名並確保正確排序
|
549 |
+
final_recommendations = []
|
550 |
+
last_score = None
|
551 |
+
rank = 1
|
552 |
+
|
553 |
+
for rec in recommendations:
|
554 |
+
if len(final_recommendations) >= top_n:
|
555 |
+
break
|
556 |
+
|
557 |
+
current_score = rec['final_score']
|
558 |
+
|
559 |
+
# 確保分數遞減
|
560 |
+
if last_score is not None and current_score > last_score:
|
561 |
+
continue
|
562 |
+
|
563 |
+
# 添加排名資訊
|
564 |
+
rec['rank'] = rank
|
565 |
+
final_recommendations.append(rec)
|
566 |
+
|
567 |
+
last_score = current_score
|
568 |
+
rank += 1
|
569 |
+
|
570 |
+
# 驗證最終排序
|
571 |
+
for i in range(len(final_recommendations)-1):
|
572 |
+
current = final_recommendations[i]
|
573 |
+
next_rec = final_recommendations[i+1]
|
574 |
+
|
575 |
+
if current['final_score'] < next_rec['final_score']:
|
576 |
+
print(f"Warning: Sorting error detected!")
|
577 |
+
print(f"#{i+1} {current['breed']}: {current['final_score']}")
|
578 |
+
print(f"#{i+2} {next_rec['breed']}: {next_rec['final_score']}")
|
579 |
+
|
580 |
+
# 交換位置
|
581 |
+
final_recommendations[i], final_recommendations[i+1] = \
|
582 |
+
final_recommendations[i+1], final_recommendations[i]
|
583 |
+
|
584 |
+
# 打印最終結果以供驗證
|
585 |
+
print("\nFinal Rankings:")
|
586 |
+
for rec in final_recommendations:
|
587 |
+
print(f"#{rec['rank']} {rec['breed']}")
|
588 |
+
print(f"Base Score: {rec['base_score']:.4f}")
|
589 |
+
print(f"Bonus: {rec['bonus_score']:.4f}")
|
590 |
+
print(f"Final Score: {rec['final_score']:.4f}\n")
|
591 |
+
|
592 |
+
return final_recommendations
|
593 |
+
|
594 |
+
except Exception as e:
|
595 |
+
print(f"Error in get_breed_recommendations: {str(e)}")
|
596 |
+
print(f"Traceback: {traceback.format_exc()}")
|
597 |
+
return []
|
598 |
+
|
599 |
+
|
600 |
+
|
601 |
+
def calculate_breed_bonus(breed_info: dict, user_prefs: UserPreferences) -> float:
|
602 |
+
"""計算品種額外加分"""
|
603 |
+
bonus = 0.0
|
604 |
+
|
605 |
+
# 壽命加分
|
606 |
+
try:
|
607 |
+
lifespan = breed_info.get('Lifespan', '10-12 years')
|
608 |
+
years = [int(x) for x in lifespan.split('-')[0].split()[0:1]]
|
609 |
+
longevity_bonus = min(0.05, (max(years) - 10) * 0.01)
|
610 |
+
bonus += longevity_bonus
|
611 |
+
except:
|
612 |
+
pass
|
613 |
+
|
614 |
+
# 性格特徵加分
|
615 |
+
temperament = breed_info.get('Temperament', '').lower()
|
616 |
+
if user_prefs.has_children:
|
617 |
+
if 'gentle' in temperament or 'patient' in temperament:
|
618 |
+
bonus += 0.03
|
619 |
+
|
620 |
+
# 適應性加分
|
621 |
+
if breed_info.get('Size') == "Small" and user_prefs.living_space == "apartment":
|
622 |
+
bonus += 0.02
|
623 |
+
|
624 |
+
return bonus
|
625 |
+
|
626 |
+
def calculate_additional_factors(breed_info: dict, user_prefs: UserPreferences) -> dict:
|
627 |
+
"""計算額外的排序因素"""
|
628 |
+
factors = {
|
629 |
+
'versatility': 0.0,
|
630 |
+
'health_score': 0.0,
|
631 |
+
'adaptability': 0.0
|
632 |
+
}
|
633 |
+
|
634 |
+
# 計算多功能性分數
|
635 |
+
temperament = breed_info.get('Temperament', '').lower()
|
636 |
+
versatile_traits = ['intelligent', 'adaptable', 'versatile', 'trainable']
|
637 |
+
factors['versatility'] = sum(trait in temperament for trait in versatile_traits) / len(versatile_traits)
|
638 |
+
|
639 |
+
# 計算健康分數(基於預期壽命)
|
640 |
+
lifespan = breed_info.get('Lifespan', '10-12 years')
|
641 |
+
try:
|
642 |
+
years = [int(x) for x in lifespan.split('-')[0].split()[0:1]]
|
643 |
+
factors['health_score'] = min(1.0, max(years) / 15) # 標準化到0-1範圍
|
644 |
+
except:
|
645 |
+
factors['health_score'] = 0.5 # 預設值
|
646 |
+
|
647 |
+
# 計算適應性分數
|
648 |
+
size = breed_info.get('Size', 'Medium')
|
649 |
+
factors['adaptability'] = {
|
650 |
+
'Small': 0.9,
|
651 |
+
'Medium': 0.7,
|
652 |
+
'Large': 0.5,
|
653 |
+
'Giant': 0.3
|
654 |
+
}.get(size, 0.5)
|
655 |
+
|
656 |
+
return factors
|
657 |
+
|
658 |
+
def format_recommendation_html(recommendations: List[Dict]) -> str:
|
659 |
+
"""將推薦結果格式化為HTML"""
|
660 |
+
html_content = "<div class='recommendations-container'>"
|
661 |
+
|
662 |
+
for rec in recommendations:
|
663 |
+
breed = rec['breed']
|
664 |
+
scores = rec['scores']
|
665 |
+
info = rec['info']
|
666 |
+
rank = rec.get('rank', 0)
|
667 |
+
final_score = rec.get('final_score', scores['overall'])
|
668 |
+
bonus_score = rec.get('bonus_score', 0)
|
669 |
+
|
670 |
+
health_info = breed_health_info.get(breed, {"health_notes": default_health_note})
|
671 |
+
noise_info = breed_noise_info.get(breed, {
|
672 |
+
"noise_notes": "Noise information not available",
|
673 |
+
"noise_level": "Unknown",
|
674 |
+
"source": "N/A"
|
675 |
+
})
|
676 |
+
|
677 |
+
# 解析噪音資訊
|
678 |
+
noise_notes = noise_info.get('noise_notes', '').split('\n')
|
679 |
+
noise_characteristics = []
|
680 |
+
barking_triggers = []
|
681 |
+
noise_level = ''
|
682 |
+
|
683 |
+
current_section = None
|
684 |
+
for line in noise_notes:
|
685 |
+
line = line.strip()
|
686 |
+
if 'Typical noise characteristics:' in line:
|
687 |
+
current_section = 'characteristics'
|
688 |
+
elif 'Noise level:' in line:
|
689 |
+
noise_level = line.replace('Noise level:', '').strip()
|
690 |
+
elif 'Barking triggers:' in line:
|
691 |
+
current_section = 'triggers'
|
692 |
+
elif line.startswith('•'):
|
693 |
+
if current_section == 'characteristics':
|
694 |
+
noise_characteristics.append(line[1:].strip())
|
695 |
+
elif current_section == 'triggers':
|
696 |
+
barking_triggers.append(line[1:].strip())
|
697 |
+
|
698 |
+
# 生成特徵和觸發因素的HTML
|
699 |
+
noise_characteristics_html = '\n'.join([f'<li>{item}</li>' for item in noise_characteristics])
|
700 |
+
barking_triggers_html = '\n'.join([f'<li>{item}</li>' for item in barking_triggers])
|
701 |
+
|
702 |
+
# 處理健康資訊
|
703 |
+
health_notes = health_info.get('health_notes', '').split('\n')
|
704 |
+
health_considerations = []
|
705 |
+
health_screenings = []
|
706 |
+
|
707 |
+
current_section = None
|
708 |
+
for line in health_notes:
|
709 |
+
line = line.strip()
|
710 |
+
if 'Common breed-specific health considerations' in line:
|
711 |
+
current_section = 'considerations'
|
712 |
+
elif 'Recommended health screenings:' in line:
|
713 |
+
current_section = 'screenings'
|
714 |
+
elif line.startswith('•'):
|
715 |
+
if current_section == 'considerations':
|
716 |
+
health_considerations.append(line[1:].strip())
|
717 |
+
elif current_section == 'screenings':
|
718 |
+
health_screenings.append(line[1:].strip())
|
719 |
+
|
720 |
+
health_considerations_html = '\n'.join([f'<li>{item}</li>' for item in health_considerations])
|
721 |
+
health_screenings_html = '\n'.join([f'<li>{item}</li>' for item in health_screenings])
|
722 |
+
|
723 |
+
# 獎勵原因計算
|
724 |
+
bonus_reasons = []
|
725 |
+
temperament = info.get('Temperament', '').lower()
|
726 |
+
if any(trait in temperament for trait in ['friendly', 'gentle', 'affectionate']):
|
727 |
+
bonus_reasons.append("Positive temperament traits")
|
728 |
+
if info.get('Good with Children') == 'Yes':
|
729 |
+
bonus_reasons.append("Excellent with children")
|
730 |
+
try:
|
731 |
+
lifespan = info.get('Lifespan', '10-12 years')
|
732 |
+
years = int(lifespan.split('-')[0])
|
733 |
+
if years > 12:
|
734 |
+
bonus_reasons.append("Above-average lifespan")
|
735 |
+
except:
|
736 |
+
pass
|
737 |
+
|
738 |
+
html_content += f"""
|
739 |
+
<div class="dog-info-card recommendation-card">
|
740 |
+
<div class="breed-info">
|
741 |
+
<h2 class="section-title">
|
742 |
+
<span class="icon">🏆</span> #{rank} {breed.replace('_', ' ')}
|
743 |
+
<span class="score-badge">
|
744 |
+
Overall Match: {final_score*100:.1f}%
|
745 |
+
</span>
|
746 |
+
</h2>
|
747 |
+
<div class="compatibility-scores">
|
748 |
+
<div class="score-item">
|
749 |
+
<span class="label">Space Compatibility:</span>
|
750 |
+
<div class="progress-bar">
|
751 |
+
<div class="progress" style="width: {scores['space']*100}%"></div>
|
752 |
+
</div>
|
753 |
+
<span class="percentage">{scores['space']*100:.1f}%</span>
|
754 |
+
</div>
|
755 |
+
<div class="score-item">
|
756 |
+
<span class="label">Exercise Match:</span>
|
757 |
+
<div class="progress-bar">
|
758 |
+
<div class="progress" style="width: {scores['exercise']*100}%"></div>
|
759 |
+
</div>
|
760 |
+
<span class="percentage">{scores['exercise']*100:.1f}%</span>
|
761 |
+
</div>
|
762 |
+
<div class="score-item">
|
763 |
+
<span class="label">Grooming Match:</span>
|
764 |
+
<div class="progress-bar">
|
765 |
+
<div class="progress" style="width: {scores['grooming']*100}%"></div>
|
766 |
+
</div>
|
767 |
+
<span class="percentage">{scores['grooming']*100:.1f}%</span>
|
768 |
+
</div>
|
769 |
+
<div class="score-item">
|
770 |
+
<span class="label">Experience Match:</span>
|
771 |
+
<div class="progress-bar">
|
772 |
+
<div class="progress" style="width: {scores['experience']*100}%"></div>
|
773 |
+
</div>
|
774 |
+
<span class="percentage">{scores['experience']*100:.1f}%</span>
|
775 |
+
</div>
|
776 |
+
{f'''
|
777 |
+
<div class="score-item bonus-score">
|
778 |
+
<span class="label">
|
779 |
+
Breed Bonus:
|
780 |
+
<span class="tooltip">
|
781 |
+
<span class="tooltip-icon">ⓘ</span>
|
782 |
+
<span class="tooltip-text">
|
783 |
+
<strong>Breed Bonus Points:</strong><br>
|
784 |
+
• {('<br>• '.join(bonus_reasons)) if bonus_reasons else 'No additional bonus points'}<br>
|
785 |
+
<br>
|
786 |
+
<strong>Bonus Factors Include:</strong><br>
|
787 |
+
• Friendly temperament<br>
|
788 |
+
• Child compatibility<br>
|
789 |
+
• Longer lifespan<br>
|
790 |
+
• Living space adaptability
|
791 |
+
</span>
|
792 |
+
</span>
|
793 |
+
</span>
|
794 |
+
<div class="progress-bar">
|
795 |
+
<div class="progress" style="width: {bonus_score*100}%"></div>
|
796 |
+
</div>
|
797 |
+
<span class="percentage">{bonus_score*100:.1f}%</span>
|
798 |
+
</div>
|
799 |
+
''' if bonus_score > 0 else ''}
|
800 |
+
</div>
|
801 |
+
<div class="breed-details-section">
|
802 |
+
<h3 class="subsection-title">
|
803 |
+
<span class="icon">📋</span> Breed Details
|
804 |
+
</h3>
|
805 |
+
<div class="details-grid">
|
806 |
+
<div class="detail-item">
|
807 |
+
<span class="tooltip">
|
808 |
+
<span class="icon">📏</span>
|
809 |
+
<span class="label">Size:</span>
|
810 |
+
<span class="tooltip-icon">ⓘ</span>
|
811 |
+
<span class="tooltip-text">
|
812 |
+
<strong>Size Categories:</strong><br>
|
813 |
+
• Small: Under 20 pounds<br>
|
814 |
+
• Medium: 20-60 pounds<br>
|
815 |
+
• Large: Over 60 pounds
|
816 |
+
</span>
|
817 |
+
<span class="value">{info['Size']}</span>
|
818 |
+
</span>
|
819 |
+
</div>
|
820 |
+
<div class="detail-item">
|
821 |
+
<span class="tooltip">
|
822 |
+
<span class="icon">🏃</span>
|
823 |
+
<span class="label">Exercise Needs:</span>
|
824 |
+
<span class="tooltip-icon">ⓘ</span>
|
825 |
+
<span class="tooltip-text">
|
826 |
+
<strong>Exercise Needs:</strong><br>
|
827 |
+
• Low: Short walks<br>
|
828 |
+
• Moderate: 1-2 hours daily<br>
|
829 |
+
• High: 2+ hours daily<br>
|
830 |
+
• Very High: Constant activity
|
831 |
+
</span>
|
832 |
+
<span class="value">{info['Exercise Needs']}</span>
|
833 |
+
</span>
|
834 |
+
</div>
|
835 |
+
<div class="detail-item">
|
836 |
+
<span class="tooltip">
|
837 |
+
<span class="icon">👨👩👧👦</span>
|
838 |
+
<span class="label">Good with Children:</span>
|
839 |
+
<span class="tooltip-icon">ⓘ</span>
|
840 |
+
<span class="tooltip-text">
|
841 |
+
<strong>Child Compatibility:</strong><br>
|
842 |
+
• Yes: Excellent with kids<br>
|
843 |
+
• Moderate: Good with older children<br>
|
844 |
+
• No: Better for adult households
|
845 |
+
</span>
|
846 |
+
<span class="value">{info['Good with Children']}</span>
|
847 |
+
</span>
|
848 |
+
</div>
|
849 |
+
</div>
|
850 |
+
</div>
|
851 |
+
<div class="description-section">
|
852 |
+
<h3 class="subsection-title">
|
853 |
+
<span class="icon">📝</span> Description
|
854 |
+
</h3>
|
855 |
+
<p class="description-text">{info.get('Description', '')}</p>
|
856 |
+
</div>
|
857 |
+
<div class="noise-section">
|
858 |
+
<h3 class="subsection-title">
|
859 |
+
<span class="icon">🔊</span> Noise Behavior
|
860 |
+
</h3>
|
861 |
+
<div class="noise-info">
|
862 |
+
<div class="noise-details">
|
863 |
+
<div class="characteristics-block">
|
864 |
+
<h4>Typical noise characteristics:</h4>
|
865 |
+
<ul>
|
866 |
+
{noise_characteristics_html}
|
867 |
+
</ul>
|
868 |
+
|
869 |
+
<div class="noise-level-block">
|
870 |
+
<h4>Noise level:</h4>
|
871 |
+
<p>{noise_level}</p>
|
872 |
+
</div>
|
873 |
+
|
874 |
+
<h4>Barking triggers:</h4>
|
875 |
+
<ul>
|
876 |
+
{barking_triggers_html}
|
877 |
+
</ul>
|
878 |
+
</div>
|
879 |
+
</div>
|
880 |
+
<div class="health-disclaimer">
|
881 |
+
<p class="source-text">› Source: Compiled from various breed behavior resources, 2024</p>
|
882 |
+
<p>› Individual dogs may vary in their vocalization patterns.</p>
|
883 |
+
<p>› Training can significantly influence barking behavior.</p>
|
884 |
+
<p>› Environmental factors may affect noise levels.</p>
|
885 |
+
</div>
|
886 |
+
</div>
|
887 |
+
</div>
|
888 |
+
|
889 |
+
<div class="health-section">
|
890 |
+
<h3 class="subsection-title">
|
891 |
+
<span class="icon">🏥</span> Health Insights
|
892 |
+
<span class="tooltip">
|
893 |
+
<span class="tooltip-icon">ⓘ</span>
|
894 |
+
<span class="tooltip-text">
|
895 |
+
Health information is compiled from multiple sources including veterinary resources, breed guides, and international canine health databases.
|
896 |
+
Each dog is unique and may vary from these general guidelines.
|
897 |
+
</span>
|
898 |
+
</span>
|
899 |
+
</h3>
|
900 |
+
<div class="health-info">
|
901 |
+
<div class="health-details">
|
902 |
+
<h4>Common breed-specific health considerations :</h4>
|
903 |
+
<ul>
|
904 |
+
<li>Patellar luxation</li>
|
905 |
+
<li>Progressive retinal atrophy</li>
|
906 |
+
<li>Von Willebrand's disease</li>
|
907 |
+
<li>Open fontanel</li>
|
908 |
+
</ul>
|
909 |
+
<h4>Recommended health screenings:</h4>
|
910 |
+
<ul>
|
911 |
+
<li>Patella evaluation</li>
|
912 |
+
<li>Eye examination</li>
|
913 |
+
<li>Blood clotting tests</li>
|
914 |
+
<li>Skull development monitoring</li>
|
915 |
+
</ul>
|
916 |
+
</div>
|
917 |
+
</div>
|
918 |
+
<div class="health-disclaimer">
|
919 |
+
<p class="source">› Source: Compiled from various veterinary and breed information resources, 2024</p>
|
920 |
+
<p>› This information is for reference only and based on breed tendencies.</p>
|
921 |
+
<p>› Each dog is unique and may not develop any or all of these conditions.</p>
|
922 |
+
<p>› Always consult with qualified veterinarians for professional advice.</p>
|
923 |
+
</div>
|
924 |
+
</div>
|
925 |
+
<div class="action-section">
|
926 |
+
<a href="https://www.akc.org/dog-breeds/{breed.lower().replace('_', '-')}/"
|
927 |
+
target="_blank"
|
928 |
+
class="akc-button">
|
929 |
+
<span class="icon">🌐</span>
|
930 |
+
Learn more about {breed.replace('_', ' ')} on AKC website
|
931 |
+
</a>
|
932 |
+
</div>
|
933 |
+
</div>
|
934 |
+
</div>
|
935 |
+
"""
|
936 |
+
|
937 |
+
html_content += "</div>"
|
938 |
+
return html_content
|
history_manager.py
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
from datetime import datetime
|
3 |
+
import json
|
4 |
+
import os
|
5 |
+
import pytz
|
6 |
+
import traceback
|
7 |
+
|
8 |
+
class UserHistoryManager:
|
9 |
+
def __init__(self):
|
10 |
+
"""初始化歷史紀錄管理器"""
|
11 |
+
self.history_file = "user_history.json"
|
12 |
+
print(f"Initializing UserHistoryManager with file: {os.path.abspath(self.history_file)}")
|
13 |
+
self._init_file()
|
14 |
+
|
15 |
+
def _init_file(self):
|
16 |
+
"""初始化JSON檔案"""
|
17 |
+
try:
|
18 |
+
if not os.path.exists(self.history_file):
|
19 |
+
print(f"Creating new history file: {self.history_file}")
|
20 |
+
with open(self.history_file, 'w', encoding='utf-8') as f:
|
21 |
+
json.dump([], f)
|
22 |
+
else:
|
23 |
+
print(f"History file exists: {self.history_file}")
|
24 |
+
# 驗證檔案內容
|
25 |
+
with open(self.history_file, 'r', encoding='utf-8') as f:
|
26 |
+
data = json.load(f)
|
27 |
+
print(f"Current history entries: {len(data)}")
|
28 |
+
except Exception as e:
|
29 |
+
print(f"Error in _init_file: {str(e)}")
|
30 |
+
print(traceback.format_exc())
|
31 |
+
|
32 |
+
|
33 |
+
def save_history(self, user_preferences: dict, results: list) -> bool:
|
34 |
+
"""儲存搜尋歷史,使用台北時間"""
|
35 |
+
try:
|
36 |
+
print("\nSaving history:")
|
37 |
+
print("Results to save:", results)
|
38 |
+
|
39 |
+
# 使用 pytz 創建台北時區
|
40 |
+
taipei_tz = pytz.timezone('Asia/Taipei')
|
41 |
+
# 獲取當前時間並轉換為台北時間
|
42 |
+
taipei_time = datetime.now(taipei_tz)
|
43 |
+
|
44 |
+
history_entry = {
|
45 |
+
"timestamp": taipei_time.strftime("%Y-%m-%d %H:%M:%S"),
|
46 |
+
"preferences": user_preferences,
|
47 |
+
"results": results
|
48 |
+
}
|
49 |
+
|
50 |
+
with open(self.history_file, 'r', encoding='utf-8') as f:
|
51 |
+
history = json.load(f)
|
52 |
+
|
53 |
+
# 添加新紀錄
|
54 |
+
history.append(history_entry)
|
55 |
+
|
56 |
+
# 限制保存最近的20筆記錄
|
57 |
+
if len(history) > 20:
|
58 |
+
history = history[-20:]
|
59 |
+
|
60 |
+
with open(self.history_file, 'w', encoding='utf-8') as f:
|
61 |
+
json.dump(history, f, ensure_ascii=False, indent=2)
|
62 |
+
|
63 |
+
return True
|
64 |
+
except Exception as e:
|
65 |
+
print(f"Error saving history: {str(e)}")
|
66 |
+
return False
|
67 |
+
|
68 |
+
def get_history(self) -> list:
|
69 |
+
"""獲取搜尋歷史"""
|
70 |
+
try:
|
71 |
+
print("Attempting to read history") # Debug
|
72 |
+
with open(self.history_file, 'r', encoding='utf-8') as f:
|
73 |
+
data = json.load(f)
|
74 |
+
print(f"Read {len(data)} history entries") # Debug
|
75 |
+
return data if isinstance(data, list) else []
|
76 |
+
except Exception as e:
|
77 |
+
print(f"Error reading history: {str(e)}")
|
78 |
+
print(traceback.format_exc())
|
79 |
+
return []
|
80 |
+
|
81 |
+
def clear_all_history(self) -> bool:
|
82 |
+
"""清除所有歷史紀錄"""
|
83 |
+
try:
|
84 |
+
print("Attempting to clear all history") # Debug
|
85 |
+
with open(self.history_file, 'w', encoding='utf-8') as f:
|
86 |
+
json.dump([], f)
|
87 |
+
print("History cleared successfully") # Debug
|
88 |
+
return True
|
89 |
+
except Exception as e:
|
90 |
+
print(f"Error clearing history: {str(e)}")
|
91 |
+
print(traceback.format_exc())
|
92 |
+
return False
|
search_history.py
ADDED
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
import gradio as gr
|
3 |
+
import traceback
|
4 |
+
from typing import Optional, Dict, List
|
5 |
+
from history_manager import UserHistoryManager
|
6 |
+
|
7 |
+
class SearchHistoryComponent:
|
8 |
+
def __init__(self):
|
9 |
+
"""初始化搜索歷史組件"""
|
10 |
+
self.history_manager = UserHistoryManager()
|
11 |
+
|
12 |
+
def format_history_html(self, history_data: Optional[List[Dict]] = None) -> str:
|
13 |
+
"""將歷史記錄格式化為HTML"""
|
14 |
+
try:
|
15 |
+
if history_data is None:
|
16 |
+
history_data = self.history_manager.get_history()
|
17 |
+
|
18 |
+
if not history_data:
|
19 |
+
return """
|
20 |
+
<div style='text-align: center; padding: 20px; color: #666;'>
|
21 |
+
No search history yet. Try making some breed recommendations!
|
22 |
+
</div>
|
23 |
+
"""
|
24 |
+
|
25 |
+
html = "<div class='history-container'>"
|
26 |
+
|
27 |
+
for entry in reversed(history_data):
|
28 |
+
timestamp = entry.get('timestamp', 'Unknown time')
|
29 |
+
prefs = entry.get('preferences', {})
|
30 |
+
results = entry.get('results', [])
|
31 |
+
|
32 |
+
html += f"""
|
33 |
+
<div class="history-entry">
|
34 |
+
<div class="history-header">
|
35 |
+
<span class="timestamp">🕒 {timestamp}</span>
|
36 |
+
</div>
|
37 |
+
|
38 |
+
<div class="params-list">
|
39 |
+
<h4>Search Parameters:</h4>
|
40 |
+
<ul>
|
41 |
+
<li><span class="param-label">Living Space:</span> {prefs.get('living_space', 'N/A')}</li>
|
42 |
+
<li><span class="param-label">Exercise Time:</span> {prefs.get('exercise_time', 'N/A')} minutes</li>
|
43 |
+
<li><span class="param-label">Grooming:</span> {prefs.get('grooming_commitment', 'N/A')}</li>
|
44 |
+
<li><span class="param-label">Experience:</span> {prefs.get('experience_level', 'N/A')}</li>
|
45 |
+
<li><span class="param-label">Children at Home:</span> {"Yes" if prefs.get('has_children') else "No"}</li>
|
46 |
+
<li><span class="param-label">Noise Tolerance:</span> {prefs.get('noise_tolerance', 'N/A')}</li>
|
47 |
+
</ul>
|
48 |
+
</div>
|
49 |
+
|
50 |
+
<div class="results-list">
|
51 |
+
<h4>Top 10 Breed Matches:</h4>
|
52 |
+
<div class="breed-list">
|
53 |
+
"""
|
54 |
+
|
55 |
+
if results:
|
56 |
+
for i, result in enumerate(results[:10], 1):
|
57 |
+
breed_name = result.get('breed', 'Unknown breed').replace('_', ' ')
|
58 |
+
score = result.get('overall_score', result.get('final_score', 0))
|
59 |
+
html += f"""
|
60 |
+
<div class="breed-item">
|
61 |
+
<div class="breed-info">
|
62 |
+
<span class="breed-rank">#{i}</span>
|
63 |
+
<span class="breed-name">{breed_name}</span>
|
64 |
+
<span class="breed-score">{score*100:.1f}%</span>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
"""
|
68 |
+
|
69 |
+
html += """
|
70 |
+
</div>
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
"""
|
74 |
+
|
75 |
+
html += "</div>"
|
76 |
+
return html
|
77 |
+
|
78 |
+
except Exception as e:
|
79 |
+
print(f"Error formatting history: {str(e)}")
|
80 |
+
print(traceback.format_exc())
|
81 |
+
return f"""
|
82 |
+
<div style='text-align: center; padding: 20px; color: #dc2626;'>
|
83 |
+
Error formatting history. Please try refreshing the page.
|
84 |
+
<br>Error details: {str(e)}
|
85 |
+
</div>
|
86 |
+
"""
|
87 |
+
|
88 |
+
def clear_history(self) -> str:
|
89 |
+
"""清除所有搜尋歷史"""
|
90 |
+
try:
|
91 |
+
success = self.history_manager.clear_all_history()
|
92 |
+
print(f"Clear history result: {success}")
|
93 |
+
return self.format_history_html()
|
94 |
+
except Exception as e:
|
95 |
+
print(f"Error in clear_history: {str(e)}")
|
96 |
+
print(traceback.format_exc())
|
97 |
+
return "Error clearing history"
|
98 |
+
|
99 |
+
def refresh_history(self) -> str:
|
100 |
+
"""刷新歷史記錄顯示"""
|
101 |
+
try:
|
102 |
+
return self.format_history_html()
|
103 |
+
except Exception as e:
|
104 |
+
print(f"Error in refresh_history: {str(e)}")
|
105 |
+
return "Error refreshing history"
|
106 |
+
|
107 |
+
def save_search(self, user_preferences: dict, results: list) -> bool:
|
108 |
+
"""保存搜索結果"""
|
109 |
+
return self.history_manager.save_history(user_preferences, results)
|
110 |
+
|
111 |
+
def create_history_component():
|
112 |
+
"""只创建历史组件实例,不创建UI"""
|
113 |
+
return SearchHistoryComponent()
|
114 |
+
|
115 |
+
def create_history_tab(history_component: SearchHistoryComponent):
|
116 |
+
"""创建历史记录标签页
|
117 |
+
|
118 |
+
Args:
|
119 |
+
history_component: 已创建的历史组件实例
|
120 |
+
"""
|
121 |
+
with gr.TabItem("Recommendation Search History"):
|
122 |
+
gr.HTML("""
|
123 |
+
<div style='text-align: center; padding: 20px;'>
|
124 |
+
<h3 style='color: #2D3748; margin-bottom: 10px;'>Search History</h3>
|
125 |
+
<p style='color: #4A5568;'>View your previous breed recommendations and search preferences</p>
|
126 |
+
</div>
|
127 |
+
""")
|
128 |
+
|
129 |
+
with gr.Row():
|
130 |
+
with gr.Column(scale=4):
|
131 |
+
history_display = gr.HTML()
|
132 |
+
|
133 |
+
with gr.Row():
|
134 |
+
with gr.Column(scale=1):
|
135 |
+
clear_history_btn = gr.Button(
|
136 |
+
"🗑️ Clear History",
|
137 |
+
variant="secondary",
|
138 |
+
size="sm"
|
139 |
+
)
|
140 |
+
with gr.Column(scale=1):
|
141 |
+
refresh_btn = gr.Button(
|
142 |
+
"🔄 Refresh",
|
143 |
+
variant="secondary",
|
144 |
+
size="sm"
|
145 |
+
)
|
146 |
+
|
147 |
+
history_display.value = history_component.format_history_html()
|
148 |
+
|
149 |
+
clear_history_btn.click(
|
150 |
+
fn=history_component.clear_history,
|
151 |
+
outputs=[history_display],
|
152 |
+
api_name="clear_history"
|
153 |
+
)
|
154 |
+
|
155 |
+
refresh_btn.click(
|
156 |
+
fn=history_component.refresh_history,
|
157 |
+
outputs=[history_display],
|
158 |
+
api_name="refresh_history"
|
159 |
+
)
|
styles.py
ADDED
@@ -0,0 +1,892 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
def get_css_styles():
|
3 |
+
return """
|
4 |
+
.dog-info-card {
|
5 |
+
border: 1px solid #e1e4e8;
|
6 |
+
margin: 40px 0;
|
7 |
+
padding: 0;
|
8 |
+
border-radius: 12px;
|
9 |
+
box-shadow: 0 2px 12px rgba(0,0,0,0.08);
|
10 |
+
overflow: hidden;
|
11 |
+
transition: all 0.3s ease;
|
12 |
+
background: white;
|
13 |
+
}
|
14 |
+
|
15 |
+
.dog-info-card:hover {
|
16 |
+
box-shadow: 0 4px 16px rgba(0,0,0,0.12);
|
17 |
+
}
|
18 |
+
|
19 |
+
.dog-info-header {
|
20 |
+
padding: 24px 28px; /* 增加內距 */
|
21 |
+
margin: 0;
|
22 |
+
font-size: 22px;
|
23 |
+
font-weight: bold;
|
24 |
+
border-bottom: 1px solid #e1e4e8;
|
25 |
+
}
|
26 |
+
|
27 |
+
.breed-info {
|
28 |
+
padding: 28px; /* 增加整體內距 */
|
29 |
+
line-height: 1.6;
|
30 |
+
}
|
31 |
+
|
32 |
+
.section-title {
|
33 |
+
font-size: 1.3em;
|
34 |
+
font-weight: 700;
|
35 |
+
color: #2c3e50;
|
36 |
+
margin: 32px 0 20px 0;
|
37 |
+
padding: 12px 0;
|
38 |
+
border-bottom: 2px solid #e1e4e8;
|
39 |
+
text-transform: uppercase;
|
40 |
+
letter-spacing: 0.5px;
|
41 |
+
display: flex;
|
42 |
+
align-items: center;
|
43 |
+
gap: 8px;
|
44 |
+
position: relative;
|
45 |
+
}
|
46 |
+
|
47 |
+
.icon {
|
48 |
+
font-size: 1.2em;
|
49 |
+
display: inline-flex;
|
50 |
+
align-items: center;
|
51 |
+
justify-content: center;
|
52 |
+
}
|
53 |
+
|
54 |
+
.info-section, .care-section, .family-section {
|
55 |
+
display: flex;
|
56 |
+
flex-wrap: wrap;
|
57 |
+
gap: 16px;
|
58 |
+
margin-bottom: 28px; /* 增加底部間距 */
|
59 |
+
padding: 20px; /* 增加內距 */
|
60 |
+
background: #f8f9fa;
|
61 |
+
border-radius: 12px;
|
62 |
+
border: 1px solid #e1e4e8; /* 添加邊框 */
|
63 |
+
}
|
64 |
+
|
65 |
+
.info-item {
|
66 |
+
background: white; /* 改為白色背景 */
|
67 |
+
padding: 14px 18px; /* 增加內距 */
|
68 |
+
border-radius: 8px;
|
69 |
+
display: flex;
|
70 |
+
align-items: center;
|
71 |
+
gap: 10px;
|
72 |
+
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
|
73 |
+
border: 1px solid #e1e4e8;
|
74 |
+
flex: 1 1 auto;
|
75 |
+
min-width: 200px;
|
76 |
+
}
|
77 |
+
|
78 |
+
.label {
|
79 |
+
color: #666;
|
80 |
+
font-weight: 600;
|
81 |
+
font-size: 1.1rem;
|
82 |
+
}
|
83 |
+
|
84 |
+
.value {
|
85 |
+
color: #2c3e50;
|
86 |
+
font-weight: 500;
|
87 |
+
font-size: 1.1rem;
|
88 |
+
}
|
89 |
+
|
90 |
+
.temperament-section {
|
91 |
+
background: #f8f9fa;
|
92 |
+
padding: 20px; /* 增加內距 */
|
93 |
+
border-radius: 12px;
|
94 |
+
margin-bottom: 28px; /* 增加間距 */
|
95 |
+
color: #444;
|
96 |
+
border: 1px solid #e1e4e8; /* 添加邊框 */
|
97 |
+
}
|
98 |
+
|
99 |
+
.description-section {
|
100 |
+
background: #f8f9fa;
|
101 |
+
padding: 24px; /* 增加內距 */
|
102 |
+
border-radius: 12px;
|
103 |
+
margin: 28px 0; /* 增加上下間距 */
|
104 |
+
line-height: 1.8;
|
105 |
+
color: #444;
|
106 |
+
border: 1px solid #e1e4e8; /* 添加邊框 */
|
107 |
+
fontsize: 1.1rem;
|
108 |
+
}
|
109 |
+
.description-section p {
|
110 |
+
margin: 0;
|
111 |
+
padding: 0;
|
112 |
+
text-align: justify; /* 文字兩端對齊 */
|
113 |
+
word-wrap: break-word; /* 確保長單字會換行 */
|
114 |
+
white-space: pre-line; /* 保留換行但合併空白 */
|
115 |
+
max-width: 100%; /* 確保不會超出容器 */
|
116 |
+
}
|
117 |
+
|
118 |
+
.action-section {
|
119 |
+
margin-top: 24px;
|
120 |
+
text-align: center;
|
121 |
+
}
|
122 |
+
|
123 |
+
.akc-button,
|
124 |
+
.breed-section .akc-link,
|
125 |
+
.breed-option .akc-link {
|
126 |
+
display: inline-flex;
|
127 |
+
align-items: center;
|
128 |
+
padding: 14px 28px;
|
129 |
+
background: linear-gradient(145deg, #00509E, #003F7F);
|
130 |
+
color: white;
|
131 |
+
border-radius: 12px; /* 增加圓角 */
|
132 |
+
text-decoration: none;
|
133 |
+
gap: 12px; /* 增加圖標和文字間距 */
|
134 |
+
transition: all 0.3s ease;
|
135 |
+
font-weight: 600;
|
136 |
+
font-size: 1.1em;
|
137 |
+
box-shadow:
|
138 |
+
0 2px 4px rgba(0,0,0,0.1),
|
139 |
+
inset 0 1px 1px rgba(255,255,255,0.1);
|
140 |
+
border: 1px solid rgba(255,255,255,0.1);
|
141 |
+
}
|
142 |
+
|
143 |
+
.akc-button:hover,
|
144 |
+
.breed-section .akc-link:hover,
|
145 |
+
.breed-option .akc-link:hover {
|
146 |
+
background: linear-gradient(145deg, #003F7F, #00509E);
|
147 |
+
transform: translateY(-2px);
|
148 |
+
color: white;
|
149 |
+
box-shadow:
|
150 |
+
0 6px 12px rgba(0,0,0,0.2),
|
151 |
+
inset 0 1px 1px rgba(255,255,255,0.2);
|
152 |
+
border: 1px solid rgba(255,255,255,0.2);
|
153 |
+
}
|
154 |
+
.icon {
|
155 |
+
font-size: 1.3em;
|
156 |
+
filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
|
157 |
+
}
|
158 |
+
|
159 |
+
.warning-message {
|
160 |
+
display: flex;
|
161 |
+
align-items: center;
|
162 |
+
gap: 8px;
|
163 |
+
color: #ff3b30;
|
164 |
+
font-weight: 500;
|
165 |
+
margin: 0;
|
166 |
+
padding: 16px;
|
167 |
+
background: #fff5f5;
|
168 |
+
border-radius: 8px;
|
169 |
+
}
|
170 |
+
|
171 |
+
.model-uncertainty-note {
|
172 |
+
display: flex;
|
173 |
+
align-items: center;
|
174 |
+
gap: 12px;
|
175 |
+
padding: 16px;
|
176 |
+
background-color: #f8f9fa;
|
177 |
+
border-left: 4px solid #6c757d;
|
178 |
+
margin-bottom: 20px;
|
179 |
+
color: #495057;
|
180 |
+
border-radius: 4px;
|
181 |
+
}
|
182 |
+
|
183 |
+
.breeds-list {
|
184 |
+
display: flex;
|
185 |
+
flex-direction: column;
|
186 |
+
gap: 20px;
|
187 |
+
}
|
188 |
+
|
189 |
+
.breed-option {
|
190 |
+
background: white;
|
191 |
+
border: 1px solid #e1e4e8;
|
192 |
+
border-radius: 8px;
|
193 |
+
overflow: hidden;
|
194 |
+
}
|
195 |
+
|
196 |
+
.breed-header {
|
197 |
+
display: flex;
|
198 |
+
align-items: center;
|
199 |
+
padding: 16px;
|
200 |
+
background: #f8f9fa;
|
201 |
+
gap: 12px;
|
202 |
+
border-bottom: 1px solid #e1e4e8;
|
203 |
+
}
|
204 |
+
|
205 |
+
.option-number {
|
206 |
+
font-weight: 600;
|
207 |
+
color: #666;
|
208 |
+
padding: 4px 8px;
|
209 |
+
background: #e1e4e8;
|
210 |
+
border-radius: 4px;
|
211 |
+
}
|
212 |
+
|
213 |
+
.breed-name {
|
214 |
+
font-size: 1.5em;
|
215 |
+
font-weight: bold;
|
216 |
+
color: #2c3e50;
|
217 |
+
flex-grow: 1;
|
218 |
+
}
|
219 |
+
|
220 |
+
.confidence-badge {
|
221 |
+
padding: 4px 12px;
|
222 |
+
border-radius: 20px;
|
223 |
+
font-size: 0.9em;
|
224 |
+
font-weight: 500;
|
225 |
+
}
|
226 |
+
|
227 |
+
.breed-content {
|
228 |
+
padding: 20px;
|
229 |
+
}
|
230 |
+
.breed-content li {
|
231 |
+
margin-bottom: 8px;
|
232 |
+
display: flex;
|
233 |
+
align-items: flex-start; /* 改為頂部對齊 */
|
234 |
+
gap: 8px;
|
235 |
+
flex-wrap: wrap; /* 允許內容換行 */
|
236 |
+
}
|
237 |
+
.breed-content li strong {
|
238 |
+
flex: 0 0 auto; /* 不讓標題縮放 */
|
239 |
+
min-width: 100px; /* 給標題一個固定最小寬度 */
|
240 |
+
}
|
241 |
+
|
242 |
+
ul {
|
243 |
+
padding-left: 0;
|
244 |
+
margin: 0;
|
245 |
+
list-style-type: none;
|
246 |
+
}
|
247 |
+
|
248 |
+
li {
|
249 |
+
margin-bottom: 8px;
|
250 |
+
display: flex;
|
251 |
+
align-items: center;
|
252 |
+
gap: 8px;
|
253 |
+
}
|
254 |
+
|
255 |
+
.action-section {
|
256 |
+
margin-top: 20px;
|
257 |
+
padding: 15px;
|
258 |
+
text-align: center;
|
259 |
+
border-top: 1px solid #dee2e6;
|
260 |
+
}
|
261 |
+
|
262 |
+
.akc-button {
|
263 |
+
display: inline-block;
|
264 |
+
padding: 12px 24px;
|
265 |
+
background-color: #007bff;
|
266 |
+
color: white !important;
|
267 |
+
text-decoration: none;
|
268 |
+
border-radius: 5px;
|
269 |
+
font-weight: 500;
|
270 |
+
transition: background-color 0.3s;
|
271 |
+
}
|
272 |
+
|
273 |
+
.akc-button:hover {
|
274 |
+
background-color: #0056b3;
|
275 |
+
text-decoration: none;
|
276 |
+
}
|
277 |
+
|
278 |
+
.akc-button .icon {
|
279 |
+
margin-right: 8px;
|
280 |
+
}
|
281 |
+
|
282 |
+
.akc-link {
|
283 |
+
color: white;
|
284 |
+
text-decoration: none;
|
285 |
+
font-weight: 600;
|
286 |
+
font-size: 1.1em;
|
287 |
+
transition: all 0.3s ease;
|
288 |
+
}
|
289 |
+
|
290 |
+
.akc-link:hover {
|
291 |
+
text-decoration: underline;
|
292 |
+
color: #D3E3F0;
|
293 |
+
}
|
294 |
+
.tooltip {
|
295 |
+
position: relative;
|
296 |
+
display: inline-flex;
|
297 |
+
align-items: center;
|
298 |
+
gap: 4px;
|
299 |
+
cursor: help;
|
300 |
+
}
|
301 |
+
.tooltip .tooltip-icon {
|
302 |
+
font-size: 14px;
|
303 |
+
color: #666;
|
304 |
+
}
|
305 |
+
.tooltip .tooltip-text {
|
306 |
+
visibility: hidden;
|
307 |
+
width: 250px;
|
308 |
+
background-color: rgba(44, 62, 80, 0.95);
|
309 |
+
color: white;
|
310 |
+
text-align: left;
|
311 |
+
border-radius: 8px;
|
312 |
+
padding: 8px 10px;
|
313 |
+
position: absolute;
|
314 |
+
z-index: 100;
|
315 |
+
bottom: 150%;
|
316 |
+
left: 50%;
|
317 |
+
transform: translateX(-50%);
|
318 |
+
opacity: 0;
|
319 |
+
transition: all 0.3s ease;
|
320 |
+
font-size: 14px;
|
321 |
+
line-height: 1.3;
|
322 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
|
323 |
+
border: 1px solid rgba(255, 255, 255, 0.1)
|
324 |
+
margin-bottom: 10px;
|
325 |
+
}
|
326 |
+
.tooltip.tooltip-left .tooltip-text {
|
327 |
+
left: 0;
|
328 |
+
transform: translateX(0);
|
329 |
+
}
|
330 |
+
.tooltip.tooltip-right .tooltip-text {
|
331 |
+
left: auto;
|
332 |
+
right: 0;
|
333 |
+
transform: translateX(0);
|
334 |
+
}
|
335 |
+
.tooltip-text strong {
|
336 |
+
color: white !important;
|
337 |
+
background-color: transparent !important;
|
338 |
+
display: block; /* 讓標題獨立一行 */
|
339 |
+
margin-bottom: 2px; /* 增加標題下方間距 */
|
340 |
+
padding-bottom: 2px; /* 加入小間距 */
|
341 |
+
border-bottom: 1px solid rgba(255,255,255,0.2);
|
342 |
+
}
|
343 |
+
.tooltip-text {
|
344 |
+
font-size: 13px; /* 稍微縮小字體 */
|
345 |
+
}
|
346 |
+
|
347 |
+
/* 調整列表符號和文字的間距 */
|
348 |
+
.tooltip-text ul {
|
349 |
+
margin: 0;
|
350 |
+
padding-left: 15px; /* 減少列表符號的縮進 */
|
351 |
+
}
|
352 |
+
|
353 |
+
.tooltip-text li {
|
354 |
+
margin-bottom: 1px; /* 減少列表項目間的間距 */
|
355 |
+
}
|
356 |
+
.tooltip-text br {
|
357 |
+
line-height: 1.2; /* 減少行距 */
|
358 |
+
}
|
359 |
+
|
360 |
+
.tooltip .tooltip-text::after {
|
361 |
+
content: "";
|
362 |
+
position: absolute;
|
363 |
+
top: 100%;
|
364 |
+
left: 20%; /* 調整箭頭位置 */
|
365 |
+
margin-left: -5px;
|
366 |
+
border-width: 5px;
|
367 |
+
border-style: solid;
|
368 |
+
border-color: rgba(44, 62, 80, 0.95) transparent transparent transparent;
|
369 |
+
}
|
370 |
+
.tooltip-left .tooltip-text::after {
|
371 |
+
left: 20%;
|
372 |
+
}
|
373 |
+
|
374 |
+
/* 右側箭頭 */
|
375 |
+
.tooltip-right .tooltip-text::after {
|
376 |
+
left: 80%;
|
377 |
+
}
|
378 |
+
.tooltip:hover .tooltip-text {
|
379 |
+
visibility: visible;
|
380 |
+
opacity: 1;
|
381 |
+
}
|
382 |
+
.tooltip .tooltip-text::after {
|
383 |
+
content: "";
|
384 |
+
position: absolute;
|
385 |
+
top: 100%;
|
386 |
+
left: 50%;
|
387 |
+
transform: translateX(-50%);
|
388 |
+
border-width: 8px;
|
389 |
+
border-style: solid;
|
390 |
+
border-color: rgba(44, 62, 80, 0.95) transparent transparent transparent;
|
391 |
+
}
|
392 |
+
.uncertainty-mode .tooltip .tooltip-text {
|
393 |
+
position: absolute;
|
394 |
+
left: 100%;
|
395 |
+
bottom: auto;
|
396 |
+
top: 50%;
|
397 |
+
transform: translateY(-50%);
|
398 |
+
margin-left: 10px;
|
399 |
+
z-index: 1000; /* 確保提示框在最上層 */
|
400 |
+
}
|
401 |
+
|
402 |
+
.uncertainty-mode .tooltip .tooltip-text::after {
|
403 |
+
content: "";
|
404 |
+
position: absolute;
|
405 |
+
top: 50%;
|
406 |
+
right: 100%;
|
407 |
+
transform: translateY(-50%);
|
408 |
+
border-width: 5px;
|
409 |
+
border-style: solid;
|
410 |
+
border-color: transparent rgba(44, 62, 80, 0.95) transparent transparent;
|
411 |
+
}
|
412 |
+
.uncertainty-mode .breed-content {
|
413 |
+
font-size: 1.1rem; /* 增加字體大小 */
|
414 |
+
}
|
415 |
+
.description-section,
|
416 |
+
.description-section p,
|
417 |
+
.temperament-section,
|
418 |
+
.temperament-section .value,
|
419 |
+
.info-item,
|
420 |
+
.info-item .value,
|
421 |
+
.breed-content {
|
422 |
+
font-size: 1.1rem !important; /* 使用 !important 確保覆蓋其他樣式 */
|
423 |
+
}
|
424 |
+
|
425 |
+
.recommendation-card {
|
426 |
+
margin-bottom: 40px;
|
427 |
+
}
|
428 |
+
|
429 |
+
.compatibility-scores {
|
430 |
+
background: #f8f9fa;
|
431 |
+
padding: 24px;
|
432 |
+
border-radius: 12px;
|
433 |
+
margin: 20px 0;
|
434 |
+
}
|
435 |
+
|
436 |
+
.score-item {
|
437 |
+
margin: 15px 0;
|
438 |
+
}
|
439 |
+
|
440 |
+
.progress-bar {
|
441 |
+
height: 12px;
|
442 |
+
background-color: #e9ecef;
|
443 |
+
border-radius: 6px;
|
444 |
+
overflow: hidden;
|
445 |
+
margin: 8px 0;
|
446 |
+
}
|
447 |
+
|
448 |
+
.progress {
|
449 |
+
height: 100%;
|
450 |
+
background: linear-gradient(90deg, #34C759, #30B350);
|
451 |
+
border-radius: 6px;
|
452 |
+
transition: width 0.6s ease;
|
453 |
+
}
|
454 |
+
|
455 |
+
.percentage {
|
456 |
+
float: right;
|
457 |
+
color: #34C759;
|
458 |
+
font-weight: 600;
|
459 |
+
}
|
460 |
+
|
461 |
+
.breed-details-section {
|
462 |
+
margin: 30px 0;
|
463 |
+
}
|
464 |
+
|
465 |
+
.subsection-title {
|
466 |
+
font-size: 1.2em;
|
467 |
+
color: #2c3e50;
|
468 |
+
margin-bottom: 20px;
|
469 |
+
display: flex;
|
470 |
+
align-items: center;
|
471 |
+
gap: 8px;
|
472 |
+
}
|
473 |
+
|
474 |
+
.details-grid {
|
475 |
+
display: grid;
|
476 |
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
477 |
+
gap: 20px;
|
478 |
+
background: #f8f9fa;
|
479 |
+
padding: 20px;
|
480 |
+
border-radius: 12px;
|
481 |
+
border: 1px solid #e1e4e8;
|
482 |
+
}
|
483 |
+
|
484 |
+
.detail-item {
|
485 |
+
background: white;
|
486 |
+
padding: 15px;
|
487 |
+
border-radius: 8px;
|
488 |
+
border: 1px solid #e1e4e8;
|
489 |
+
}
|
490 |
+
|
491 |
+
.description-text {
|
492 |
+
line-height: 1.8;
|
493 |
+
color: #444;
|
494 |
+
margin: 0;
|
495 |
+
padding: 24px 30px; /* 調整內部間距,從 20px 改為 24px 30px */
|
496 |
+
background: #f8f9fa;
|
497 |
+
border-radius: 12px;
|
498 |
+
border: 1px solid #e1e4e8;
|
499 |
+
text-align: justify; /* 添加文字對齊 */
|
500 |
+
word-wrap: break-word; /* 確保長文字會換行 */
|
501 |
+
word-spacing: 1px; /* 加入字間距 */
|
502 |
+
}
|
503 |
+
|
504 |
+
/* 工具提示改進 */
|
505 |
+
.tooltip {
|
506 |
+
position: relative;
|
507 |
+
display: inline-flex;
|
508 |
+
align-items: center;
|
509 |
+
gap: 4px;
|
510 |
+
cursor: help;
|
511 |
+
padding: 5px 0;
|
512 |
+
}
|
513 |
+
|
514 |
+
.tooltip .tooltip-text {
|
515 |
+
visibility: hidden;
|
516 |
+
width: 280px;
|
517 |
+
background-color: rgba(44, 62, 80, 0.95);
|
518 |
+
color: white;
|
519 |
+
text-align: left;
|
520 |
+
border-radius: 8px;
|
521 |
+
padding: 12px 15px;
|
522 |
+
position: absolute;
|
523 |
+
z-index: 1000;
|
524 |
+
bottom: calc(100% + 15px);
|
525 |
+
left: 50%;
|
526 |
+
transform: translateX(-50%);
|
527 |
+
opacity: 0;
|
528 |
+
transition: all 0.3s ease;
|
529 |
+
font-size: 14px;
|
530 |
+
line-height: 1.4;
|
531 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
|
532 |
+
white-space: normal;
|
533 |
+
}
|
534 |
+
|
535 |
+
.tooltip:hover .tooltip-text {
|
536 |
+
visibility: visible;
|
537 |
+
opacity: 1;
|
538 |
+
}
|
539 |
+
|
540 |
+
.score-badge {
|
541 |
+
background-color: #34C759;
|
542 |
+
color: white;
|
543 |
+
padding: 6px 12px;
|
544 |
+
border-radius: 20px;
|
545 |
+
font-size: 0.9em;
|
546 |
+
margin-left: 10px;
|
547 |
+
font-weight: 500;
|
548 |
+
box-shadow: 0 2px 4px rgba(52, 199, 89, 0.2);
|
549 |
+
}
|
550 |
+
|
551 |
+
.bonus-score .tooltip-text {
|
552 |
+
width: 250px;
|
553 |
+
line-height: 1.4;
|
554 |
+
padding: 10px;
|
555 |
+
}
|
556 |
+
|
557 |
+
.bonus-score .progress {
|
558 |
+
background: linear-gradient(90deg, #48bb78, #68d391);
|
559 |
+
}
|
560 |
+
|
561 |
+
.health-section {
|
562 |
+
margin: 25px 0;
|
563 |
+
padding: 24px;
|
564 |
+
background-color: #f8f9fb;
|
565 |
+
border-radius: 12px;
|
566 |
+
border: 1px solid #e1e4e8;
|
567 |
+
}
|
568 |
+
|
569 |
+
.health-section .subsection-title {
|
570 |
+
font-size: 1.3em;
|
571 |
+
font-weight: 600;
|
572 |
+
margin-bottom: 20px;
|
573 |
+
display: flex;
|
574 |
+
align-items: center;
|
575 |
+
gap: 8px;
|
576 |
+
color: #2c3e50;
|
577 |
+
}
|
578 |
+
|
579 |
+
.health-info {
|
580 |
+
background-color: white;
|
581 |
+
padding: 24px;
|
582 |
+
border-radius: 8px;
|
583 |
+
margin: 15px 0;
|
584 |
+
border: 1px solid #e1e4e8;
|
585 |
+
}
|
586 |
+
|
587 |
+
.health-details {
|
588 |
+
font-size: 1.1rem;
|
589 |
+
line-height: 1.6;
|
590 |
+
}
|
591 |
+
|
592 |
+
.health-details h4 {
|
593 |
+
color: #2c3e50;
|
594 |
+
font-size: 1.15rem;
|
595 |
+
font-weight: 600;
|
596 |
+
margin: 20px 0 15px 0;
|
597 |
+
}
|
598 |
+
|
599 |
+
.health-details h4:first-child {
|
600 |
+
margin-top: 0;
|
601 |
+
}
|
602 |
+
|
603 |
+
.health-details ul {
|
604 |
+
list-style-type: none;
|
605 |
+
padding-left: 0;
|
606 |
+
margin: 0 0 25px 0;
|
607 |
+
}
|
608 |
+
|
609 |
+
.health-details ul li {
|
610 |
+
margin-bottom: 12px;
|
611 |
+
padding-left: 20px;
|
612 |
+
position: relative;
|
613 |
+
}
|
614 |
+
|
615 |
+
.health-details ul li:before {
|
616 |
+
content: "•";
|
617 |
+
position: absolute;
|
618 |
+
left: 0;
|
619 |
+
color: #2c3e50;
|
620 |
+
}
|
621 |
+
|
622 |
+
.health-disclaimer {
|
623 |
+
margin-top: 20px;
|
624 |
+
padding-top: 20px;
|
625 |
+
border-top: 1px solid #e1e4e8;
|
626 |
+
}
|
627 |
+
|
628 |
+
.health-disclaimer p {
|
629 |
+
margin: 6px 0;
|
630 |
+
padding-left: 20px;
|
631 |
+
position: relative;
|
632 |
+
color: #888; /* 統一設定灰色 */
|
633 |
+
font-size: 0.95rem;
|
634 |
+
line-height: 1.5;
|
635 |
+
font-style: italic;
|
636 |
+
}
|
637 |
+
|
638 |
+
.health-disclaimer p:before {
|
639 |
+
content: "›";
|
640 |
+
position: absolute;
|
641 |
+
left: 0;
|
642 |
+
color: #999;
|
643 |
+
font-style: normal;
|
644 |
+
font-weight: 500;
|
645 |
+
}
|
646 |
+
|
647 |
+
.health-disclaimer p:first-child {
|
648 |
+
font-style: normal; /* 取消斜體 */
|
649 |
+
font-weight: 500; /* 加粗 */
|
650 |
+
color: #666; /* 稍深的灰色 */
|
651 |
+
}
|
652 |
+
|
653 |
+
.health-disclaimer p span,
|
654 |
+
.health-disclaimer p strong,
|
655 |
+
.health-disclaimer p em {
|
656 |
+
color: inherit;
|
657 |
+
}
|
658 |
+
|
659 |
+
.history-container {
|
660 |
+
max-width: 800px;
|
661 |
+
margin: 0 auto;
|
662 |
+
padding: 20px;
|
663 |
+
}
|
664 |
+
|
665 |
+
.history-entry {
|
666 |
+
background-color: #f8f9fa;
|
667 |
+
border-radius: 8px;
|
668 |
+
padding: 15px;
|
669 |
+
margin-bottom: 20px;
|
670 |
+
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
671 |
+
}
|
672 |
+
|
673 |
+
.history-header {
|
674 |
+
display: flex;
|
675 |
+
justify-content: space-between;
|
676 |
+
align-items: center;
|
677 |
+
margin-bottom: 10px;
|
678 |
+
padding-bottom: 10px;
|
679 |
+
border-bottom: 1px solid #eee;
|
680 |
+
}
|
681 |
+
|
682 |
+
.timestamp {
|
683 |
+
color: #666;
|
684 |
+
font-size: 0.9em;
|
685 |
+
}
|
686 |
+
|
687 |
+
.delete-btn {
|
688 |
+
background: none;
|
689 |
+
border: none;
|
690 |
+
cursor: pointer;
|
691 |
+
font-size: 1.2em;
|
692 |
+
padding: 5px;
|
693 |
+
}
|
694 |
+
|
695 |
+
.delete-btn:hover {
|
696 |
+
color: #dc3545;
|
697 |
+
}
|
698 |
+
|
699 |
+
.search-params ul {
|
700 |
+
list-style: none;
|
701 |
+
padding-left: 20px;
|
702 |
+
}
|
703 |
+
|
704 |
+
.search-params li {
|
705 |
+
margin: 5px 0;
|
706 |
+
color: #555;
|
707 |
+
}
|
708 |
+
|
709 |
+
.top-results ol {
|
710 |
+
padding-left: 25px;
|
711 |
+
}
|
712 |
+
|
713 |
+
.top-results li {
|
714 |
+
margin: 5px 0;
|
715 |
+
color: #333;
|
716 |
+
}
|
717 |
+
|
718 |
+
.breed-item {
|
719 |
+
display: flex;
|
720 |
+
justify-content: space-between;
|
721 |
+
align-items: center;
|
722 |
+
padding: 12px 16px;
|
723 |
+
margin: 8px 0;
|
724 |
+
background-color: white;
|
725 |
+
border-radius: 6px;
|
726 |
+
border: 1px solid #e1e4e8;
|
727 |
+
transition: all 0.2s ease;
|
728 |
+
}
|
729 |
+
|
730 |
+
.breed-item:hover {
|
731 |
+
transform: translateX(5px);
|
732 |
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
733 |
+
}
|
734 |
+
|
735 |
+
.breed-rank {
|
736 |
+
font-weight: 600;
|
737 |
+
color: #666;
|
738 |
+
margin-right: 12px;
|
739 |
+
min-width: 30px;
|
740 |
+
}
|
741 |
+
|
742 |
+
.breed-name {
|
743 |
+
flex: 1;
|
744 |
+
font-weight: 500;
|
745 |
+
color: #2c3e50;
|
746 |
+
padding: 0 12px;
|
747 |
+
}
|
748 |
+
|
749 |
+
.breed-score {
|
750 |
+
font-weight: 600;
|
751 |
+
color: #34C759;
|
752 |
+
padding: 4px 8px;
|
753 |
+
border-radius: 20px;
|
754 |
+
background-color: rgba(52, 199, 89, 0.1);
|
755 |
+
min-width: 70px;
|
756 |
+
text-align: center;
|
757 |
+
}
|
758 |
+
|
759 |
+
.history-entry {
|
760 |
+
background-color: #f8f9fa;
|
761 |
+
border-radius: 12px;
|
762 |
+
padding: 20px;
|
763 |
+
margin-bottom: 25px;
|
764 |
+
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
|
765 |
+
border: 1px solid #e1e4e8;
|
766 |
+
}
|
767 |
+
|
768 |
+
.history-header {
|
769 |
+
margin-bottom: 15px;
|
770 |
+
padding-bottom: 12px;
|
771 |
+
border-bottom: 1px solid #e1e4e8;
|
772 |
+
}
|
773 |
+
|
774 |
+
.history-header .timestamp {
|
775 |
+
color: #666;
|
776 |
+
font-size: 0.9em;
|
777 |
+
display: flex;
|
778 |
+
align-items: center;
|
779 |
+
gap: 6px;
|
780 |
+
}
|
781 |
+
|
782 |
+
h4 {
|
783 |
+
color: #2c3e50;
|
784 |
+
font-size: 1.1em;
|
785 |
+
margin: 18px 0 12px 0;
|
786 |
+
padding: 0;
|
787 |
+
}
|
788 |
+
|
789 |
+
.params-list ul {
|
790 |
+
list-style: none;
|
791 |
+
padding-left: 0;
|
792 |
+
margin: 10px 0;
|
793 |
+
}
|
794 |
+
|
795 |
+
.params-list li {
|
796 |
+
margin: 8px 0;
|
797 |
+
color: #4a5568;
|
798 |
+
display: flex;
|
799 |
+
align-items: center;
|
800 |
+
}
|
801 |
+
|
802 |
+
.empty-history {
|
803 |
+
text-align: center;
|
804 |
+
padding: 40px 20px;
|
805 |
+
color: #666;
|
806 |
+
font-size: 1.1em;
|
807 |
+
background-color: #f8f9fa;
|
808 |
+
border-radius: 12px;
|
809 |
+
border: 1px dashed #e1e4e8;
|
810 |
+
margin: 20px 0;
|
811 |
+
}
|
812 |
+
|
813 |
+
.noise-section {
|
814 |
+
margin: 25px 0;
|
815 |
+
padding: 24px;
|
816 |
+
background-color: #f8f9fb;
|
817 |
+
border-radius: 12px;
|
818 |
+
border: 1px solid #e1e4e8;
|
819 |
+
}
|
820 |
+
|
821 |
+
.noise-info {
|
822 |
+
background-color: white;
|
823 |
+
padding: 24px;
|
824 |
+
border-radius: 8px;
|
825 |
+
margin: 15px 0;
|
826 |
+
border: 1px solid #e1e4e8;
|
827 |
+
}
|
828 |
+
|
829 |
+
.noise-details {
|
830 |
+
font-size: 1.1rem;
|
831 |
+
line-height: 1.6;
|
832 |
+
}
|
833 |
+
|
834 |
+
.noise-level {
|
835 |
+
margin-bottom: 20px;
|
836 |
+
padding: 10px 15px;
|
837 |
+
background: #f8f9fa;
|
838 |
+
border-radius: 6px;
|
839 |
+
font-weight: 500;
|
840 |
+
}
|
841 |
+
|
842 |
+
.noise-level-block {
|
843 |
+
background: #f8f9fa;
|
844 |
+
padding: 12px 16px;
|
845 |
+
border-radius: 6px;
|
846 |
+
margin: 16px 0;
|
847 |
+
}
|
848 |
+
|
849 |
+
.noise-notes {
|
850 |
+
font-family: inherit;
|
851 |
+
white-space: pre-wrap;
|
852 |
+
margin: 15px 0;
|
853 |
+
padding: 0;
|
854 |
+
background: transparent;
|
855 |
+
border: none;
|
856 |
+
font-size: 1.1rem;
|
857 |
+
line-height: 1.6;
|
858 |
+
color: #333;
|
859 |
+
}
|
860 |
+
|
861 |
+
.characteristics-block, .health-considerations, .health-screenings {
|
862 |
+
margin-bottom: 24px;
|
863 |
+
}
|
864 |
+
|
865 |
+
.characteristics-block h4, .health-considerations h4, .health-screenings h4 {
|
866 |
+
color: #2c3e50;
|
867 |
+
font-size: 1.1em;
|
868 |
+
font-weight: 600;
|
869 |
+
margin-bottom: 12px;
|
870 |
+
}
|
871 |
+
|
872 |
+
.noise-details ul, .health-details ul {
|
873 |
+
list-style: none;
|
874 |
+
padding-left: 0;
|
875 |
+
margin: 0 0 20px 0;
|
876 |
+
}
|
877 |
+
|
878 |
+
.noise-details li, .health-details li {
|
879 |
+
padding-left: 20px;
|
880 |
+
position: relative;
|
881 |
+
margin-bottom: 10px;
|
882 |
+
line-height: 1.5;
|
883 |
+
}
|
884 |
+
|
885 |
+
.noise-details li:before, .health-details li:before {
|
886 |
+
content: "•";
|
887 |
+
position: absolute;
|
888 |
+
left: 0;
|
889 |
+
color: #666;
|
890 |
+
}
|
891 |
+
|
892 |
+
"""
|