Automatic generate QA from slides and grade marker/memo.
Project description
AutoTA
提供BookRoll中的Marker/Memo評分功能,以及教材推薦功能
準備
以下四個服務需要先以docker在本地端或遠端建立
- Question generation service(問題生成才要)
- BERT pre-trained model service
- BERT fine-tuned model service(簡答題評分才要)
- Google cloud translation service(問題生成才要)
安裝
pip install autota
使用
獲取Marker/Memo分數
from autota.grader import Grader
grader = Grader(pdf_path='./test.pdf',
bert_api_port=PRETRAINED_BERT_SERVICE_PORT,
bert_api_url='PRETRAINED_BERT_SERVICE_HOST')
print(grader.grade_marker('marker text')) #得到單一marker分數
print(grader.grade_memo('memo text')) #得到單一memo分數
獲取教材推薦頁數
from autota.recommender import Recommender
#num_page指定要推薦多少頁
recommender = Recommender(pdf_path='./test.pdf', num_page=2,
api_port=PRETRAINED_BERT_SERVICE_PORT,
api_url='PRETRAINED_BERT_SERVICE_HOST')
print(recommender.guiding_from(ta_ans='要推薦的概念'))
#輸出為[(2, 0.0778473040773201), (1, 0.08752984923065377)]
#tuple第一項元素即為頁數,第二項為該頁與ta_ans概念間的餘弦距離
開發中
- 簡答題自動評分
- 從教材自動生成問題
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
autota-0.0.2-py3-none-any.whl
(8.2 kB
view hashes)