Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
:helicopter: 保险行业语料库,聊天机器人
| Date | Stars |
|---|---|
| 2026-07-24 | 1062 |
| 2026-07-25 | 1062 |
| 2026-07-28 | 1062 |
| 2026-07-30 | 1062 |
| 2026-08-06 | 1062 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
[](https://pypi.python.org/pypi/insuranceqa_data) [](https://pypi.python.org/pypi/insuranceqa_data/) [](https://pypi.org/pypi/insuranceqa_data/) [](https://pypi.python.org/pypi/insuranceqa_data/) [](https://www.cskefu.com/licenses/v1.html "开源许可协议") [](https://pypi.org/pypi/insuranceqa_data/)
# 保险行业语料库
该语料库包含从网站[Insurance Library](http://www.insurancelibrary.com/) 收集的问题和答案。
据我们所知,本数据集发布之时,2017 年,这是保险领域首个开放的QA语料库:
* 该语料库的内容由现实世界的用户提出,高质量的答案由具有深度领域知识的专业人士提供。 所以这是一个具有真正价值的语料,而不是玩具。
* 在上述论文中,语料库用于答复选择任务。 另一方面,这种语料库的其他用法也是可能的。 例如,通过阅读理解答案,观察学习等自主学习,使系统能够最终拿出自己的看不见的问题的答案。
* 数据集分为两个部分“问答语料”和“问答对语料”。问答语料是从原始英文数据翻译过来,未经其他处理的。问答对语料是基于问答语料,又做了分词和去标去停,添加label。所以,"问答对语料"可以直接对接机器学习任务。如果对于数据格式不满意或者对分词效果不满意,可以直接对"问答语料"使用其他方法进行处理,获得可以用于训练模型的数据。
## 安装使用
### 1/3 依赖
* Python: 2.x, 3.x
* Pip
### 2/3 安装脚本包
```
pip install -U insuranceqa_data
```
### 3/3 安装语料包
进入[证书商店](https://store.chatopera.com/product/insqa001),购买证书,购买后进入【证书-详情】,点击【复制证书标识】。

然后,通过以下两种形式完成下载。
* 方式1:Python 源代码
```python
import os
# 设置证书标识,购买自 https://store.chatopera.com/product/insqa001
os.environ["INSQA_DL_LICENSE"] = "YOUR_LICENSE" #
_licenseid = os.environ.get("INSQA_DL_LICENSE", None)
print("INSQA_DL_LICENSE=%s" % _licenseid)
# 初次下载数据
import insuranceqa_data
insuranceqa_data.download_corpus()
```
将上面 `YOUR_LICENSE` 修改为您的 证书标识!!!然后执行这段 Python 脚本,比如将上述脚本保存为 `download.py`,然后执行:
```bash
python download.py
```
* 方式2:设置环境变量
设置环境变量 `INSQA_DL_LICENSE`,比如使用命令行终端:
```bash
# Linux / macOS
export INSQA_DL_LICENSE=YOUR_LICENSE
## e.g. if your license id is `FOOBAR`, run `export INSQA_DL_LICENSE=FOOBAR`
# Windows
## 1/2 Command Prompt
set INSQA_DL_LICENSE=YOUR_LICENSE
## 2/2 PowerShell
$env:INSQA_DL_LICENSE='YOUR_LICENSE'
```
最后,执行以下命令,完成数据的下载。
```bash
python -c "import insuranceqa_data; insuranceqa_data.download_corpus()"
```
## 数据格式说明
```python
# 读取数据测试
train_data = insuranceqa_data.load_pool_train() # 训练集
test_data = insuranceqa_data.load_pool_test() # 测试集
valid_data = insuranceqa_data.load_pool_valid() # 验证集
answers_data = insuranceqa_data.load_pool_answers()
# 打印 训练集 数据;测试集和验证集与 训练集 数据结构一致
for x in train_data: # 打印数据
print('\n\nIndex %s \n question: %s' % \
(x, train_data[x]['zh']))
print(" answer: ")
idx = 0
for y in train_data[x]['answers']:
idx += 1
print(" %d. %s" % (idx, answers_data[y]["zh"]))
```

数据格式的详细介绍见下。
#### 数据设计
| - | 问题 | 答案 | 词汇(英语) |
| ------------- |-------------| ----- | ----- |
| 训练 | 12,889 | 21,325 | 107,889 |
| 验证 | 2,000 | 3354 | 16,931 |
| 测试 | 2,000 | 3308 | 16,815 |
每条数据包括问题的中文,英文,答案的正例,答案的负例。案的正例至少1项,基本上在*1-5*条,都是正确答案。答案的负例有*200*条,负例根据问题使用检索的方式建立,所以和问题是相关的,但却不是正确答案。
```
{
"INDEX": {
"zh": "中文",
"en": "英文",
"domain": "保险种类",
"answers": [""] # 答案正例列表
"negatives": [""] # 答案负例列表
},
more ...
}
```
* 训练:```corpus/pool/train.json.gz```
* 验证:```corpus/pool/valid.json.gz```
* 测试:```corpus/pool/test.json.gz```
* 答案:```corpus/pool/answers.json```
一共有 27,413 个回答,数据格式为 ```json```:
```
{
"INDEX": {
"zh": "中文",
"en": "英文"
},
more ...
}
```
## 机器学习项目
可将本语料库和以下开源码配合使用
[deep-qa-1](https://github.com/chatopera/insuranceqa-corpus-zh/tree/release/deep_qa_1): Baseline model
[InsuranceQA TensorFlow](https://github.com/l11x0m7/InsuranceQA_zh): CNN with TensorFlow
[n-grams-get-started](hExcerpt of 4,918 characters
Read on GitHubHai Liang W. · China
9
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:041a02188a987beb, topic:dataset, topic:corpus, name:corpus