Спасибо, Чжи и Йохен Ритцель.
sentence=re.compile("[A-Z].*?[\.!?] ", re.MULTILINE | re.DOTALL )
Я думаю, что это лучше, просто добавьте пробел в конце.
SampleReport='I image from 08/25 through 12. The patient image 1.2, 23, 34, 45 and 64 from serise 34. image look good to have a tumor in this area. It has been resected during the interval between scans. The'
, если использовать
pat = re.compile(r'([A-Z][^\.!?]*[\.!?])', re.M)
pat.findall(SampleReport)
Результат будет:
['I image from 08/25 through 12.',
'The patient image 1.',
'It has been resected during the interval between scans.']
Ошибка в том, что он не может обрабатывать цифры, такие как 1,2.Но этот работает отлично.
sentence.findall(SampleReport)
Результат
['I image from 08/25 through 12. ',
'The patient image 1.2, 23, 34, 45 and 64 from serise 34. ',
'It has been resected during the interval between scans. ']