|
@@ -524,12 +524,11 @@ def create_pdf_from_articles(articles, output_filename):
|
|
|
elements.append(Paragraph("<b>PIIRANGUD:</b>", normal_style))
|
|
elements.append(Paragraph("<b>PIIRANGUD:</b>", normal_style))
|
|
|
elements.append(Paragraph(context_text, normal_style))
|
|
elements.append(Paragraph(context_text, normal_style))
|
|
|
# Proovi leida relevance_score regex'iga
|
|
# Proovi leida relevance_score regex'iga
|
|
|
- match = re.search(r'"relevance_score":\s*"([^"]*(?:\\"[^"]*)*)"', analysis_text)
|
|
|
|
|
|
|
+ match = re.search(r'"relevance_score":\s*(\d+(?:\.\d+)?)', analysis_text)
|
|
|
if match:
|
|
if match:
|
|
|
context_text = match.group(1)
|
|
context_text = match.group(1)
|
|
|
if context_text:
|
|
if context_text:
|
|
|
- elements.append(Paragraph("<b>RELEVANTSUSE SKOOR:</b>", normal_style))
|
|
|
|
|
- elements.append(Paragraph(context_text, normal_style))
|
|
|
|
|
|
|
+ elements.append(Paragraph("<b>RELEVANTSUSE SKOOR:</b> " + context_text, normal_style))
|
|
|
|
|
|
|
|
# Allikfail ja töötlemise info
|
|
# Allikfail ja töötlemise info
|
|
|
footer_info = []
|
|
footer_info = []
|