Comments (14)
qa_corpus.json
`import numpy as np
from tqdm import tqdm
import pandas as pd
def build_qa_corpus():
source_path = "/home/lc/Python/recommendersystem/rasa_resource/CrimeKgAssitant/data/qa_corpus.json"
json = pd.read_json(source_path, lines=True)
print(json.shape)
print(json.info())
json.head()
label_dict = {
"婚姻家庭": 0,
"劳动纠纷": 1,
"交通事故": 2,
"债权债务": 3,
"刑事辩护": 4,
"合同纠纷": 5,
"房产纠纷": 6,
"侵权": 7,
"公司法": 8,
"医疗纠纷": 9,
"拆迁安置": 10,
"行政诉讼": 11,
"建设工程": 12
}
content_path = "/home/lc/Python/recommendersystem/rasa_resource/CrimeKgAssitant/data/question_train.txt"
file = open(content_path, "w")
for i in tqdm(range(len(json))):
question = json.iloc[i]['question']
category = json.iloc[i]['category']
file.write(question.strip() + "\t" + str(label_dict[category.strip()]))
file.write("\n")
file.close()
if name == 'main':
build_qa_corpus()`
from crimekgassitant.
cur = '/'.join(os.path.abspath(file).split('/')[:-1])
self.train_file = os.path.join(cur, 'question_train.txt')
就是这个文件找不到
同问
from crimekgassitant.
cur = '/'.join(os.path.abspath(file).split('/')[:-1])
self.train_file = os.path.join(cur, 'question_train.txt')
就是这个文件找不到同问
连长什么样子都不知道
from crimekgassitant.
从数据处理那里就可以看到数据格式啊,很明显就是文本对应标签
from crimekgassitant.
从数据处理那里就可以看到数据格式啊,很明显就是文本对应标签
连蒙带猜的已经解决了,从json文件读取数据猜写进去的格式弄好了
from crimekgassitant.
从数据处理那里就可以看到数据格式啊,很明显就是文本对应标签
连蒙带猜的已经解决了,从json文件读取数据猜写进去的格式弄好了
@ForgetThatNight 请问您可以分享处理json文件的代码吗?
from crimekgassitant.
从数据处理那里就可以看到数据格式啊,很明显就是文本对应标签
连蒙带猜的已经解决了,从json文件读取数据猜写进去的格式弄好了
+1,请问是从qa_corpus.json读取吗,求代码好人一生平安
from crimekgassitant.
有数据了吗
from crimekgassitant.
有数据了吗
兄弟,你拿到那个文件的数据了吗?
from crimekgassitant.
from crimekgassitant.
没有。。
…
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年9月12日(星期一) 下午3:46 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [liuhuanyong/CrimeKgAssitant] 请问能告诉下 question_train.txt是怎么来的吗?思路也行 (#11) 有数据了吗 兄弟,你拿到那个文件的数据了吗? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
这个项目你怎么用的,我看训练的过程里面,缺挺多txt文件的。
from crimekgassitant.
from crimekgassitant.
我只用了加权打分的那个TXT(之前评论里面作者发出来了),其他要的我都没有抓数据
…
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年9月12日(星期一) 下午5:16 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [liuhuanyong/CrimeKgAssitant] 请问能告诉下 question_train.txt是怎么来的吗?思路也行 (#11) 没有。。 … ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年9月12日(星期一) 下午3:46 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [liuhuanyong/CrimeKgAssitant] 请问能告诉下 question_train.txt是怎么来的吗?思路也行 (#11) 有数据了吗 兄弟,你拿到那个文件的数据了吗? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> 这个项目你怎么用的,我看训练的过程里面,缺挺多txt文件的。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>
可以加你一个联系吗?我是小白,不是很懂,我感觉少了挺多txt。
from crimekgassitant.
from crimekgassitant.
Related Issues (18)
- word_vec_300.bin这个哪里能拿到啊 HOT 4
- 法务咨询问题分类的分类数据集能分享一下吗
- 贴一个相关的数据集 HOT 1
- 知识图谱的内容没了吗
- 知识图谱构建没有
- 请问能否提供项目环境具体的requirement
- ..
- embedding/word_vec_300.bin
- 如何获得qa_corpus的标准答案?
- 你好,能提供一下 crime_classify 用的语料么? HOT 4
- 执行法务咨询自动问答时报错 HOT 5
- 词向量 HOT 2
- 请教词向量训练的有关问题 HOT 3
- 罪名分类的TXT训练集可以共享一下么。谢谢 HOT 6
- word2Vec HOT 2
- build_qa_database.py插数的时候有个小问题
- 请问本项目用什么开源协议,是否允许别人商用
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crimekgassitant.