https://github.com/aurelius84/aoakeyword
Keywords Extractor by Attention over Attention with POS Mask Matrix.
https://github.com/aurelius84/aoakeyword
Last synced: 5 months ago
JSON representation
Keywords Extractor by Attention over Attention with POS Mask Matrix.
- Host: GitHub
- URL: https://github.com/aurelius84/aoakeyword
- Owner: Aurelius84
- Created: 2018-06-07T10:30:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-08T05:22:57.000Z (over 7 years ago)
- Last Synced: 2025-02-17T06:27:17.785Z (8 months ago)
- Language: Python
- Homepage:
- Size: 66.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### AoAKWExtractor

Keywords Extractor by Attention over Attention with POS Mask Matrix.
### Requirements
+ pytorch
+ tensorboard
+ numpy
+ flask
+ gevent### Train model
```
# install virtualenv
python3 -m venv ENV3.6
# activate env
source ENV3.6/bin/activatepython train.py
# tensorboard log
tensorboard --logdir=/runs --port 8089# open your browser and visit
http://127.0.0.1:8089
```### API
```
# start flask service with gevent in ENV
nohup python service.py &# use Postman (chrome plugin) to visit:
http://127.0.0.1:5000/keywords# if you just want to test, please visit:
http://10.232.22.243:5000/keywords# only support post with form data
# make sure that form data as followed:
{
"title": "This is a title", (required)
"doc": "This is doc string" (required)
}# response data
{
"status": 200,
"data":
{
"pre_kws":{
"keyword1": prob1,
"keyword2": prob2,
"keyword3": prob3
}
}
}
```
### What's Next
+ fine-tune model
+ more corpus to train