MCPcopy Create free account
hub / github.com/Yuan-Li-FNLP/R3-RAG / process

Function process

benchmark/batch_check/batch_check.py:49–59  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

47 return args, data, llm
48
49def process(text):
50 # lower case
51 text = text.lower()
52 # remove_articles
53 text = re.sub(r"\b(a|an|the)\b", " ", text)
54 # unify white space
55 text = " ".join(text.split())
56 # remove punctuation
57 exclude = set(string.punctuation)
58 text = "".join(ch for ch in text if ch not in exclude)
59 return text
60def check_prompt(question, output, standard_answers):
61 standard_answers_formatted = "\n".join([f"- {ans}\n" for ans in standard_answers])
62 return f"""

Callers 2

solve_coreFunction · 0.70
get_emFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected