feat: new dataset
This commit is contained in:
parent
d1f94d5918
commit
2e558c0384
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -6,7 +6,7 @@ from keras.models import load_model
|
|||
from keras.preprocessing.sequence import pad_sequences
|
||||
|
||||
|
||||
model = load_model("multi_task_lstm_ner_srl_model.keras")
|
||||
model = load_model("multi_task_lstm_ner_srl_model_tf.keras")
|
||||
|
||||
with open("word2idx.pkl", "rb") as f:
|
||||
word2idx = pickle.load(f)
|
||||
|
|
|
@ -7,6 +7,7 @@ def json_to_tsv(json_path: str | Path, tsv_path: str | Path) -> None:
|
|||
"""
|
||||
Konversi data JSON (field: tokens, ner, srl, …) → TSV token\tNER\tSRL.
|
||||
Kalimat duplikat (urutan tokens persis sama) otomatis dilewati.
|
||||
Jika ada record yang tokens, ner, dan srl tidak sama panjang, akan diberi info error lengkap.
|
||||
"""
|
||||
# ---------------------------------------------------------------------
|
||||
# 1. Baca semua record dari JSON
|
||||
|
@ -22,14 +23,19 @@ def json_to_tsv(json_path: str | Path, tsv_path: str | Path) -> None:
|
|||
with open(tsv_path, "w", encoding="utf-8", newline="") as f_out:
|
||||
writer = csv.writer(f_out, delimiter="\t", lineterminator="\n")
|
||||
|
||||
for rec in records:
|
||||
tokens = rec["tokens"]
|
||||
ner_tags = rec["ner"]
|
||||
srl_tags = rec["srl"]
|
||||
for idx, rec in enumerate(records):
|
||||
tokens = rec.get("tokens")
|
||||
ner_tags = rec.get("ner")
|
||||
srl_tags = rec.get("srl")
|
||||
|
||||
# -- cek panjang sama
|
||||
if not (len(tokens) == len(ner_tags) == len(srl_tags)):
|
||||
raise ValueError("tokens, ner, dan srl harus punya panjang sama")
|
||||
raise ValueError(
|
||||
f"❌ Panjang tidak sama di record index {idx}:\n"
|
||||
f" tokens ({len(tokens)}): {tokens}\n"
|
||||
f" ner ({len(ner_tags)}): {ner_tags}\n"
|
||||
f" srl ({len(srl_tags)}): {srl_tags}\n"
|
||||
)
|
||||
|
||||
# -- cek duplikat kalimat
|
||||
key = tuple(tokens) # tuple hash-able
|
||||
|
@ -51,4 +57,4 @@ def json_to_tsv(json_path: str | Path, tsv_path: str | Path) -> None:
|
|||
# CONTOH PEMAKAIAN
|
||||
# ---------------------------------------------------------------------------
|
||||
if __name__ == "__main__":
|
||||
json_to_tsv("QC/dataset_combination.json", "QC/output.tsv")
|
||||
json_to_tsv("QC/normalized_dataset.json", "QC/new_LNS.tsv")
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -2236,6 +2236,7 @@
|
|||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O"
|
||||
],
|
||||
"srl": [
|
||||
|
@ -2255,6 +2256,7 @@
|
|||
"ARGM-LOC",
|
||||
"ARG2",
|
||||
"O",
|
||||
"ARG2",
|
||||
"ARG2"
|
||||
],
|
||||
"question": [
|
||||
|
@ -3719,6 +3721,7 @@
|
|||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O"
|
||||
],
|
||||
"srl": [
|
||||
|
@ -3800,6 +3803,7 @@
|
|||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O"
|
||||
],
|
||||
"srl": [
|
||||
|
@ -4225,6 +4229,7 @@
|
|||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O"
|
||||
],
|
||||
"srl": [
|
||||
|
@ -4395,6 +4400,7 @@
|
|||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O"
|
||||
],
|
||||
"srl": [
|
||||
|
@ -4476,7 +4482,7 @@
|
|||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"B-LOC",
|
||||
"O",
|
||||
"O",
|
||||
"B-EVENT",
|
||||
"I-EVENT",
|
||||
|
@ -4494,6 +4500,7 @@
|
|||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"B-LOC",
|
||||
"O",
|
||||
"B-PER",
|
||||
|
@ -4527,6 +4534,7 @@
|
|||
"ARGM-EX",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARGM-LOC",
|
||||
"O",
|
||||
"ARG1",
|
||||
|
@ -4852,107 +4860,7 @@
|
|||
"answer": [],
|
||||
"type": "none"
|
||||
},
|
||||
{
|
||||
"tokens": [
|
||||
"Ledakan",
|
||||
"dahsyat",
|
||||
"itu",
|
||||
"menimbulkan",
|
||||
"gelembung-gelembung",
|
||||
"alam",
|
||||
"semesta",
|
||||
"yang",
|
||||
"menyebar",
|
||||
"dan",
|
||||
"menggembung",
|
||||
"ke",
|
||||
"seluruh",
|
||||
"penjuru",
|
||||
",",
|
||||
"sehingga",
|
||||
"membentuk",
|
||||
"galaksi",
|
||||
",",
|
||||
"bintang-bintang",
|
||||
",",
|
||||
"matahari",
|
||||
",",
|
||||
"planet-planet",
|
||||
",",
|
||||
"bumi",
|
||||
",",
|
||||
"bulan",
|
||||
"dan",
|
||||
"meteorit",
|
||||
"."
|
||||
],
|
||||
"ner": [
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"V",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"V",
|
||||
"O",
|
||||
"V",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"ARGM-CAU",
|
||||
"V",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"B-LOC",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O"
|
||||
],
|
||||
"srl": [
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"V",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARGM-REL",
|
||||
"V",
|
||||
"ARGM-ADV",
|
||||
"V",
|
||||
"ARGM-DIR",
|
||||
"ARGM-LOC",
|
||||
"ARGM-LOC",
|
||||
"O",
|
||||
"ARGM-CAU",
|
||||
"V",
|
||||
"ARG1",
|
||||
"O",
|
||||
"ARG1",
|
||||
"O",
|
||||
"ARG1",
|
||||
"O",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"O",
|
||||
"ARG1",
|
||||
"ARGM-COO",
|
||||
"ARG1",
|
||||
"O"
|
||||
],
|
||||
"question": [],
|
||||
"answer": [],
|
||||
"type": "none"
|
||||
},
|
||||
|
||||
{
|
||||
"tokens": [
|
||||
"Bumi",
|
||||
|
@ -5154,84 +5062,7 @@
|
|||
"answer": [],
|
||||
"type": "none"
|
||||
},
|
||||
{
|
||||
"tokens": [
|
||||
"Ada",
|
||||
"juga",
|
||||
"ilmuwan",
|
||||
"astronomi",
|
||||
"yang",
|
||||
"mengibaratkan",
|
||||
"galaksi",
|
||||
"bintang-bintang",
|
||||
"itu",
|
||||
"tak",
|
||||
"ubahnya",
|
||||
"seperti",
|
||||
"sekumpulan",
|
||||
"anak",
|
||||
"ayam",
|
||||
",",
|
||||
"yang",
|
||||
"tak",
|
||||
"mungkin",
|
||||
"dipisahkan",
|
||||
"dari",
|
||||
"induknya",
|
||||
"."
|
||||
],
|
||||
"ner": [
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"V",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"ARGM-NEG",
|
||||
"V",
|
||||
"ARGM-LOC",
|
||||
"O"
|
||||
],
|
||||
"srl": [
|
||||
"V",
|
||||
"ARGM-MNR",
|
||||
"ARG0",
|
||||
"ARG0",
|
||||
"ARGM-REL",
|
||||
"V",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARGM-NEG",
|
||||
"ARGM-MNR",
|
||||
"ARGM-MNR",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"O",
|
||||
"ARGM-REL",
|
||||
"ARGM-NEG",
|
||||
"ARGM-NEG",
|
||||
"V",
|
||||
"ARGM-LOC",
|
||||
"O"
|
||||
],
|
||||
"question": [],
|
||||
"answer": [],
|
||||
"type": "none"
|
||||
},
|
||||
|
||||
{
|
||||
"tokens": [
|
||||
"Jadi",
|
||||
|
@ -5411,107 +5242,7 @@
|
|||
"answer": [],
|
||||
"type": "none"
|
||||
},
|
||||
{
|
||||
"tokens": [
|
||||
"Ledakan",
|
||||
"dahsyat",
|
||||
"itu",
|
||||
"menimbulkan",
|
||||
"gelembung-gelembung",
|
||||
"alam",
|
||||
"semesta",
|
||||
"yang",
|
||||
"menyebar",
|
||||
"dan",
|
||||
"menggembung",
|
||||
"ke",
|
||||
"seluruh",
|
||||
"penjuru",
|
||||
",",
|
||||
"sehingga",
|
||||
"membentuk",
|
||||
"galaksi",
|
||||
",",
|
||||
"bintang-bintang",
|
||||
",",
|
||||
"matahari",
|
||||
",",
|
||||
"planet-planet",
|
||||
",",
|
||||
"bumi",
|
||||
",",
|
||||
"bulan",
|
||||
"dan",
|
||||
"meteorit",
|
||||
"."
|
||||
],
|
||||
"ner": [
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"B-LOC",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O"
|
||||
],
|
||||
"srl": [
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"V",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARGM-REL",
|
||||
"V",
|
||||
"ARGM-ADV",
|
||||
"V",
|
||||
"ARGM-DIR",
|
||||
"ARGM-LOC",
|
||||
"ARGM-LOC",
|
||||
"O",
|
||||
"ARGM-CAU",
|
||||
"V",
|
||||
"ARG1",
|
||||
"O",
|
||||
"ARG1",
|
||||
"O",
|
||||
"ARG1",
|
||||
"O",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"O",
|
||||
"ARG1",
|
||||
"ARGM-COO",
|
||||
"ARG1",
|
||||
"O"
|
||||
],
|
||||
"question": [],
|
||||
"answer": [],
|
||||
"type": "none"
|
||||
},
|
||||
|
||||
{
|
||||
"tokens": ["Mesozoikum", ",", "yaitu", "zaman", "purba", "tengah", "."],
|
||||
"ner": ["B-EVENT", "O", "O", "O", "O", "O", "O"],
|
||||
|
@ -5856,19 +5587,6 @@
|
|||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"V",
|
||||
"O",
|
||||
"O",
|
||||
"B-LOC",
|
||||
"O",
|
||||
"O",
|
||||
"V",
|
||||
"O",
|
||||
"B-LOC",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"V",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
|
@ -5877,7 +5595,21 @@
|
|||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"V",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O"
|
||||
|
@ -6025,120 +5757,7 @@
|
|||
"answer": ["Pliosen"],
|
||||
"type": "fill_in_the_blank"
|
||||
},
|
||||
{
|
||||
"tokens": [
|
||||
"Ini",
|
||||
"pada",
|
||||
"gilirannya",
|
||||
"menimbulkan",
|
||||
"tumbuhnya",
|
||||
"(",
|
||||
"atau",
|
||||
"mungkin",
|
||||
"lebih",
|
||||
"tepat",
|
||||
"terbentuk",
|
||||
")",
|
||||
"rangkaian",
|
||||
"perbukitan",
|
||||
"struktural",
|
||||
"seperti",
|
||||
"perbukitan",
|
||||
"besar",
|
||||
"(",
|
||||
"gunung",
|
||||
")",
|
||||
",",
|
||||
"dan",
|
||||
"perbukitan",
|
||||
"lipatan",
|
||||
"serta",
|
||||
"rangkaian",
|
||||
"gunung",
|
||||
"api",
|
||||
"aktif",
|
||||
"sepanjang",
|
||||
"gugusan",
|
||||
"perbukitan",
|
||||
"itu",
|
||||
"."
|
||||
],
|
||||
"ner": [
|
||||
"O",
|
||||
"ARGM-TMP",
|
||||
"ARGM-TMP",
|
||||
"V",
|
||||
"ARG1",
|
||||
"O",
|
||||
"ARGM-MOD",
|
||||
"ARGM-MOD",
|
||||
"ARGM-MNR",
|
||||
"ARGM-MNR",
|
||||
"V",
|
||||
"O",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARGM-MNR",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"O",
|
||||
"ARG1",
|
||||
"O",
|
||||
"O",
|
||||
"ARGM-COO",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARGM-COO",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARGM-LOC",
|
||||
"ARGM-LOC",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"O"
|
||||
],
|
||||
"srl": [
|
||||
"ARG1",
|
||||
"ARGM-TMP",
|
||||
"ARGM-TMP",
|
||||
"V",
|
||||
"ARG1",
|
||||
"O",
|
||||
"ARGM-MOD",
|
||||
"ARGM-MOD",
|
||||
"ARGM-MNR",
|
||||
"ARGM-MNR",
|
||||
"V",
|
||||
"O",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARGM-MNR",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"O",
|
||||
"ARG1",
|
||||
"O",
|
||||
"O",
|
||||
"ARGM-COO",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARGM-COO",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARGM-LOC",
|
||||
"ARGM-LOC",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"O"
|
||||
],
|
||||
"question": [],
|
||||
"answer": [],
|
||||
"type": "none"
|
||||
},
|
||||
|
||||
{
|
||||
"tokens": [
|
||||
"Hak",
|
||||
|
@ -13926,92 +13545,7 @@
|
|||
"answer": [],
|
||||
"type": "none"
|
||||
},
|
||||
{
|
||||
"tokens": [
|
||||
"10",
|
||||
"Ledakan",
|
||||
"dahsyat",
|
||||
"itu",
|
||||
"menimbulkan",
|
||||
"gelembung-gelembung",
|
||||
"alam",
|
||||
"semesta",
|
||||
"yang",
|
||||
"menyebar",
|
||||
"dan",
|
||||
"menggembung",
|
||||
"ke",
|
||||
"seluruh",
|
||||
"penjuru",
|
||||
"sehingga",
|
||||
"membentuk",
|
||||
"galaksi",
|
||||
"bintang-bintang",
|
||||
"matahari",
|
||||
"planet-planet",
|
||||
"bumi",
|
||||
"bulan",
|
||||
"dan",
|
||||
"meteorit"
|
||||
],
|
||||
"ner": [
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O"
|
||||
],
|
||||
"srl": [
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"V",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2"
|
||||
],
|
||||
"question": [],
|
||||
"answer": [],
|
||||
"type": "none"
|
||||
},
|
||||
|
||||
{
|
||||
"tokens": [
|
||||
"Bumi",
|
||||
|
@ -17010,32 +16544,32 @@
|
|||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"V",
|
||||
"ARG1",
|
||||
"ARGM-MOD",
|
||||
"ARGM-MOD",
|
||||
"ARGM-MNR",
|
||||
"ARGM-MNR",
|
||||
"V",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1"
|
||||
"ARGM-MNR",
|
||||
"ARGM-MNR",
|
||||
"ARGM-MNR",
|
||||
"ARGM-MNR",
|
||||
"ARGM-COO",
|
||||
"ARGM-COO",
|
||||
"ARGM-COO",
|
||||
"ARGM-COO",
|
||||
"ARGM-COO",
|
||||
"ARGM-COO",
|
||||
"ARGM-COO",
|
||||
"ARGM-COO",
|
||||
"ARGM-LOC",
|
||||
"ARGM-LOC",
|
||||
"ARGM-LOC",
|
||||
"ARGM-LOC"
|
||||
],
|
||||
"question": [],
|
||||
"answer": [],
|
||||
|
@ -19924,98 +19458,7 @@
|
|||
"answer": [],
|
||||
"type": "none"
|
||||
},
|
||||
{
|
||||
"tokens": [
|
||||
"Sangiran",
|
||||
"Perjalanan",
|
||||
"kisah",
|
||||
"perkembangan",
|
||||
"manusia",
|
||||
"di",
|
||||
"Kepulauan",
|
||||
"Indonesia",
|
||||
"tidak",
|
||||
"dapat",
|
||||
"kita",
|
||||
"lepaskan",
|
||||
"dari",
|
||||
"keberadaan",
|
||||
"bentangan",
|
||||
"luas",
|
||||
"perbukitan",
|
||||
"tandus",
|
||||
"yang",
|
||||
"berada",
|
||||
"di",
|
||||
"perbatasan",
|
||||
"Kabupaten",
|
||||
"Sragen",
|
||||
"dan",
|
||||
"Kabupaten",
|
||||
"Karanganyar"
|
||||
],
|
||||
"ner": [
|
||||
"B-LOC",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"B-LOC",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O"
|
||||
],
|
||||
"srl": [
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1"
|
||||
],
|
||||
"question": [],
|
||||
"answer": [],
|
||||
"type": "none"
|
||||
},
|
||||
|
||||
{
|
||||
"tokens": [
|
||||
"Lahan",
|
||||
|
@ -38850,125 +38293,7 @@
|
|||
"answer": [],
|
||||
"type": "none"
|
||||
},
|
||||
{
|
||||
"tokens": [
|
||||
"Perjalanan",
|
||||
"kisah",
|
||||
"perkembangan",
|
||||
"manusia",
|
||||
"di",
|
||||
"Kepulauan",
|
||||
"Indonesia",
|
||||
"tidak",
|
||||
"dapat",
|
||||
"kita",
|
||||
"lepaskan",
|
||||
"dari",
|
||||
"keberadaan",
|
||||
"bentangan",
|
||||
"luas",
|
||||
"perbukitan",
|
||||
"tandus",
|
||||
"yang",
|
||||
"berada",
|
||||
"di",
|
||||
"perbatasan",
|
||||
"Kabupaten",
|
||||
"Sragen",
|
||||
"dan",
|
||||
"Kabupaten",
|
||||
"Karanganyar",
|
||||
"."
|
||||
],
|
||||
"ner": [
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"LOC-B",
|
||||
"LOC-I",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"LOC-B",
|
||||
"LOC-I",
|
||||
"O",
|
||||
"O",
|
||||
"LOC-B",
|
||||
"LOC-I",
|
||||
"O"
|
||||
],
|
||||
"srl": [
|
||||
"ARG0",
|
||||
"ARG0",
|
||||
"ARG0",
|
||||
"ARG0",
|
||||
"O",
|
||||
"ARG0",
|
||||
"ARG0",
|
||||
"O",
|
||||
"O",
|
||||
"O",
|
||||
"V",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARG2",
|
||||
"ARGM-LOC"
|
||||
],
|
||||
"question": [
|
||||
"Di",
|
||||
"manakah",
|
||||
"perkembangan",
|
||||
"manusia",
|
||||
"di",
|
||||
"Kepulauan",
|
||||
"Indonesia",
|
||||
"tidak",
|
||||
"dapat",
|
||||
"dilepaskan",
|
||||
"?"
|
||||
],
|
||||
"answer": [
|
||||
"Keberadaan",
|
||||
"bentangan",
|
||||
"luas",
|
||||
"perbukitan",
|
||||
"tandus",
|
||||
"di",
|
||||
"perbatasan",
|
||||
"Kabupaten",
|
||||
"Sragen",
|
||||
"dan",
|
||||
"Kabupaten",
|
||||
"Karanganyar"
|
||||
],
|
||||
"type": "fill_in_the_blank"
|
||||
},
|
||||
|
||||
{
|
||||
"tokens": [
|
||||
"Lahan",
|
||||
|
@ -39614,80 +38939,6 @@
|
|||
"answer": ["Gustav", "Heindrich", "Ralph", "von", "Koenigswald"],
|
||||
"type": "fill_in_the_blank"
|
||||
},
|
||||
{
|
||||
"tokens": [
|
||||
"Semenjak",
|
||||
"penemuan",
|
||||
"von",
|
||||
"Koenigswald",
|
||||
",",
|
||||
"Situs",
|
||||
"Sangiran",
|
||||
"menjadi",
|
||||
"sangat",
|
||||
"terkenal",
|
||||
"berkaitan",
|
||||
"dengan",
|
||||
"penemuan-penemuan",
|
||||
"fosil",
|
||||
"Homo",
|
||||
"erectus",
|
||||
"secara",
|
||||
"sporadis",
|
||||
"dan",
|
||||
"berkesinambungan",
|
||||
"."
|
||||
],
|
||||
"ner": [
|
||||
"O",
|
||||
"O",
|
||||
"B-PER",
|
||||
"I-PER",
|
||||
"O",
|
||||
"LOC-B",
|
||||
"LOC-I",
|
||||
"V",
|
||||
"ARGM-MNR",
|
||||
"ARGM-MNR",
|
||||
"ARGM-MNR",
|
||||
"ARGM-MNR",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"B-PER",
|
||||
"I-PER",
|
||||
"ARGM-MNR",
|
||||
"ARGM-MNR",
|
||||
"ARGM-COO",
|
||||
"ARGM-MNR",
|
||||
"O"
|
||||
],
|
||||
"srl": [
|
||||
"ARGM-TMP",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"O",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"V",
|
||||
"ARGM-MNR",
|
||||
"ARGM-MNR",
|
||||
"ARGM-MNR",
|
||||
"ARGM-MNR",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARG1",
|
||||
"ARGM-MNR",
|
||||
"ARGM-MNR",
|
||||
"ARGM-COO",
|
||||
"ARGM-MNR",
|
||||
"O"
|
||||
],
|
||||
"question": [],
|
||||
"answer": [],
|
||||
"type": "none"
|
||||
},
|
||||
{
|
||||
"tokens": [
|
||||
"Homo",
|
|
@ -2,10 +2,30 @@
|
|||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 92,
|
||||
"execution_count": 1,
|
||||
"id": "9bf2159a",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"2025-04-29 15:10:04.089483: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n",
|
||||
"2025-04-29 15:10:04.096411: I external/local_xla/xla/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used.\n",
|
||||
"2025-04-29 15:10:04.155120: I external/local_xla/xla/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used.\n",
|
||||
"2025-04-29 15:10:04.201581: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:467] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
|
||||
"WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n",
|
||||
"E0000 00:00:1745914204.252337 250474 cuda_dnn.cc:8579] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
|
||||
"E0000 00:00:1745914204.265450 250474 cuda_blas.cc:1407] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
|
||||
"W0000 00:00:1745914204.374986 250474 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n",
|
||||
"W0000 00:00:1745914204.375008 250474 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n",
|
||||
"W0000 00:00:1745914204.375009 250474 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n",
|
||||
"W0000 00:00:1745914204.375010 250474 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n",
|
||||
"2025-04-29 15:10:04.389010: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
|
||||
"To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"import numpy as np\n",
|
||||
|
@ -25,12 +45,13 @@
|
|||
" TimeDistributed,\n",
|
||||
")\n",
|
||||
"from tensorflow.keras.callbacks import EarlyStopping\n",
|
||||
"from sklearn.metrics import classification_report"
|
||||
"from sklearn.metrics import classification_report\n",
|
||||
"from collections import Counter"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 104,
|
||||
"execution_count": 16,
|
||||
"id": "50118278",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
|
@ -39,53 +60,15 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
" Jumlah data valid: 732 / 732\n",
|
||||
" Jumlah data valid: 261 / 261\n",
|
||||
" Jumlah data tidak valid: 0\n",
|
||||
"\n",
|
||||
"Contoh pertanyaan dari data valid:\n",
|
||||
"[\n",
|
||||
" [\n",
|
||||
" \"___\",\n",
|
||||
" \"adalah\",\n",
|
||||
" \"putra\",\n",
|
||||
" \"gph\",\n",
|
||||
" \"soerjaningrat\",\n",
|
||||
" \"dan\",\n",
|
||||
" \"cucu\",\n",
|
||||
" \"pakualam\",\n",
|
||||
" \"iii.\"\n",
|
||||
" ],\n",
|
||||
" [\n",
|
||||
" \"ia\",\n",
|
||||
" \"diterima\",\n",
|
||||
" \"belajar\",\n",
|
||||
" \"di\",\n",
|
||||
" \"___.\"\n",
|
||||
" ],\n",
|
||||
" [\n",
|
||||
" \"ia\",\n",
|
||||
" \"bersama\",\n",
|
||||
" \"douwes\",\n",
|
||||
" \"dekker\",\n",
|
||||
" \"dan\",\n",
|
||||
" \"dr.\",\n",
|
||||
" \"cipto\",\n",
|
||||
" \"mangoenkoesoemo\",\n",
|
||||
" \"lantas\",\n",
|
||||
" \"mendirikan\",\n",
|
||||
" \"___\",\n",
|
||||
" \"pada\",\n",
|
||||
" \"25\",\n",
|
||||
" \"desember\",\n",
|
||||
" \"1912.\"\n",
|
||||
" ]\n",
|
||||
"]\n"
|
||||
"Counter({'ftb': 180, 'tof': 45, 'none': 36})\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Load raw data\n",
|
||||
"with open(\"normalized_dataset.json\", encoding=\"utf-8\") as f:\n",
|
||||
"with open(\"normalize_dataset.json\", encoding=\"utf-8\") as f:\n",
|
||||
" raw_data = json.load(f)\n",
|
||||
"\n",
|
||||
"# Validasi lengkap\n",
|
||||
|
@ -133,13 +116,14 @@
|
|||
"answers = [[token.lower().strip() for token in item[\"answer\"]] for item in valid_data]\n",
|
||||
"types = [item[\"type\"] for item in valid_data]\n",
|
||||
"\n",
|
||||
"print(\"\\nContoh pertanyaan dari data valid:\")\n",
|
||||
"print(json.dumps(questions[:3], indent=2, ensure_ascii=False))\n"
|
||||
"type_counts = Counter(types)\n",
|
||||
"\n",
|
||||
"print(type_counts)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 94,
|
||||
"execution_count": 3,
|
||||
"id": "4e3a0088",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
|
@ -165,7 +149,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 95,
|
||||
"execution_count": 4,
|
||||
"id": "555f9e22",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
|
@ -173,7 +157,7 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"{'tof', 'none', 'ftb'}\n"
|
||||
"{'none', 'tof', 'ftb'}\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -200,7 +184,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 96,
|
||||
"execution_count": 5,
|
||||
"id": "f530cfe7",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
|
@ -216,18 +200,25 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 97,
|
||||
"execution_count": 6,
|
||||
"id": "255e2a9a",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"2025-04-29 15:10:06.654453: E external/local_xla/xla/stream_executor/cuda/cuda_platform.cc:51] failed call to cuInit: INTERNAL: CUDA error: Failed call to cuInit: UNKNOWN ERROR (303)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">Model: \"functional_10\"</span>\n",
|
||||
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">Model: \"functional\"</span>\n",
|
||||
"</pre>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"\u001b[1mModel: \"functional_10\"\u001b[0m\n"
|
||||
"\u001b[1mModel: \"functional\"\u001b[0m\n"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
|
@ -248,31 +239,30 @@
|
|||
"│ srl_input │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ - │\n",
|
||||
"│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">InputLayer</span>) │ │ │ │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ embedding_30 │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">128</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">354,560</span> │ tok_input[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n",
|
||||
"│ embedding │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">128</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">74,496</span> │ tok_input[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n",
|
||||
"│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Embedding</span>) │ │ │ │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ embedding_31 │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">16</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">672</span> │ ner_input[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n",
|
||||
"│ embedding_1 │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">16</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">352</span> │ ner_input[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n",
|
||||
"│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Embedding</span>) │ │ │ │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ embedding_32 │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">16</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">448</span> │ srl_input[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n",
|
||||
"│ embedding_2 │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">16</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">272</span> │ srl_input[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n",
|
||||
"│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Embedding</span>) │ │ │ │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ concatenate_10 │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">160</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ embedding_30[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">…</span> │\n",
|
||||
"│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Concatenate</span>) │ │ │ embedding_31[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">…</span> │\n",
|
||||
"│ │ │ │ embedding_32[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">…</span> │\n",
|
||||
"│ concatenate │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">160</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ embedding[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>], │\n",
|
||||
"│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Concatenate</span>) │ │ │ embedding_1[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>… │\n",
|
||||
"│ │ │ │ embedding_2[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ lstm_10 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">LSTM</span>) │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">256</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">427,008</span> │ concatenate_10[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>… │\n",
|
||||
"│ lstm (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">LSTM</span>) │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">256</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">427,008</span> │ concatenate[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ get_item_10 │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">256</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ lstm_10[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n",
|
||||
"│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">GetItem</span>) │ │ │ │\n",
|
||||
"│ get_item (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">GetItem</span>) │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">256</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │ lstm[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ question_output │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">727</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">186,839</span> │ lstm_10[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n",
|
||||
"│ question_output │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">339</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">87,123</span> │ lstm[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n",
|
||||
"│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">TimeDistributed</span>) │ │ │ │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ answer_output │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">367</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">94,319</span> │ lstm_10[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n",
|
||||
"│ answer_output │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">234</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">60,138</span> │ lstm[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n",
|
||||
"│ (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">TimeDistributed</span>) │ │ │ │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ type_output (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dense</span>) │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">3</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">771</span> │ get_item_10[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n",
|
||||
"│ type_output (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dense</span>) │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">3</span>) │ <span style=\"color: #00af00; text-decoration-color: #00af00\">771</span> │ get_item[<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>][<span style=\"color: #00af00; text-decoration-color: #00af00\">0</span>] │\n",
|
||||
"└─────────────────────┴───────────────────┴────────────┴───────────────────┘\n",
|
||||
"</pre>\n"
|
||||
],
|
||||
|
@ -289,31 +279,30 @@
|
|||
"│ srl_input │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;45mNone\u001b[0m) │ \u001b[38;5;34m0\u001b[0m │ - │\n",
|
||||
"│ (\u001b[38;5;33mInputLayer\u001b[0m) │ │ │ │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ embedding_30 │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m128\u001b[0m) │ \u001b[38;5;34m354,560\u001b[0m │ tok_input[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n",
|
||||
"│ embedding │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m128\u001b[0m) │ \u001b[38;5;34m74,496\u001b[0m │ tok_input[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n",
|
||||
"│ (\u001b[38;5;33mEmbedding\u001b[0m) │ │ │ │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ embedding_31 │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m16\u001b[0m) │ \u001b[38;5;34m672\u001b[0m │ ner_input[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n",
|
||||
"│ embedding_1 │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m16\u001b[0m) │ \u001b[38;5;34m352\u001b[0m │ ner_input[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n",
|
||||
"│ (\u001b[38;5;33mEmbedding\u001b[0m) │ │ │ │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ embedding_32 │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m16\u001b[0m) │ \u001b[38;5;34m448\u001b[0m │ srl_input[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n",
|
||||
"│ embedding_2 │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m16\u001b[0m) │ \u001b[38;5;34m272\u001b[0m │ srl_input[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n",
|
||||
"│ (\u001b[38;5;33mEmbedding\u001b[0m) │ │ │ │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ concatenate_10 │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m160\u001b[0m) │ \u001b[38;5;34m0\u001b[0m │ embedding_30[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m…\u001b[0m │\n",
|
||||
"│ (\u001b[38;5;33mConcatenate\u001b[0m) │ │ │ embedding_31[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m…\u001b[0m │\n",
|
||||
"│ │ │ │ embedding_32[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m…\u001b[0m │\n",
|
||||
"│ concatenate │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m160\u001b[0m) │ \u001b[38;5;34m0\u001b[0m │ embedding[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m], │\n",
|
||||
"│ (\u001b[38;5;33mConcatenate\u001b[0m) │ │ │ embedding_1[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m… │\n",
|
||||
"│ │ │ │ embedding_2[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ lstm_10 (\u001b[38;5;33mLSTM\u001b[0m) │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m256\u001b[0m) │ \u001b[38;5;34m427,008\u001b[0m │ concatenate_10[\u001b[38;5;34m0\u001b[0m… │\n",
|
||||
"│ lstm (\u001b[38;5;33mLSTM\u001b[0m) │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m256\u001b[0m) │ \u001b[38;5;34m427,008\u001b[0m │ concatenate[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ get_item_10 │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m256\u001b[0m) │ \u001b[38;5;34m0\u001b[0m │ lstm_10[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n",
|
||||
"│ (\u001b[38;5;33mGetItem\u001b[0m) │ │ │ │\n",
|
||||
"│ get_item (\u001b[38;5;33mGetItem\u001b[0m) │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m256\u001b[0m) │ \u001b[38;5;34m0\u001b[0m │ lstm[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ question_output │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m727\u001b[0m) │ \u001b[38;5;34m186,839\u001b[0m │ lstm_10[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n",
|
||||
"│ question_output │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m339\u001b[0m) │ \u001b[38;5;34m87,123\u001b[0m │ lstm[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n",
|
||||
"│ (\u001b[38;5;33mTimeDistributed\u001b[0m) │ │ │ │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ answer_output │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m367\u001b[0m) │ \u001b[38;5;34m94,319\u001b[0m │ lstm_10[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n",
|
||||
"│ answer_output │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m234\u001b[0m) │ \u001b[38;5;34m60,138\u001b[0m │ lstm[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n",
|
||||
"│ (\u001b[38;5;33mTimeDistributed\u001b[0m) │ │ │ │\n",
|
||||
"├─────────────────────┼───────────────────┼────────────┼───────────────────┤\n",
|
||||
"│ type_output (\u001b[38;5;33mDense\u001b[0m) │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m3\u001b[0m) │ \u001b[38;5;34m771\u001b[0m │ get_item_10[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n",
|
||||
"│ type_output (\u001b[38;5;33mDense\u001b[0m) │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m3\u001b[0m) │ \u001b[38;5;34m771\u001b[0m │ get_item[\u001b[38;5;34m0\u001b[0m][\u001b[38;5;34m0\u001b[0m] │\n",
|
||||
"└─────────────────────┴───────────────────┴────────────┴───────────────────┘\n"
|
||||
]
|
||||
},
|
||||
|
@ -323,11 +312,11 @@
|
|||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\"> Total params: </span><span style=\"color: #00af00; text-decoration-color: #00af00\">1,064,617</span> (4.06 MB)\n",
|
||||
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\"> Total params: </span><span style=\"color: #00af00; text-decoration-color: #00af00\">650,160</span> (2.48 MB)\n",
|
||||
"</pre>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"\u001b[1m Total params: \u001b[0m\u001b[38;5;34m1,064,617\u001b[0m (4.06 MB)\n"
|
||||
"\u001b[1m Total params: \u001b[0m\u001b[38;5;34m650,160\u001b[0m (2.48 MB)\n"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
|
@ -336,11 +325,11 @@
|
|||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\"> Trainable params: </span><span style=\"color: #00af00; text-decoration-color: #00af00\">1,064,617</span> (4.06 MB)\n",
|
||||
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\"> Trainable params: </span><span style=\"color: #00af00; text-decoration-color: #00af00\">650,160</span> (2.48 MB)\n",
|
||||
"</pre>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"\u001b[1m Trainable params: \u001b[0m\u001b[38;5;34m1,064,617\u001b[0m (4.06 MB)\n"
|
||||
"\u001b[1m Trainable params: \u001b[0m\u001b[38;5;34m650,160\u001b[0m (2.48 MB)\n"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
|
@ -364,37 +353,27 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"Epoch 1/30\n",
|
||||
"\u001b[1m253/253\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m10s\u001b[0m 31ms/step - answer_output_accuracy: 0.9421 - answer_output_loss: 1.0839 - loss: 3.7461 - question_output_accuracy: 0.8187 - question_output_loss: 1.8269 - type_output_accuracy: 0.5154 - type_output_loss: 0.8354 - val_answer_output_accuracy: 0.9683 - val_answer_output_loss: 0.1305 - val_loss: 1.3997 - val_question_output_accuracy: 0.8508 - val_question_output_loss: 0.5916 - val_type_output_accuracy: 0.5451 - val_type_output_loss: 0.6777\n",
|
||||
"\u001b[1m5/5\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m3s\u001b[0m 139ms/step - answer_output_accuracy: 0.4569 - answer_output_loss: 5.3719 - loss: 12.2246 - question_output_accuracy: 0.3854 - question_output_loss: 5.7392 - type_output_accuracy: 0.5172 - type_output_loss: 1.0955 - val_answer_output_accuracy: 0.9382 - val_answer_output_loss: 4.7459 - val_loss: 10.9338 - val_question_output_accuracy: 0.7618 - val_question_output_loss: 5.0968 - val_type_output_accuracy: 0.5294 - val_type_output_loss: 1.0911\n",
|
||||
"Epoch 2/30\n",
|
||||
"\u001b[1m253/253\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m7s\u001b[0m 28ms/step - answer_output_accuracy: 0.9690 - answer_output_loss: 0.1140 - loss: 1.3590 - question_output_accuracy: 0.8490 - question_output_loss: 0.5613 - type_output_accuracy: 0.5599 - type_output_loss: 0.6837 - val_answer_output_accuracy: 0.9695 - val_answer_output_loss: 0.1072 - val_loss: 1.2185 - val_question_output_accuracy: 0.8523 - val_question_output_loss: 0.4397 - val_type_output_accuracy: 0.5484 - val_type_output_loss: 0.6715\n",
|
||||
"\u001b[1m5/5\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 34ms/step - answer_output_accuracy: 0.9030 - answer_output_loss: 4.0847 - loss: 9.6638 - question_output_accuracy: 0.6989 - question_output_loss: 4.4100 - type_output_accuracy: 0.6659 - type_output_loss: 1.0841 - val_answer_output_accuracy: 0.9382 - val_answer_output_loss: 2.0126 - val_loss: 5.3872 - val_question_output_accuracy: 0.7618 - val_question_output_loss: 2.2876 - val_type_output_accuracy: 0.5294 - val_type_output_loss: 1.0870\n",
|
||||
"Epoch 3/30\n",
|
||||
"\u001b[1m253/253\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m7s\u001b[0m 28ms/step - answer_output_accuracy: 0.9704 - answer_output_loss: 0.0929 - loss: 1.1687 - question_output_accuracy: 0.8545 - question_output_loss: 0.4132 - type_output_accuracy: 0.5641 - type_output_loss: 0.6626 - val_answer_output_accuracy: 0.9699 - val_answer_output_loss: 0.0893 - val_loss: 1.1270 - val_question_output_accuracy: 0.8511 - val_question_output_loss: 0.3662 - val_type_output_accuracy: 0.5206 - val_type_output_loss: 0.6712\n",
|
||||
"\u001b[1m5/5\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 34ms/step - answer_output_accuracy: 0.9058 - answer_output_loss: 1.7045 - loss: 4.9716 - question_output_accuracy: 0.7067 - question_output_loss: 2.1690 - type_output_accuracy: 0.6298 - type_output_loss: 1.0735 - val_answer_output_accuracy: 0.9382 - val_answer_output_loss: 0.9609 - val_loss: 3.8103 - val_question_output_accuracy: 0.7618 - val_question_output_loss: 1.7718 - val_type_output_accuracy: 0.5294 - val_type_output_loss: 1.0775\n",
|
||||
"Epoch 4/30\n",
|
||||
"\u001b[1m253/253\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m8s\u001b[0m 30ms/step - answer_output_accuracy: 0.9721 - answer_output_loss: 0.0755 - loss: 1.0676 - question_output_accuracy: 0.8573 - question_output_loss: 0.3360 - type_output_accuracy: 0.5583 - type_output_loss: 0.6562 - val_answer_output_accuracy: 0.9725 - val_answer_output_loss: 0.0819 - val_loss: 1.0924 - val_question_output_accuracy: 0.8538 - val_question_output_loss: 0.3355 - val_type_output_accuracy: 0.5217 - val_type_output_loss: 0.6720\n",
|
||||
"\u001b[1m5/5\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 37ms/step - answer_output_accuracy: 0.9007 - answer_output_loss: 1.0111 - loss: 4.1452 - question_output_accuracy: 0.7096 - question_output_loss: 2.0851 - type_output_accuracy: 0.6441 - type_output_loss: 1.0523 - val_answer_output_accuracy: 0.9382 - val_answer_output_loss: 0.6963 - val_loss: 3.5772 - val_question_output_accuracy: 0.7618 - val_question_output_loss: 1.8231 - val_type_output_accuracy: 0.5294 - val_type_output_loss: 1.0579\n",
|
||||
"Epoch 5/30\n",
|
||||
"\u001b[1m253/253\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m7s\u001b[0m 29ms/step - answer_output_accuracy: 0.9736 - answer_output_loss: 0.0687 - loss: 1.0458 - question_output_accuracy: 0.8604 - question_output_loss: 0.3208 - type_output_accuracy: 0.5582 - type_output_loss: 0.6564 - val_answer_output_accuracy: 0.9727 - val_answer_output_loss: 0.0785 - val_loss: 1.0680 - val_question_output_accuracy: 0.8557 - val_question_output_loss: 0.3196 - val_type_output_accuracy: 0.5406 - val_type_output_loss: 0.6702\n",
|
||||
"\u001b[1m5/5\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 37ms/step - answer_output_accuracy: 0.9116 - answer_output_loss: 0.7749 - loss: 3.9569 - question_output_accuracy: 0.6975 - question_output_loss: 2.1718 - type_output_accuracy: 0.6141 - type_output_loss: 1.0181 - val_answer_output_accuracy: 0.9382 - val_answer_output_loss: 0.6098 - val_loss: 3.3674 - val_question_output_accuracy: 0.7618 - val_question_output_loss: 1.7225 - val_type_output_accuracy: 0.5294 - val_type_output_loss: 1.0351\n",
|
||||
"Epoch 6/30\n",
|
||||
"\u001b[1m253/253\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m10s\u001b[0m 38ms/step - answer_output_accuracy: 0.9744 - answer_output_loss: 0.0606 - loss: 1.0098 - question_output_accuracy: 0.8582 - question_output_loss: 0.2944 - type_output_accuracy: 0.5536 - type_output_loss: 0.6548 - val_answer_output_accuracy: 0.9730 - val_answer_output_loss: 0.0761 - val_loss: 1.0590 - val_question_output_accuracy: 0.8529 - val_question_output_loss: 0.3082 - val_type_output_accuracy: 0.5106 - val_type_output_loss: 0.6747\n",
|
||||
"\u001b[1m5/5\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 36ms/step - answer_output_accuracy: 0.9042 - answer_output_loss: 0.7511 - loss: 3.6901 - question_output_accuracy: 0.6980 - question_output_loss: 1.9691 - type_output_accuracy: 0.6667 - type_output_loss: 0.9625 - val_answer_output_accuracy: 0.9382 - val_answer_output_loss: 0.5729 - val_loss: 3.3592 - val_question_output_accuracy: 0.7618 - val_question_output_loss: 1.7692 - val_type_output_accuracy: 0.5294 - val_type_output_loss: 1.0171\n",
|
||||
"Epoch 7/30\n",
|
||||
"\u001b[1m253/253\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m11s\u001b[0m 44ms/step - answer_output_accuracy: 0.9743 - answer_output_loss: 0.0602 - loss: 0.9826 - question_output_accuracy: 0.8617 - question_output_loss: 0.2767 - type_output_accuracy: 0.5678 - type_output_loss: 0.6457 - val_answer_output_accuracy: 0.9737 - val_answer_output_loss: 0.0735 - val_loss: 1.0377 - val_question_output_accuracy: 0.8632 - val_question_output_loss: 0.2956 - val_type_output_accuracy: 0.5617 - val_type_output_loss: 0.6667\n",
|
||||
"\u001b[1m5/5\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 32ms/step - answer_output_accuracy: 0.9067 - answer_output_loss: 0.7140 - loss: 3.5808 - question_output_accuracy: 0.7004 - question_output_loss: 1.9338 - type_output_accuracy: 0.6701 - type_output_loss: 0.9270 - val_answer_output_accuracy: 0.9382 - val_answer_output_loss: 0.5537 - val_loss: 3.2816 - val_question_output_accuracy: 0.7618 - val_question_output_loss: 1.7182 - val_type_output_accuracy: 0.5294 - val_type_output_loss: 1.0097\n",
|
||||
"Epoch 8/30\n",
|
||||
"\u001b[1m253/253\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m11s\u001b[0m 42ms/step - answer_output_accuracy: 0.9738 - answer_output_loss: 0.0577 - loss: 0.9710 - question_output_accuracy: 0.8606 - question_output_loss: 0.2633 - type_output_accuracy: 0.5602 - type_output_loss: 0.6501 - val_answer_output_accuracy: 0.9739 - val_answer_output_loss: 0.0702 - val_loss: 1.0265 - val_question_output_accuracy: 0.8609 - val_question_output_loss: 0.2860 - val_type_output_accuracy: 0.5462 - val_type_output_loss: 0.6695\n",
|
||||
"\u001b[1m5/5\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 33ms/step - answer_output_accuracy: 0.9001 - answer_output_loss: 0.7540 - loss: 3.4527 - question_output_accuracy: 0.7065 - question_output_loss: 1.8054 - type_output_accuracy: 0.6714 - type_output_loss: 0.8939 - val_answer_output_accuracy: 0.9382 - val_answer_output_loss: 0.5429 - val_loss: 3.2578 - val_question_output_accuracy: 0.7618 - val_question_output_loss: 1.7000 - val_type_output_accuracy: 0.5294 - val_type_output_loss: 1.0149\n",
|
||||
"Epoch 9/30\n",
|
||||
"\u001b[1m253/253\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m11s\u001b[0m 42ms/step - answer_output_accuracy: 0.9743 - answer_output_loss: 0.0522 - loss: 0.9559 - question_output_accuracy: 0.8590 - question_output_loss: 0.2549 - type_output_accuracy: 0.5509 - type_output_loss: 0.6488 - val_answer_output_accuracy: 0.9715 - val_answer_output_loss: 0.0709 - val_loss: 1.0313 - val_question_output_accuracy: 0.8511 - val_question_output_loss: 0.2829 - val_type_output_accuracy: 0.5128 - val_type_output_loss: 0.6767\n",
|
||||
"\u001b[1m5/5\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 32ms/step - answer_output_accuracy: 0.8970 - answer_output_loss: 0.7761 - loss: 3.4633 - question_output_accuracy: 0.6954 - question_output_loss: 1.8261 - type_output_accuracy: 0.6680 - type_output_loss: 0.8589 - val_answer_output_accuracy: 0.9382 - val_answer_output_loss: 0.5371 - val_loss: 3.2677 - val_question_output_accuracy: 0.7618 - val_question_output_loss: 1.7034 - val_type_output_accuracy: 0.5294 - val_type_output_loss: 1.0272\n",
|
||||
"Epoch 10/30\n",
|
||||
"\u001b[1m253/253\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m11s\u001b[0m 42ms/step - answer_output_accuracy: 0.9747 - answer_output_loss: 0.0512 - loss: 0.9363 - question_output_accuracy: 0.8622 - question_output_loss: 0.2406 - type_output_accuracy: 0.5592 - type_output_loss: 0.6445 - val_answer_output_accuracy: 0.9737 - val_answer_output_loss: 0.0704 - val_loss: 1.0202 - val_question_output_accuracy: 0.8548 - val_question_output_loss: 0.2788 - val_type_output_accuracy: 0.5495 - val_type_output_loss: 0.6721\n",
|
||||
"\u001b[1m5/5\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 32ms/step - answer_output_accuracy: 0.9095 - answer_output_loss: 0.6652 - loss: 3.3243 - question_output_accuracy: 0.7002 - question_output_loss: 1.7973 - type_output_accuracy: 0.6541 - type_output_loss: 0.8676 - val_answer_output_accuracy: 0.9382 - val_answer_output_loss: 0.5337 - val_loss: 3.2687 - val_question_output_accuracy: 0.7618 - val_question_output_loss: 1.6956 - val_type_output_accuracy: 0.5294 - val_type_output_loss: 1.0394\n",
|
||||
"Epoch 11/30\n",
|
||||
"\u001b[1m253/253\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m11s\u001b[0m 42ms/step - answer_output_accuracy: 0.9748 - answer_output_loss: 0.0520 - loss: 0.9421 - question_output_accuracy: 0.8594 - question_output_loss: 0.2446 - type_output_accuracy: 0.5581 - type_output_loss: 0.6454 - val_answer_output_accuracy: 0.9735 - val_answer_output_loss: 0.0696 - val_loss: 1.0231 - val_question_output_accuracy: 0.8625 - val_question_output_loss: 0.2759 - val_type_output_accuracy: 0.5484 - val_type_output_loss: 0.6794\n",
|
||||
"Epoch 12/30\n",
|
||||
"\u001b[1m253/253\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m11s\u001b[0m 42ms/step - answer_output_accuracy: 0.9750 - answer_output_loss: 0.0499 - loss: 0.9247 - question_output_accuracy: 0.8637 - question_output_loss: 0.2316 - type_output_accuracy: 0.5730 - type_output_loss: 0.6433 - val_answer_output_accuracy: 0.9736 - val_answer_output_loss: 0.0693 - val_loss: 1.0144 - val_question_output_accuracy: 0.8623 - val_question_output_loss: 0.2735 - val_type_output_accuracy: 0.5584 - val_type_output_loss: 0.6716\n",
|
||||
"Epoch 13/30\n",
|
||||
"\u001b[1m253/253\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m11s\u001b[0m 45ms/step - answer_output_accuracy: 0.9743 - answer_output_loss: 0.0546 - loss: 0.9290 - question_output_accuracy: 0.8637 - question_output_loss: 0.2325 - type_output_accuracy: 0.5665 - type_output_loss: 0.6419 - val_answer_output_accuracy: 0.9721 - val_answer_output_loss: 0.0683 - val_loss: 1.0072 - val_question_output_accuracy: 0.8631 - val_question_output_loss: 0.2707 - val_type_output_accuracy: 0.5595 - val_type_output_loss: 0.6674\n",
|
||||
"Epoch 14/30\n",
|
||||
"\u001b[1m253/253\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m12s\u001b[0m 47ms/step - answer_output_accuracy: 0.9749 - answer_output_loss: 0.0482 - loss: 0.9212 - question_output_accuracy: 0.8620 - question_output_loss: 0.2314 - type_output_accuracy: 0.5596 - type_output_loss: 0.6417 - val_answer_output_accuracy: 0.9725 - val_answer_output_loss: 0.0687 - val_loss: 1.0154 - val_question_output_accuracy: 0.8514 - val_question_output_loss: 0.2748 - val_type_output_accuracy: 0.5339 - val_type_output_loss: 0.6714\n",
|
||||
"Epoch 15/30\n",
|
||||
"\u001b[1m253/253\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m10s\u001b[0m 39ms/step - answer_output_accuracy: 0.9742 - answer_output_loss: 0.0493 - loss: 0.9149 - question_output_accuracy: 0.8617 - question_output_loss: 0.2254 - type_output_accuracy: 0.5621 - type_output_loss: 0.6402 - val_answer_output_accuracy: 0.9719 - val_answer_output_loss: 0.0692 - val_loss: 1.0235 - val_question_output_accuracy: 0.8524 - val_question_output_loss: 0.2776 - val_type_output_accuracy: 0.5317 - val_type_output_loss: 0.6747\n",
|
||||
"Epoch 16/30\n",
|
||||
"\u001b[1m253/253\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m8s\u001b[0m 31ms/step - answer_output_accuracy: 0.9752 - answer_output_loss: 0.0441 - loss: 0.9078 - question_output_accuracy: 0.8643 - question_output_loss: 0.2212 - type_output_accuracy: 0.5728 - type_output_loss: 0.6425 - val_answer_output_accuracy: 0.9722 - val_answer_output_loss: 0.0681 - val_loss: 1.0137 - val_question_output_accuracy: 0.8541 - val_question_output_loss: 0.2713 - val_type_output_accuracy: 0.5306 - val_type_output_loss: 0.6736\n"
|
||||
"\u001b[1m5/5\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 32ms/step - answer_output_accuracy: 0.9106 - answer_output_loss: 0.6445 - loss: 3.2512 - question_output_accuracy: 0.7075 - question_output_loss: 1.7406 - type_output_accuracy: 0.6467 - type_output_loss: 0.8649 - val_answer_output_accuracy: 0.9382 - val_answer_output_loss: 0.5335 - val_loss: 3.2597 - val_question_output_accuracy: 0.7618 - val_question_output_loss: 1.6769 - val_type_output_accuracy: 0.5294 - val_type_output_loss: 1.0493\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -475,7 +454,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 98,
|
||||
"execution_count": 10,
|
||||
"id": "06fd86c7",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
|
@ -483,12 +462,12 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[1m71/71\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m1s\u001b[0m 13ms/step\n",
|
||||
"\u001b[1m2/2\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 18ms/step\n",
|
||||
"\n",
|
||||
"=== Akurasi Detail ===\n",
|
||||
"Question Accuracy (Token-level): 0.3\n",
|
||||
"Answer Accuracy (Token-level) : 0.7\n",
|
||||
"Type Accuracy (Class-level) : 0.55\n"
|
||||
"Question Accuracy (Token-level): 0.0000\n",
|
||||
"Answer Accuracy (Token-level) : 0.0000\n",
|
||||
"Type Accuracy (Class-level) : 0.61\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -524,8 +503,8 @@
|
|||
"\n",
|
||||
"# Print Results\n",
|
||||
"print(\"\\n=== Akurasi Detail ===\")\n",
|
||||
"print(f\"Question Accuracy (Token-level): {acc_q:.1f}\")\n",
|
||||
"print(f\"Answer Accuracy (Token-level) : {acc_a:.1f}\")\n",
|
||||
"print(f\"Question Accuracy (Token-level): {acc_q:.4f}\")\n",
|
||||
"print(f\"Answer Accuracy (Token-level) : {acc_a:.4f}\")\n",
|
||||
"print(f\"Type Accuracy (Class-level) : {np.mean(y_true_type == y_pred_type):.2f}\")\n",
|
||||
"# print(\"\\n=== Classification Report (TYPE) ===\")\n",
|
||||
"# print(report_type)"
|
||||
|
@ -533,7 +512,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 99,
|
||||
"execution_count": 8,
|
||||
"id": "d5ed106c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
|
@ -546,7 +525,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 100,
|
||||
"execution_count": 9,
|
||||
"id": "aa3860de",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue