https://github.com/bangkit-pukulrata/machine-learning/tree/main/model
https://github.com/tantowjy/news-classification/blob/main/website/main.py
Dataset LLM: https://www.kaggle.com/datasets/iqbalmaulana/indonesian-news-dataset
Dataset NER: https://github.com/yohanesgultom/nlp-experiments/blob/master/data/ner/training_data.txt
TALAS adalah sistem berbasis API untuk menganalisis berita menggunakan model pembelajaran mesin, termasuk analisis bias, deteksi hoaks, deteksi ideologi, pengelompokan, dan entitas bernama. API ini dibangun dengan layanan Google Cloud Platform (GCP) menggunakan App Engine untuk komputasi, Cloud SQL (MySQL) untuk penyimpanan data pengguna, dan model pembelajaran mesin (supervised & unsupervised learning).
- URL:
/bias - Method: POST
- Description: Memproses teks untuk menentukan bias artikel berita.
- Request:
{ "content": "string" // Isi artikel berita } - Response:
{ "bias": 0 // Kategori bias (0 atau 1) }
- URL:
/hoax - Method: POST
- Description: Memproses teks untuk menentukan apakah artikel tersebut mengandung hoaks.
- Request:
{ "content": "string" // Isi artikel berita } - Response:
{ "hoax": 0.85 // Tingkat hoaks (0 hingga 1) }
- URL:
/ideology - Method: POST
- Description: Memproses teks untuk menentukan ideologi artikel berita.
- Request:
{ "content": "string" // Isi artikel berita } - Response:
{ "ideology": 1 // Ideologi artikel (0 = konservatif, 1 = liberal) }
- URL:
/cluster - Method: POST
- Description: Mengelompokkan teks ke dalam cluster tertentu berdasarkan isinya.
- Request:
{ "content": "string" // Isi artikel berita } - Response:
{ "cluster": 3 // Cluster artikel (0-7) }
- URL:
/modeCluster - Method: POST
- Description: Mencari cluster yang paling umum dari kumpulan artikel berita.
- Request:
[ { "title": "string", // Judul artikel "content": "string", // Isi artikel "embedding": [0.1, 0.2] // Representasi embedding } ] - Response:
{ "modeCluster": 2 // Cluster yang paling umum }
- URL:
/embedding - Method: POST
- Description: Menghasilkan embedding untuk teks yang diberikan.
- Request:
[ { "title": "string", // Judul artikel "content": "string" // Isi artikel } ] - Response:
{ "embedding": [[0.1, 0.2]] // Daftar embedding }
- URL:
/title - Method: POST
- Description: Menghasilkan judul dari kumpulan artikel berita.
- Request:
[ { "title": "string", // Judul artikel "content": "string", // Isi artikel "embedding": [0.1, 0.2] // Representasi embedding } ] - Response:
{ "title": "Generated Title" // Judul yang dihasilkan }
- URL:
/summarize - Method: POST
- Description: Membuat dua ringkasan (liberal dan konservatif) dari kumpulan artikel berita.
- Request:
[ { "title": "string", // Judul artikel "content": "string", // Isi artikel "embedding": [0.1, 0.2] // Representasi embedding } ] - Response:
{ "summary_liberalism": "string", // Ringkasan liberal "summary_conservative": "string" // Ringkasan konservatif }
- URL:
/process-all - Method: POST
- Description: Process input text articles to group, generate titles, clusters/categories, summaries, and bias analysis for each group
[
{
"title": "string",
"content": "string",
"embedding": [0.0, 0.1, 0.2]
}
][
{
"title": "Generated Group Title",
"modeCluster": "Cluster/Category Name",
"summary_liberalism": "Liberal perspective summary",
"summary_conservative": "Conservative perspective summary",
"analysis": "Bias and content analysis details"
}
]- 200 OK: Successfully processed and grouped articles
- 400 Bad Request: Invalid input data
- 500 Internal Server Error: Processing error
- URL:
/ - Method: GET
- Description: Menampilkan halaman utama untuk input artikel dan analisis NER.
- Response:
- 200 OK: Menampilkan halaman
ner_home.html.
- 200 OK: Menampilkan halaman
- URL:
/process - Method: POST
- Description: Memproses teks menggunakan model spaCy untuk mendeteksi entitas.
- Request:
- Form Data:
input_data: "string" // Artikel atau teks untuk dianalisis
- Form Data:
- Response:
- 200 OK: Mengembalikan hasil analisis entitas dalam format HTML.
- URL:
/process-login - Method: POST
- Request Body:
{ "email": "string", "password": "string" } - Response:
{ "auth": true, "token": "string" }
- URL:
/process-regist - Method: POST
- Request Body:
{ "username": "string", "email": "string", "password": "string" } - Response:
- 200 OK:
{ "message": "Data berhasil disimpan" } - 500 Internal Server Error:
{ "message": "Terjadi kesalahan" }
- 200 OK:
- URL:
/article/news - Method: GET
- Description: Retrieve a list of news articles
- 200 OK
{ "message": "Data fetched successfully", "data": [] } - 500 Internal Server Error
{ "message": "Internal server error" }
- URL:
/article/:title - Method: GET
- Description: Retrieve content for a specific news article
- 200 OK
{ "message": "Content fetched successfully", "data": [] } - 500 Internal Server Error
{ "message": "Internal server error" }
- URL:
https://talas24.et.r.appspot.com/api/crawler/general - Method: GET
- Description: Run general crawler to update news data in the database
{
"message": "News updated successfully from general crawler"
}