Downloads · 30 days
26
1% of all-time downloads
Thammarak/wangchanBERTa-QA-thaiqa_squad
wangchanBERTa-QA-thaiqa_squad is a question answering model from Thammarak. Use it when the input is a question plus a passage. It is set up for transformers.
Pretraining Model: wangchanberta-base-att-spm-uncased.
Downloads · 30 days
26
1% of all-time downloads
All-time downloads
3.1K
Public
Repo size
838 MB
Likes
5
Public
Click a slice to open those files.
.bin419 MB · 99%
From the Hugging Face model README
Pretraining Model: wangchanberta-base-att-spm-uncased.
This is the wangchanberta-base-att-spm-uncased model, fine-tuned using the thaiqa_squad dataset.
https://github.com/tommyA8/wangchanBERTa-fined-tune-thaiqa_squad
Remove HTML tags using BeautifulSoup and remove punctuation using string.punctuation.
from bs4 import BeautifulSoup
example = """<doc id="376583" url="https://th.wikipedia.org/wiki?curid=376583" title="ลูนา 1">
ลูนา 1 ลูนา 1 (อี-1 ซีรีส์) ซึ่งในขณะนั้นรู้จักกันในชื่อ เมชตา (; "ความฝัน") เป็นยานอวกาศลำแรกที่เดินทางไปถึงบริเวณใกล้เคียงของดวงจันทร์
และเป็นยานอวกาศลำแรกในโครงการลูนาของโซเวียตที่สามารถปล่อยขึ้นไปในทิศทางเดียวกับดวงจันทร์ได้สำเร็จ</doc>"""
example = BeautifulSoup(example).get_text()
print(example)
#"ลูนา 1 ลูนา 1 (อี-1 ซีรีส์) ซึ่งในขณะนั้นรู้จักกันในชื่อ เมชตา (; "ความฝัน") เป็นยานอวกาศลำแรกที่เดินทางไปถึงบริเวณใกล้เคียงของดวงจันทร์และเป็นยานอวกาศลำแรกในโครงการลูนาของโซเวียตที่สามารถปล่อยขึ้นไปในทิศทางเดียวกับดวงจันทร์ได้สำเร็จ"
import string
punct = string.punctuation
no_punct = [char for char in example if char not in punct]
example = ''.join(no_punct)
print(example)
#"ลูนา 1 ลูนา 1 อี1 ซีรีส์ ซึ่งในขณะนั้นรู้จักกันในชื่อ เมชตา ความฝัน เป็นยานอวกาศลำแรกที่เดินทางไปถึงบริเวณใกล้เคียงของดวงจันทร์ และเป็นยานอวกาศลำแรกในโครงการลูนาของโซเวียตที่สามารถปล่อยขึ้นไปในทิศทางเดียวกับดวงจันทร์ได้สำเร็จ"