MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeText-parser / split_sentences

Function split_sentences

src/codetext/clean/noise_removal.py:33–39  ·  view source on GitHub ↗
(docstring)

Source from the content-addressed store, hash-verified

31
32
33def split_sentences(docstring):
34 # sentences = re.split("(?<![\.])\.(?![\.\w])", docstring)
35
36 sentences = re.split("(?<=.)[\.\!\?](?=\s+)", docstring)
37 sentences = [sentence.strip() for sentence in sentences if sentence.strip() != ""]
38
39 return sentences
40
41
42def split_identifier_into_parts(identifier: str) -> List[str]:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected