MCPcopy Create free account
hub / github.com/TIGER-AI-Lab/LongRAG / load_dpr_wiki

Function load_dpr_wiki

utils/load_data_util.py:17–28  ·  view source on GitHub ↗
(file_path)

Source from the content-addressed store, hash-verified

15
16
17def load_dpr_wiki(file_path):
18 title_set = set()
19
20 with open(file_path, 'r', encoding='utf-8') as tsvfile:
21 reader = csv.reader(tsvfile, delimiter='\t')
22 headers = next(reader) # Get the header row
23
24 for row in tqdm(reader, desc="Loading TSV", unit=" rows"):
25 # row: id text title
26 title_set.add(_normalize(row[2]))
27
28 return title_set
29
30
31def load_tsv_file(file_path):

Callers 1

Calls 1

_normalizeFunction · 0.90

Tested by

no test coverage detected