MCPcopy Index your code
hub / github.com/KnowledgeXLab/LeanRAG / remove_non_alpha

Function remove_non_alpha

tools/tools.py:49–52  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

47 return re.sub(r"[\(\(][^\)\)]*[\)\)]", "", line)
48
49 def remove_non_alpha(string):
50 # 使用正则表达式删除首尾非字母字符
51 cleaned_string = re.sub(r'^[^a-zA-Z]+|[^a-zA-Z]+$', '', string)
52 return cleaned_string
53
54 # 确保输入文件存在
55 if not os.path.exists(input_file):

Callers 1

remove_text_in_bracketsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected