generate titles from microblog posts - sentences with a ? need it added back on

This commit is contained in:
rimu 2024-05-01 21:02:25 +12:00
parent f111b50041
commit e2e20c76a0

View file

@ -263,6 +263,8 @@ def microblog_content_to_title(html: str) -> str:
question_index if question_index != -1 else float('inf'))
if end_index != -1:
if question_index != -1:
end_index += 1 # Add the ? back on
title = title[:end_index]
if len(title) > 150: