|
|
|
@ -627,11 +627,10 @@ def insert_link_naturally(summary, source_name, source_url): |
|
|
|
logging.warning("No paragraph with multiple sentences found, using fallback.") |
|
|
|
logging.warning("No paragraph with multiple sentences found, using fallback.") |
|
|
|
return append_link_as_fallback(summary, source_name, source_url) |
|
|
|
return append_link_as_fallback(summary, source_name, source_url) |
|
|
|
|
|
|
|
|
|
|
|
# Alternative phrases for variety |
|
|
|
# Alternative phrases for variety (removed 'notes that' for natural flow) |
|
|
|
link_phrases = [ |
|
|
|
link_phrases = [ |
|
|
|
"according to {source}", |
|
|
|
"according to {source}", |
|
|
|
"as reported by {source}", |
|
|
|
"as reported by {source}" |
|
|
|
"{source} notes that" |
|
|
|
|
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
best_candidate = None |
|
|
|
best_candidate = None |
|
|
|
|