MCPcopy
hub / github.com/modelscope/FunASR / load_file

Function load_file

fun_text_processing/text_normalization/data_loader_utils.py:243–256  ·  view source on GitHub ↗

Loads given text file with separate lines into list of string. Args: file_path: file path Returns: flat list of string

(file_path: str)

Source from the content-addressed store, hash-verified

241
242
243def load_file(file_path: str) -> List[str]:
244 """
245 Loads given text file with separate lines into list of string.
246
247 Args:
248 file_path: file path
249
250 Returns: flat list of string
251 """
252 res = []
253 with open(file_path, "r") as fp:
254 for line in fp:
255 res.append(line)
256 return res
257
258
259def write_file(file_path: str, data: List[str]):

Callers 2

normalize.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…