I've been asked to finish work on this function that splits sentences into a list. Unfortunately, I've been specifically told to use regex for this, with extra requirements explained in the function's docstring. Regex is a pain in the butt at the best of times - could you complete this code for me? Everything you need should be inside the snippet.
importredefsplitSentences(sentences):
"""
Splitsastringofsentencesintoalist.Eachsentenceisperiod-separated,saveforcaseswherethephrases "Mr." or "Ms." areused,sincethosedon'tendasentence.
"""
sentenceList=[]sentenceEnders=r'(?<!Mr)\.(?<![A-Z][a-z]\.)(?<![A-Z][a-z][a-z]\.)(?<=\.|\?)\s'
sentenceList=re.split(sentenceEnders,sentences)returnsentenceList
TLDR: The code splits a string into a list of sentences using regex. The regex was corrected to accurately identify sentence endings while excluding abbreviations like "Mr." and "Ms.".
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-10-17。"],[],[]]