MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / split_string

Method split_string

camel/benchmarks/gaia.py:431–445  ·  view source on GitHub ↗

r"""Split a string based on a list of characters. Args: s (str): The string to split. char_list (Optional[List[str]], optional): T he list of characters to split on. (default: :obj:`None`)

(
        self, s: str, char_list: Optional[List[str]] = None
    )

Source from the content-addressed store, hash-verified

429 return float("inf")
430
431 def split_string(
432 self, s: str, char_list: Optional[List[str]] = None
433 ) -> list[str]:
434 r"""Split a string based on a list of characters.
435
436 Args:
437 s (str): The string to split.
438 char_list (Optional[List[str]], optional): T
439 he list of characters to split on.
440 (default: :obj:`None`)
441 """
442 if char_list is None:
443 char_list = [",", ";"]
444 pattern = f"[{''.join(char_list)}]"
445 return re.split(pattern, s)
446
447 def normalize_str(self, input_str, remove_punct=True) -> str:
448 r"""Normalize a string.

Callers 1

question_scorerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected