Skip to main content

AutoTA

提供BookRoll中的Marker/Memo評分功能,以及教材推薦功能

準備

以下四個服務需要先以docker在本地端或遠端建立

  1. Question generation service(問題生成才要)
  2. BERT pre-trained model service
  3. BERT fine-tuned model service(簡答題評分才要)
  4. 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概念間的餘弦距離

從教材自動生成問題

from autota.generator import Generator

#num_page指定要推薦多少頁
generator = Generator(pdf_path='./test.pdf',, 
			translate_api_port=TRANSLATE_SERVICE_PORT, 
			translate_api_url='TRANSLATE_SERVICE_HOST',
			gpt2_api_port=GPT2_SERVICE_PORT,
			gpt2_api_url='GPT2_SERVICE_HOST')

print(generator.get_qa())
#輸出為[('What is the first thing that can be a variable name?', '變數名稱的第一個字不可為數字')]
#list中每個tuple為一組QA pair

開發中

  1. 簡答題自動評分

Metadata

Release files for autota 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autota 0.0.3
File Size Uploaded
autota-0.0.3.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autota 0.0.3
File Interpreter ABI Platform
autota-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 17.0 kB

Release files / autota-0.0.3.tar.gz

Download URL autota-0.0.3.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1431df8ffda349d7a6513b883f5275f66027866f467b695a790ee4b4334abe90
BLAKE2b-256 checksum
How to use checksums
3f15f9c407328677812023d7e44c6dc81214cece5a65efe10d1bc27cbbc99d6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

Release files / autota-0.0.3-py3-none-any.whl

Download URL autota-0.0.3-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0b5d8d7fe4dede6dbb9c92b8957c09a10014bead188bab5922f509a6713d959
BLAKE2b-256 checksum
How to use checksums
a40771820c0796ebe9771a57f3b03bb1739b9cd4b674d7404cf9ac7c97f0e0bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

1 release file

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page