# python-LDA
Ref: `https://github.com/a55509432/python-LDA`
the model applies `Sampling` function by Python language.
---
* If you found the result is 0 by Python2.7, it may be a bug to be fixed.
---
### Dada format
#### Train data format
`train.dat` after segment word, the format like following:(one line one document)
>1. 康小姐 寮步镇 莞樟路 石井 附近 嘉湖山庄 小区 连续 半夜 停电 已有 居民 咨询 供电公司 小区 电路 正常 咨询 小区 管理处 工作人员 线路 借口 推托<br>
>2. 许小姐 来电反映 寮步镇 莞樟路 汽车东站 附近 嘉湖山庄 小区 最近 一周 都 从 凌晨 3点 早上 8点 停电 昨晚 凌晨 来电 都 没 通电 已有 居民 致电 供电公司 答复 说 该 小区 电路 正常 小区 故意 停电 <br>
>3. 虎门 百佳商场 楼下 乘坐 出租车 虎门 电子城 车牌 粤SLE857 司机 要求 不 打表 需要 20元 要求 打表 司机 拒载<br>
>4. 东城中心 乘坐 粤SM643M 东城 主山高田坊芳桂园 平时 行驶 路线 是 东城 中路 今天 司机 行驶 路线 是 东城大道 东纵大道 温南路 此 车 到了 温南路口车费 是 16元 认为 司机 绕路<br>
#### Output data format
> `model_parameter.dat` the params of the model
> `wordidmap.dat` the relation between word and id
> `model_twords.dat` topN words of every classification
> `model_tassgin.dat` the result of words which belong to someone classification
> `model_theta.dat` the possibility of documents which belong to all classifications
> `model_phi.dat` the possibility of words which belong to all classifications
---
### How to run
1. `prepare_lda_data.py`
修改其中的train文件位置
- modify the location of train data
- update the params of lda and modify the output data of path in `setting.conf`
2. `lda.py`
cd data/lda.py
python lda.py
3. `retreat_lda_data.py`
- modify the path of dim, model and train data files
- `prepare_lda_data.py` may be skip some wrong data.
- default value is 0.01 in `retreat_lda_data.py`
---
没有合适的资源?快使用搜索试试~ 我知道了~
2017 NLPCC DBQA Model (NLPCC比赛).zip
共117个文件
py:83个
md:13个
dat:7个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 79 浏览量
2023-09-30
14:33:58
上传
评论
收藏 64.73MB ZIP 举报
温馨提示
比赛项目代码
资源推荐
资源详情
资源评论
收起资源包目录
2017 NLPCC DBQA Model (NLPCC比赛).zip (117个子文件)
info.log.2015-08-06 0B
ccir-result 3.1MB
logging.conf 1KB
setting.conf 385B
cnn.conf 193B
model_phi.dat 10KB
train.dat 2KB
wordidmap.dat 2KB
model_tassign.dat 2KB
model_twords.dat 2KB
model_theta.dat 537B
model_parameter.dat 104B
.gitignore 285B
README.md 2KB
readme.md 1KB
README.md 769B
readme.md 765B
readme.md 571B
READE.md 414B
readme.md 253B
readme.md 253B
readme.md 244B
README.md 196B
readme.md 162B
readme.md 62B
readme.md 26B
json.testset.new 45.95MB
train.1.json.new 1.4MB
structure.PNG 125KB
loss and acc .PNG 124KB
qa_lstm.py 23KB
qa_cnn_new_embedding_lda.py 23KB
qa_lstm.py 23KB
qa_cnn_new_embedding.py 22KB
qa_cnn_base.py 22KB
qa_cnn_for_real_test.py 20KB
qa_cnn.py 19KB
qa_cnn_base_for_real_test.py 19KB
cnn_att.py 12KB
cnn.py 10KB
prepare_random_data.py 9KB
lda.py 9KB
prepare_data.py 8KB
cnn_pos_att.py 8KB
train1.py 7KB
model.py 7KB
prepare_expanded_URL_train_test_data.py 7KB
cnn_pos.py 7KB
svm.py 6KB
cnn_att.py 6KB
emb_data.py 6KB
svm.py 6KB
prepare_train_data_for_real_test.py 5KB
prepare_train_data_for_real_test.py 5KB
cnn.py 5KB
prepare_test_data_for_real_test.py 5KB
expand_raw_data.py 4KB
prepare_train_test_data.py 4KB
data_helper.py 4KB
expand_raw_data.py 4KB
train_w2v.py 4KB
word_segment.py 3KB
analysis.py 3KB
embedding.py 3KB
draw_nlpcc_log.py 3KB
expand_tfidf_for_real_test.py 3KB
expand_tfidf.py 3KB
expand_tfidf.py 3KB
train_w2v.py 3KB
analysis.py 3KB
prepare_train_data.py 3KB
expand_tfidf.py 3KB
prepare_train_lda_data.py 3KB
prepare_train_data.py 3KB
prepare_train_data.py 2KB
retreat_lda_data.py 2KB
prepare_test_lda_data.py 2KB
check.py 2KB
check.py 2KB
prepare_test_data.py 2KB
prepare_test_data_for_real_test.py 2KB
seg_data.py 2KB
basic_cnn.py 1KB
prepare_lda_data.py 1KB
LCS.py 1KB
IDF.py 1004B
utils.py 977B
crawlUrl.py 836B
test1.py 708B
Query.py 605B
Passage.py 602B
normalWordList.py 560B
logUtil.py 347B
test2.py 211B
timeUtil.py 130B
__init__.py 55B
__init__.py 20B
__init__.py 20B
__init__.py 20B
__init__.py 20B
共 117 条
- 1
- 2
资源评论
学术菜鸟小晨
- 粉丝: 1w+
- 资源: 4960
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功