环境要求
| 依赖关系 | 版本要求 |
|---|---|
| Python | ≥3.9 |
| Node.js | ≥22.x |
| 微软Visual Studio C++ |
安装依赖
pnpm install
pnpm run installRuntime
# if got err: No module named 'distutils'
pip install setuptools
#BM25所用库
pip install jieba nltk pandas json5 matplotlib fastapi uvicorn pydantic
#Sentence-BERT所用库
pip install sentence-transformers torch fastapi uvicorn开始开发
#启动electon主程序
pnpm run dev
#启动BM25筛选接口
python BM25.py 注意:
BM25api返回格式
{ “结果”:\[ { “id”:“string”, “title”:“string”, “original_abstract”:“string”, “bm25_score”:0, } \], “总人数”:0, “selected_count”:0, “阈值”:0.3 }
Sentence-BERT返回格式
{ “结果”:\[ { “id”:“string”, “title”:“string”, “original_abstract”:“string”, “相似性_核心”:0, } \], “总人数”:0, “selected_count”:0, “阈值”:0 }
