ipfs_azerbaijan_laws_ir
收藏资源简介:
该数据集是阿塞拜疆法律的信息检索(IR)数据集,采用CID-keyed稀疏GraphRAG格式,基于endomorphosis/ipfs_azerbaijan_laws的快照打包而成。数据集包含多个组件:语料库(2262条法律条文)、BM25索引(14259个词条、287910条倒排记录)、向量嵌入(2262个384维向量,使用thenlper/gte-small模型)、属性图结构(2711个节点、30866条边)。数据字段包括entry_cid、law_cid、record_type、jurisdiction、language、instrument_id、instrument_title、article_number、article_title、title、body、source_url、snapshot_date、coverage、license、collector、source_dataset、source_revision等。图结构支持基于BM25的邻居关系、文章-法律隶属关系以及标识符关联。数据集主要用于法律文本检索、GraphRAG研究和语义搜索,但请注意:该数据集仅为研究快照,不构成法律建议,引用时应以阿塞拜疆官方公报为准。
This dataset is an information retrieval (IR) dataset for Azerbaijani laws, formatted as CID-keyed sparse GraphRAG, packaged from a snapshot of endomorphosis/ipfs_azerbaijan_laws. It contains multiple components: a corpus (2262 legal articles), a BM25 index (14259 terms, 287910 postings), vector embeddings (2262 384-dimensional vectors using the thenlper/gte-small model), and a property graph structure (2711 nodes, 30866 edges). Data fields include entry_cid, law_cid, record_type, jurisdiction, language, instrument_id, instrument_title, article_number, article_title, title, body, source_url, snapshot_date, coverage, license, collector, source_dataset, source_revision, etc. The graph structure supports BM25-based neighbor relationships, article-law affiliations, and identifier associations. The dataset is primarily intended for legal text retrieval, GraphRAG research, and semantic search. Note: this dataset is a research snapshot only and does not constitute legal advice; citations should refer to the official gazette of Azerbaijan.
数据集概述
数据集名称:Azerbaijan legislation IR (CID-keyed sparse GraphRAG)
数据集标识:country-laws-ir-graphrag/v1,布局族为 skillcenter-huggingface-release/v3 / publicus-ir。
主要用途:面向阿塞拜疆法律文献的信息检索(IR)研究数据集,可用于 BM25 稀疏检索、向量稠密检索和基于图的检索(GraphRAG)等任务。
数据集性质:
- 研究快照,非官方法律文本,不构成法律建议。
- 基于
endomorphosis/ipfs_azerbaijan_laws(revision543d3aea2e9d2765ece99497210267f156f99636)打包。 - 官方公报/权威来源优先于本语料库,检索结果仅作为证据。
数据统计
| 项目 | 数量 |
|---|---|
| 法律(语料单元) | 0 |
| 条款(语料单元) | 2262 |
| 规范文档数 | 2262 |
| BM25 词项数 | 14259 |
| BM25 倒排记录数 | 287910 |
| 图节点数 | 2711 |
| 图边数 | 30866 |
| 向量条数 | 2262 × 384 维(thenlper/gte-small 嵌入) |
数据结构
主键:entry_cid(基于规范身份记录的 CIDv1 原始 SHA2-256)。document_index 仅作为紧凑分片指针,不是身份标识。
规范字段:
entry_cid、law_cid、record_type、jurisdiction、language、instrument_id、instrument_title、article_number、article_title、title、body、source_url、snapshot_date、coverage、license、collector、source_dataset、source_revision。
单元策略:优先条款/章节行;若 articles.parquet 为空则回退到法律级。
索引与配置布局
所有数据以 Zstandard 压缩的 Parquet 分片存储,每片最多 4096 行。
- BM25 配置:Okapi k1=1.2,b=0.75,标题权重=5,正文权重=1(FTS5 unicode61 风格分词器)。
- 图结构:每个
entry_cid一个节点,外加方面节点(按法域、语言、法律文书、来源、状态生成)。相邻边BM25_NEIGHBOR_OF(k=8)携带分数和匹配词项。结构边包括ARTICLE_OF(条款→父法律),以及仅在源中存在时的IDENTIFIED_BY_ELI/IDENTIFIED_BY。
数据文件配置:
corpus— 数据主体(条款/法律原始内容)bm25_documents— BM25 文档数据bm25_postings— BM25 倒排记录数据bm25_keyword_index— 词汇词项范围 → BM25 分片映射vectors— 向量嵌入数据vector_meta_index— 语义路由质心(按与分片质心的余弦相似度排序)graph_nodes、graph_edges— 属性图数据graph_outgoing_adjacency/graph_incoming_adjacency— 按分数排序的邻居页数据
查询方式
支持三种查询途径:
- BM25 查询:命令行示例
python scripts/query_country_laws_hf.py --local-dir . bm25 "constitution" --top-k 10 - 向量查询:命令行示例
python scripts/query_country_laws_hf.py --local-dir . vector "money laundering" --top-k 10 - 图查询:命令行示例
python scripts/query_country_laws_hf.py --local-dir . graph neighbors <entry_cid>
来源与许可
- 由 country-laws-ir 打包,上游采集方和官方许可证归属
endomorphosis/ipfs_azerbaijan_laws。 - CIDs 标识本地内容,不证明公共 IPFS 固定。




