KrisTHL181 commited on
Commit
03e73ed
·
verified ·
1 Parent(s): c74a30c

Upload folder using huggingface_hub

Browse files
meta/authors.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0931f51b198ef7bb224b6722a2b83d229238db73aa8508d120006e1ac3730a6c
3
+ size 39464858
meta/discovery_edges.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9bee4d2c871f345ac106c8ef277ccb787a51ace06a28481f40b72f5df311525
3
+ size 45878106
meta/questions.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:670cff8d5842b69ac9c94fa06cf82238479952020e86aa37944a5480dbd99b39
3
+ size 413135490
meta/schema.sql ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -- 知乎问答语料(Zhihu QA)配套数据库结构
2
+ --
3
+ -- 语料本体在 shards/2026-10/*.jsonl.zst,每条答案一行,字段见 README「字段说明」。
4
+ -- 本文件是采集时所用 SQLite 库的结构;随数据集发布的对应物是:
5
+ --
6
+ -- meta/questions.jsonl.zst questions 表
7
+ -- meta/authors.jsonl.zst authors 表
8
+ -- meta/discovery_edges.jsonl.zst discovery_edges 表
9
+ --
10
+ -- answers 表**没有**单独发布:它的每一行都已在分片里(id 相同),
11
+ -- file + offset 给出该答案在分片未压缩 JSONL 流中的字节位置,
12
+ -- 可以用来做随机访问而不必解压整个分片。
13
+
14
+ PRAGMA journal_mode = WAL;
15
+ PRAGMA user_version = 1;
16
+
17
+ -- 答案索引。与分片记录一一对应,只缺 content / v / format / saved_at 四项
18
+ --(正文在分片里,saved_at 属于采集过程信息,未发布)。
19
+ CREATE TABLE answers (
20
+ id TEXT PRIMARY KEY, -- 答案 ID
21
+ question_id TEXT, -- 所属问题 ID;56 条为空串(答案已删)
22
+ question_title TEXT, -- 问题标题快照;同上 56 条为 "untitled"
23
+ author_token TEXT, -- 答主 URL token;匿名用户为空串
24
+ author_name TEXT, -- 答主昵称快照
25
+ vote INTEGER,
26
+ favorite INTEGER, -- 答主接口不返回时为 NULL(占 10.3%)
27
+ thanks INTEGER,
28
+ comment INTEGER,
29
+ created_time INTEGER, -- Unix 秒
30
+ chars INTEGER, -- 去空白后的正文字符数
31
+ url TEXT, -- https://www.zhihu.com/question/{qid}/answer/{aid}
32
+ file TEXT, -- 所在分片文件名,如 part-000042.jsonl.zst
33
+ source TEXT, -- 首次发现路径:question | author
34
+ "offset" INTEGER -- 在未压缩 JSONL 流中的行首字节偏移
35
+ );
36
+
37
+ -- 问题元数据。1,484,695 个问题被答案引用,本表还包含采集到但无入库答案的问题。
38
+ CREATE TABLE questions (
39
+ id TEXT PRIMARY KEY,
40
+ title TEXT,
41
+ created_time INTEGER, -- Unix 秒;6,701 条问题已删或无效,为 NULL
42
+ description TEXT -- 问题补充说明,可能为 NULL
43
+ );
44
+
45
+ -- 答主元数据。totals 是采集时刻的公开回答总数。
46
+ CREATE TABLE authors (
47
+ url_token TEXT PRIMARY KEY,
48
+ name TEXT,
49
+ totals INTEGER
50
+ );
51
+
52
+ -- 发现图:每个节点只有一条入边,记录它是从哪个父节点被发现的。
53
+ -- child_type/parent_type ∈ {author, question, seed, feed, hot}
54
+ -- author/question → 该节点的 ID
55
+ -- seed → 种子来源标识
56
+ -- feed / hot → 推荐流或热榜
57
+ -- parent_id 只在 parent_type 为 author/question 时指向具体节点。
58
+ CREATE TABLE discovery_edges (
59
+ child_type TEXT NOT NULL,
60
+ child_id TEXT NOT NULL,
61
+ parent_type TEXT NOT NULL,
62
+ parent_id TEXT,
63
+ PRIMARY KEY (child_type, child_id)
64
+ ) WITHOUT ROWID;
65
+
66
+ CREATE INDEX idx_answers_q ON answers(question_id);
67
+ CREATE INDEX idx_answers_a ON answers(author_token);
68
+ CREATE INDEX idx_edges_parent ON discovery_edges(parent_type, parent_id);