
==== Front
Data Brief
Data Brief
Data in Brief
2352-3409
Elsevier

S2352-3409(24)00746-7
10.1016/j.dib.2024.110781
110781
Data Article
Balinese story texts dataset for narrative text analyses
Bimantara I Made Satria a
Purwitasari Diana diana@its.ac.id
a⁎
ER Ngurah Agus Sanjaya b
Natha Putu Gede Suarya c
a Informatics Department, Faculty of Intelligent Electrical and Informatics Technology, Institut Teknologi Sepuluh Nopember, Surabaya 60111, Indonesia
b Informatics Study Program, Faculty of Mathematics and Natural Sciences, Udayana University, Badung 80361, Indonesia
c Old Javanese Literatures Study Program, Faculty of Humanities, Udayana University, Badung 80361, Indonesia
⁎ Corresponding author. diana@its.ac.id
08 8 2024
10 2024
08 8 2024
56 11078130 4 2024
23 7 2024
24 7 2024
© 2024 The Author(s)
2024
https://creativecommons.org/licenses/by-nc/4.0/ This is an open access article under the CC BY-NC license (http://creativecommons.org/licenses/by-nc/4.0/).
Automatic narrative text analysis is gaining traction as artificial intelligence-based computational linguistic tools such as named entity recognition systems and natural language processing (NLP) toolkits become more prevalent. Character identification is the first stage in narrative text analysis; however, it is difficult due to the diversity of appearances and distinctive characteristics among regions. Further challenging analyses, such as role classification, emotion and personality profiling, and character network development, require successful character identification initially, which is crucial. Because there are so many annotated English datasets, computational linguistic tools are mostly focused on English literature. However, there are restricted tools for analyzing Balinese story texts because of a scarcity of low-resource language datasets. The study presents the first annotated Balinese story texts dataset for narrative text analyses, consisting of four sub-datasets for character identification, alias clustering (named entity linking, alias resolution), and character classification. The dataset is a compilation of 120 manually annotated Balinese stories from books and public websites, spanning multiple genres such as folk tales, fairy tales, fables, and mythology. Two Balinese native speakers, including an expert in sociolinguistics and macrolinguistics, annotated the dataset using predetermined guidelines set by an expert. The inter-annotator agreement (IAA) score is calculated using Cohen's Kappa Coefficient, Jaccard Similarity Coefficient, Mean F1-score to measure the level of agreement between annotators and dataset consistency and its reliability. The first subdataset consists of 89,917 annotated words with five labels referring to the Balinese-character named entities. Each character entity's appearance in 6,634 sentences is further annotated in the second subdataset. These two sub-datasets can be used for character identification purposes at the word and sentence level. The list of character groups which are groups of various aliases for each character entity has been annotated in the third subdataset for alias clustering purposes. The third subdataset contains 930-character groups from 120 story texts with each story text containing an average of 7-to-8-character groups. In the fourth subdataset, 848-character groups—of the 930-character groups in the third subdataset—have been categorized as protagonists and antagonists. The protagonists (66.16 %) make up most character groups, with the antagonists (33.84 %) making up the rest of the groups. The fourth subdataset can be used for computing-based classification of characters into two roles between protagonist and antagonist. These datasets have the potential to improve research in narrative text analyses, especially in the areas of computational linguistic tools and advanced machine learning (ML) and deep learning (DL) models in low resource languages. It can also be used for further research including character network development, character relationship extraction, and character classification beyond protagonist and antagonist.

Keywords

Automatic narrative text understanding
Computational linguistic
Named entity recognition
Character identification
Character extraction
Alias clustering
Named entity linking
Character classification
==== Body
pmcSpecifications TableSubject	Computer Science, Natural Language Processing	
Specific subject area	Named Entity Recognition, Narrative Text Analysis, Applied Machine Learning	
Data format	Raw, Filter, Analyzed	
Type of data	*.txt (text files), *.xlsx (spreadsheet files), *.pkl (cross-validation split results in python pickle object format)	
Data collection	A total of 120 Balinese story texts were manually obtained by digitizing a collection of story texts in books [1] as well as web-scraping on two digital sites [2,3] using the Python programming. The title and content of the story text are saved into a text file. After obtaining the raw dataset, it is preprocessed and reformatted as necessary before two annotators annotate it. Microsoft Excel software is used in the labeling procedure. Before the comprehensive data annotation process, four and twenty story texts were randomly selected as samples at the pilot and independent annotation stages to measure the level of agreement between annotators and the reliability of the annotation results. The remaining 96 texts were annotated independently by the two annotators using 48 texts each, following expert guidelines, after they met the threshold agreement (>0.81). This produced four gold-standard annotation datasets that were used for character identification, alias clustering, and protagonist vs antagonist character classification.	
Data source location	There have been efforts to compile the Balinese story texts into a book and digital site that can be accessed publicly. The content of the story text can differ from one source to another depending on how the story is told by the storyteller. The primary data sources for the 120 story texts used in this study are web-scraped from public websites (https://msatuabali.blogspot.com/ and https://satua-bali.blogspot.com/) [2,3] and manually digitized from books [1].	
Data accessibility	Repository named: Balinese Story Texts Dataset - Characters, Aliases, and their Classification (Mendeley Data)
Data identification number: 10.17632/h2tf5ymcp9.4
Direct URL to data: https://data.mendeley.com/datasets/h2tf5ymcp9/4	

1 Value of the Data

• Balinese Story Texts Dataset has been carefully annotated by experts and Balinese native speakers for three main purposes of narrative text analysis in Balinese, such as character identification, alias clustering, and protagonist vs antagonist character classification; and its consistency has been measured by inter-annotator agreement. To the best of the author's knowledge, this dataset is the first annotated story text dataset in Balinese for these purposes and can be used publicly [4].

• Using the list of identified characters in this dataset, we think this dataset is also useful for other types of narrative text analysis, such as character-network graph development [[5], [6], [7]], character classification into dimensions other than protagonist vs antagonist (such as character personality profiling) [8,9], or generating new Balinese story texts.

• Researchers, practitioners, and the NLP community with an interest in text processing in low-resource languages can utilize this dataset to create state-of-the-art models of automatic narrative text analysis in Balinese with statistical methods, ML, DL, and other approaches, Consequently, this presents chances to enhance the performances of the prior state-of-the-art model (called SatuaNER) for Balinese character identification [10].

2 Background

Characters are a crucial element in a narrative text [11]. Characters are typically human and described as first-person proper noun [[12], [13], [14]] s, but they can also be nominals (e.g., her mother), non-human animated creatures (e.g., a crocodile), inanimate objects (e.g., a talking car), or imaginary creatures (e.g., mermaids) [11,13,15]. Character identification is the first and crucial task in narrative text analysis before other analyses can be carried out, such as character role classification [8,16] (e.g., protagonist vs antagonist, major vs minor, main vs supporting) or profiling the character's emotions and personality [8,9]. However, automatic character identification in narrative text still poses challenges because characters can consist of various entities and are not only presented person proper nouns. Furthermore, story text writers often write a character using various writing techniques (with and without capitalization) and aliases (e.g., Sherlock Holmes, Holmes, and Mr. Holmes refer to the same character) [13,17]. As a results, alias clustering (grouping various aliases of a character entity into the same group) is also needed as part of character identification.

NER can be used to recognize character named entities that appear in the text, which is one method of automatic character identification in text. At this point, we have not seen a study discussing the use of deep learning as a state-of-the-art model for character entity recognition in high-resource language texts. Deep learning is one of the state-of-the-art models that may be used for NER to recognize many types of entities [[18], [19], [20], [21], [22], [23]]. As in earlier studies for character identification in English narrative texts [11,12,15,24], even the NER model for character entity recognition still employs traditional machine learning models like Support Vector Machine (SVM) with a Radial Basis Function (RBF) kernel.

Nevertheless, adequate annotated data sets are still needed for the development of narrative text analysis models. Character identification model has primarily relied on datasets that are limited to English language text literature [6,7,11,12,15,[24], [25], [26], [27], [28]]. As a result, creating automatic character identification models for non-English narrative texts is limited. In fact, an extensive number of narrative texts from different nations—such as Balinese story texts—are written in non-English and have their distinctive characteristics. Therefore, this paper proposes the first annotated dataset of Balinese story texts named Balinese Story Texts Dataset for character identification, alias clustering, and classifies each character group into protagonists or antagonists.

3 Data Description

The Balinese Story Texts Dataset in this paper has annotated 120 story texts for more diverse narrative text analyses, such as character named entities recognition (89,917 tokens), character extraction (6634 sentences), alias clustering (930-character groups), and character classification (848-character groups). This contrasts with the corpus used in Bimantara et al. [10], which consists of 45 story texts (39,781 annotated tokens) that have been specifically annotated for the purpose of recognizing character named entities only. Building on the NER corpus from previous work, we expand the annotation results from the NER corpus into the Balinese Story Texts Dataset in this research (see charsNamedEntity (1st Dataset) Subdirectory section).

3.1 Main directory structure

There is a main directory called BalineseStoryDataset and a readme file in our dataset. A list of 120 story text titles used is stored in the readme file. The directory structure of this dataset is shown in Fig. 1. There are six subdirectories in this main directory: raw, preprocessed, charsNamedEntity, charsExtraction, charsAliasClustering, and charsClassification. Table 1 displays the number of files in each subdirectory, with detailed explanations in respective subchapters.Fig. 1 Directory structure of Balinese story texts dataset.

Fig 1

Table 1 The amount of data per subdirectory in the dataset. The subchapters of each subdirectory provide a more extensive description.

Table 1Files path location relative to root folder	Data type	Number of files	Data description	
/raw/	Text files (*.TXT)	120	Each filename is the title of the story text used	
/preprocessed/	
/charsNamedEntity/	Text files (*.XLSX)	3	Spreadsheet file containing the entire first dataset (all.xlsx) as well as training data (trainNE.xlsx) and test data (testNE.xlsx) which have been divided.	
/charsNamedEntity/cv/	Python pickle object (*.PKL)	10	Splitting results of training data in the file trainNE.xlsx in the charsNamedEntity subdirectory into 10-fold cross-validation	
/charsExtraction/	Text files (*.XLSX)	120	Each filename is the title of the story text used	
/charsExtraction/train/	1	Spreadsheet files containing training data and test data for character identification at sentence level	
/charsExtraction/test/	1	
/charsExtraction/cv/	Python pickle object (*.PKL)	10	Splitting results of training data in the file train.xlsx in the /charsExtraction/train/ subdirectory into 10-fold cross-validation	
/charsAliasClustering/	Text files (*.XLSX)	120	Each filename is the title of the story text used	
/charsClassification/	120	
/charsClassification/train/	1	Spreadsheet files containing training data and test data for character classification into protagonist or antagonist	
/charsClassification/test/	1	
/charsClassification/cv/	Python pickle object (*.PKL)	10	Splitting results of training data in the file train.xlsx in the /charsClassification/train/ subdirectory into 10-fold cross-validation	

3.2 Raw subdirectory

Raw datasets obtained from web scraping and digitizing story texts from books with a total of 120 story texts are stored in this subdirectory in TXT file format. The story's title and content are information that was taken out of the data collection procedure. The files are named by the text title, and the contents of each story are contained in each file. Table 2 displays an illustration of the raw story text named ``Anak Ririh'' in “Anak Ririh.txt” file.Table 2 A sample paragraph from raw and preprocessed story text named “Anak Ririh”.

Table 2Raw dataset (before preprocessing)	
	
Pan Karsa ajaka pianakné muani nanggap upah ngaé sémér di sisin rurungé gedé. Uli semeng maka sanja ia ajaka dadua tusing marérén magaé, sajawaning di nuju madaarné. Kenehné apang gegaéné énggal pragat, tur lantas nampi upahné. Telung dina ia magaé tan parérénan, séméré suba dalem, ngantiang pragat. Kendelné tara bakat ban nuturang. Buin awai magaé, pedas ia bakal nampi upah liu.	
	
Preprocessed	
	
Pan Karsa ajaka pianakne muani nanggap upah ngae semer di sisin rurunge gede .\n Uli semeng maka sanja ia ajaka dadua tusing mareren magae sajawaning di nuju madaarne .\n Kenehne apang gegaene enggal pragat tur lantas nampi upahne .\n Telung dina ia magae tan parerenan semere suba dalem ngantiang pragat .\n Kendelne tara bakat ban nuturang .\n Buin awai magae pedas ia bakal nampi upah liu .\n	
	
English translated	
	
Pan Karsa and his son received wages to make a well on the side of a large corridor. From morning to evening, they didn't stop working except when they were eating. He thought that he would finish his work quickly and get his wages. For three days he worked non-stop, the well was already deep, just waiting for it to be finished. The joy cannot be expressed. One more day of work, he will receive a lot of wages.	

3.3 Preprocessed subdirectory

This subdirectory contains 120 preprocessed raw datasets, which are saved using the same filename and structure as the raw subdirectory. An illustration of the preprocessed story text named ``Anak Ririh'' can be found in Table 2.

Fig. 2, Fig. 3, Fig. 4 provide general information and statistics regarding 120 Balinese story texts that we have preprocessed and analyzed. The majority of story texts have a relatively small number of words, in the range 100–900, while others consist of a relatively larger number of words, more than 900. This is positively correlated with the range of sentences in the majority of story texts which consist of only 10–60 sentences, while the rest have more than 60 sentences. The average sentence length used is in the range 6–26, where the average sentence length from 12 to 14 are most often found.Fig. 2 Statistical information from 120 Balinese story texts (Part I).

Fig 2

Fig. 3 Statistical information from 120 Balinese story texts (Part II).

Fig 3

Fig. 4 Statistical information from 120 Balinese story texts (Part III): Word cloud visualization in Balinese (left side) and English (right side).

Fig 4

Fig. 3 displays a list of 15 stopwords with the highest frequency from 120 story texts in the preprocessed subdirectory. The word I (Balinese male gender article) is most often found because the majority of story texts use this male gender article to mark character entities besides the article sang (title of respect for important or holy people typically man). Pronouns such as ida and ia (he, she, it); prepropositions such as di (in, on, at) and ring (for, to, at, on, in); and conjunctions such as tur (and) and teken (with, by, than) appear as stopwords. The word Ni (Balinese female gender article), which is similar to the word I, is relatively less frequently used to name character entities in Balinese story texts.

Words such as kacerita (there's a story, told, be told), lakar (will), lutung (monkey), icang (me, I), and masaut (answer, reply, respond) are most often used as in Fig. 4 wordcloud visualization. The 2-gram and 3-gram words visualizations (Fig. 3) show character entity phrases which are the frequently found proper nouns in the dataset, such as ida sang, raden galuh, raden mantri, sang prabu, anake agung, sang prabhu, sang hyang, ida betara, ida raden mantri, ida sang prabu, ida raden galuh, ida anake Agung, and pan angklung gadang.

3.4 charsNamedEntity (1st dataset) subdirectory

The first dataset can be used as ground truth to train a character named entity recognition model at the word (term) level. All text in the preprocessed subdirectory is then formatted into tables (the table in this paperʼs explanation is represented in Python as a DataFrame1). Format adjustments were implemented by separating each word in each sentence of the story text into a distinct line of data. The next step is to label each word to determine whether it is a component of a character entity or not, so that it can be used as training input data in ML or DL models. The formatted dataset is then stored in the charsNamedEntity subdirectory. Table 3 displays the definition of each column in the first formatted dataset.Table 3 Columns description in the all.xlsx, trainNE.xlsx, and testNE.xlsx files of the first dataset, as well as possible values for those columns.

Table 3Column	Description	Type	
StoryID	The primary key of each story text title represented by StoryTitle.
Example: 34	Integer	
StoryTitle	The title of the story text has been formatted in lowercase and connected with an underscore.
Example: i_siput_lawan_i_kancil (The Snail vs The Mouse Deer)	String	
SentenceID	A primary key of the sentence referred to by each word in a StoryTitle.
Example: 12	Integer	
Word	Each sentence's constituent Balinese words (SentenceID) in a story text have been divided into a single line of data.
Example: Siput (snail)	String	
POS Tag	The part-of-speech (POS) label of each Word. This value is filled in automatically with pretrained Hidden Markov Model (HMM) POS Tagger from previous research [30].
Example: NN (noun)	Categorical	
Character Named Entity (CHAR NE) Tagset	A label is used to mark words in Word as whether they are character-named entities (CHAR NE) or not with BIO format (see Data Annotation section).
Example: I-ANM	Categorical	

The first dataset consists of five classes or characteristics indicating whether the words are part of a character named entities (CHAR NEs) or not based on Balinese story texts. Further description for these characteristics is provided below.

PNAME: a character (usually human) is named using person proper nouns which are derived from the morphological structure of naming persons2 on the island of Bali [29] (e.g., I Made Satria Bimantara has a male gender article marked with “I” and is the second child marked with “Made”).

ANM: a non-human animated entity such as animals and plants can also be a character in story texts, especially in fable literature (e.g. Sang Macan or The Tiger).

GODS: a character might also use the proper noun as a reference to God's existence or to be divine in Hinduism (e.g., Sang Hyang Bhatara Wisnu or Visnu).

ADJ: Comparable to the proper noun context for the GODS label, we utilize the ADJ label to recognize a character entity that employs a proper noun in a certain situation. A character entity in Balinese story texts may be given a name in the form of a proper noun by the author or by a third party (the society) based on the character's attributes, features, or circumstances rather than the character entityʼs original personal proper noun.

For instance, a character entity that possesses diligence is called I Jemet (the word “jemet” means diligent and in Balinese, the prefix “I” before the word denotes that it is a proper noun). In addition, the male character entity is referred to as Pan Bekung if it is unable to procreate (“bekung” is Balinese for not being able to have children and has a male gender article called “Pan”, which is equal to “Mr.” in English). Other examples are I Menceng, which means the talkative; Men Sugih, which means rich and has a feminine gender article in Balinese called “Men”, which is equal to “Mrs.” in English; I Polos which simply means the innocent; I Tamak, which means the greedy; “I Belog”, which means the foolish; and so on.

OBJ: the appearance of character entities in Balinese story texts also often use nominals (e.g. cening means son; bapa means father; meme means mother) or pronoun phrases (e.g. anake tua ento means that old man; memene means his/her mother; pianakne means his/her son; punyan wit kepuhe ento means that parakeet tree; pisagane I Kerug means I Kerugʼs neighbors) rather than mentioning the proper noun of the characters. Balinese does not recognize gender-specific personal pronouns like English (he or she). Personal pronouns in Balinese (e.g. ida, ia, and ipun similar to he/she in English) can be used to replace person entities of male or female gender; and it definitely refers to animate entities, whether they be PNAME, ANM, or GODS, so we do not focus on labeling Balinese personal pronouns as character entities because this can be done using a simple rule approach, for instance by string matching using a personal pronoun dictionary. The addition of demonstrative pronouns in Balinese such as ento (comparable to that or those in English) is often also used to refer to a character entity without a proper noun by combining it with a particular noun, for example reramane ento (that parents), dagang nasine ento (those rice seller), prabune ento (that king), and sipute-sipute ento (those snails).

There are three main files in *.XLSX format, as well as one subfolder called cv. The all.xlsx file contains a total of 89,917 annotated words from 120 story texts. The proposed data set has also been equipped with training and test dataset which have been divided from the all.xlsx file and stored in the trainNE.xlsx and testNE.xlsx files respectively. The GroupShuffleSplit3 method is used to divide all.xlsx into training data (70 %) and test data (30 %) randomly based on the SentenceID column, so that words from the same SentenceID can be ensured to be in the same data subset and not separated.

The first dataset is also equipped with 10-fold cross-validation data split from trainNE.xlsx, using the same split method, and saved in the cv subfolder for the purpose of validating the generalization of model performance. There are 10 files, each file consists of a subset of training folds and validation folds which have the same DataFrame structure as the previous three files but are saved in the *.PKL4 extension. The pickle.loads()5 function is used to load each file in the cv subfolder using Python programming language.

Fig. 5 displays general statistics on the number of words that referring to CHAR NEs. There are 74,767 words that are not character entities (marked with the label O), while the rest are character entities. Most of character entities are displayed in the form of PNAME, but other character entities such as ANM are also found most frequently because the fable literature is quite common in the dataset.Fig. 5 Statistics on the number of words corresponding to CHAR NEs label in the first dataset.

Fig 5

The number of words including character entities in more detail with the prefix BIO (see Data Annotation section) is also shown in Fig. 5. The number of CHAR NEs label with the prefix I- (part of an entity) on the PNAME, GODS, and ADJ labels is relatively greater than the number of prefix B- (beginning of an entity) on each label (e.g., the number of I-PNAME label is 3110 more than the number of B-PNAME of 2507). This is in accordance with the complexity of the proper nouns used to name a character entity. For instance, a character entity with a PNAME label named I Gusti Ngurah Sugriwa has a number of B-PNAME labels of one (word I) and a number of I-PNAME labels of three (words Gusti, Ngurah, and Sugriwa); Likewise for the GODS and ADJ labels.

The character entity in the form of PNAME as shown in Fig. 6 is dominated by male rather than female gender which is characterized by the frequent use of the words I, Pan (Mr.), and Sang. Words to represent character entities with female gender, such as Ni (article for women belonging to the Sudra caste), Luh (term of address for a young girl), and Galuh (princess) are generally fewer than male gender. The word I is the most frequently used in almost all CHAR NE labels (except OBJ where word I is in the fourth rank).Fig. 6 Top 15 most common words per CHAR NE label in the first dataset (Part I).

Fig 6

The article or pronoun words such as Ida (third-person singular pronouns for people who are respected or to “Gods”; brahmin title) is most often used to name character entities with the label GODS in Fig. 6. For instance, Ida Bhatara Siwa (Siva), Ida Bhagawan (priest Ksatriya priest), and Ida Sang Hyang Widhi (God as the unification of all manifestations of god into one single, all-powerful god, more or less equivalent to the Christian God and the Islamic Allah). The word sang is also often used to name character entities labeled GODS, such as Sang Hyang Rudra (Lord Rudra) and Sang Hyang Indra (Lord Indra is symbolized as the god of rain who provides prosperity and prosperity). Apart from hero characters in the form of GODS, character entities such as Raksasa and Rangsasa (general name for a varied class of large and fearful demons) who are villains (a cruelly malicious character who is involved in or devoted to wickedness or crime) also appear most often on the character entity labeled GODS.

The three animals that most frequently appear as character entities labeled ANM are Lutung (monkey), Macan (tiger), and Sampi (cow, cattle) with a total appearance of more than 80 times in Fig. 7. The appearance of the words I (with capital letter) and i (without capital letter) on the ANM label shows that story writers often write character entities with different writing styles or orthographies, for example I Lutung (with capital letter) and i lutung (without capital letter). Other animal variations that also often appear as character entities labeled ANM include cicing (dog), Kancil (mouse deer), kedis (bird), Angsa (swan or goose), and Bikul (mouse).Fig. 7 Top 15 most common words per CHAR NE label in the first dataset (Part II).

Fig 7

Adjectives or circumstances such as Belog (stupid, ignorant, not able to do something well), Tamak (greediness), Tiwas (indigent), Menceng (choosy, talkactive), Polos (to be honest or truthful; undecorated; lacking in pretensions; plain; bald; to be decent, straightforward), Sugih (rich), Getap (coward), Bekung (people who are unable to have children), Lacur (unlucky person), Lengar (balding head), and Buta (blind) most often appear to name a character entity with the ADJ label as shown in Fig. 7. Article words such as I, Men, and Pan are most often used as initial words of a character entity (prefix B-) labeled ADJ, for example I Belog (The Stupid), Men Tiwas (Mrs. Indigent), and Pan Bekung (a man or Mr. who is unable to have children).

Pronoun phrases such as anake ento (that person), memene (his/her mother), pianakne (his/her son) most often appear as character entities with the label OBJ, namely more than 80 times as in Fig. 7. Apart from that, nominals such as meme (mother), Cening (son or daughter), bapa (father), pianak (children), Beli (second person singular; brother), and luh (female; term of address for a young girl) is also most often used as a character entity labeled OBJ. Words that are not character entities in Fig. 7 mostly consist of stopwords in Fig. 3.

Tables 4 and 5 displays the number of words in each CHAR NE label contained in the entire data (all.xlsx), training data (trainNE.xlsx), test data (testNE.xlsx), and cross-validation data (each fold file in cv subfolder) in the first dataset. The training data (trainNE.xlsx) and test data (testNE.xlsx) respectively consist of 59,522 and 30,395 annotated words that are character entities (CHAR NEs) or not. Most of annotated words, around 83 % in the files all.xlsx, trainNE.xlsx and testNE, are not character entities (label O), while the remaining 17 % are CHAR NEs. Most of these three files are dominated by PNAME labels, amounting to 5617, 3708, and 1909 annotated words respectively in the all.xlsx, trainNE.xlsx, and testNE.xlsx files. The second place is occupied by character entity with ANM labels of 5032, 3333, and 1699 annotated words for the three files respectively. The same thing can also be seen from the composition of the number of words annotated with the CHAR NEs label in the cross-validation data in each training fold and validation fold. There are 3041 and 2901 words annotated as PNAME and ANM respectively in the first training fold, while in the first validation fold it consists of 667 and 432 words annotated as PNAME and ANM respectively.Table 4 The number of annotated words per CHAR NE label is included in the all.xlsx, trainNE.xlsx, and testNE.xlsx files in the first dataset.

Table 4Data (file)	Balinese CHAR NEs label	Percentage non-character entity (O)	Total	
ADJ	PNAME	GODS	ANM	OBJ	O	
All (all.xlsx)	842	5617	1014	5032	2645	74,767	83.151 %	89,917	
Train (trainNE.xlsx)	559	3708	651	3333	1766	49,505	83.171 %	59,522	
Test (testNE.xlsx)	283	1909	363	1699	879	25,262	83.112 %	30,395	

Table 5 The number of words per CHAR NE label in the training and validation fold in the cv subfolder of first dataset.

Table 5CHAR NEs label	x-th Training Fold	
1	2	3	4	5	6	7	8	9	10	
ADJ	485	418	454	459	514	460	511	389	432	401	
ANM	2901	2617	2760	2646	2967	2608	2950	2374	2584	2455	
GODS	565	508	518	519	592	516	558	490	526	454	
OBJ	1467	1292	1428	1428	1592	1450	1583	1271	1329	1276	
PNAME	3041	2808	3075	2985	3348	3037	3212	2660	2751	2738	
	
CHAR NEs label	x-th Validation Fold	
1	2	3	4	5	6	7	8	9	10	
	
ADJ	74	141	105	100	45	99	48	170	127	158	
ANM	432	716	573	687	366	725	383	959	749	878	
GODS	86	143	133	132	59	135	93	161	125	197	
OBJ	299	474	338	338	174	316	183	495	437	490	
PNAME	667	900	633	723	360	671	496	1048	957	970	

Fig. 8 displays the number of word occurrences on each POS Tag label which is generated automatically by the pretrained HMM model from previous research [30] (see Data Annotation section). Most of word classes in story texts used are nouns and verbs, namely more than 25,000 and 12,600 words respectively. Fig. 12 also shows that the pretrained HMM model [30] erroneously categorized several words with corresponding POS Tag label. For instance, words such as kone (perhaps), ban (by), sawireh (since), ngomong (talk), and so on are classified as punctuations which are incorrect. In addition, the word makejang (all of anything, every) is wrongly categorized as NNP when it should be a classifier (NND). Words such as pan, luh, agung, raden, and bintang have the highest number of occurrences in the NNP class (Fig. 9) which are also the words with the highest number of occurrences in the PNAME label as in Fig. 6. Some words with the NNP class such as men (Mrs.), belog (stupid, foolish), hyang (term to refer to a god or a person of high religious standing), kedis (bird), and sampi (cow) in Fig. 9 specifically also appears as words that are among the character entities with the highest frequency of appearance on the labels ADJ (men and belog), GODS (hyang), and ANM (kedis and sampi) as shown in Figs. 6 and 7.Fig. 8 Statistics on the number of words per POS Tag label in the first dataset.

Fig 8

Fig. 9 Top 15 most common words per Part-of-speech label in the first dataset (Part I).

Fig 9

3.5 charsExtraction (2nd dataset) subdirectory

The second datasetʼs annotation consists of capturing all the lists of character entities identified in each sentence of each story text. The list of identified character entities per sentence in each story text from the preprocessed subdirectory is then stored in the charsExtraction subdirectory as a second dataset. This dataset can be used as ground truth in developing rule-based or deterministic character identification models without a model training phase. This dataset can be used for the same purposes as the first dataset namely character identification, but at the sentence level with a different approach, model, and perspective (Figs. 10 and 11).Fig. 10 Top 15 most common words per Part-of-speech label in the first dataset (Part II).

Fig 10

Fig. 11 Top 15 most common words per Part-of-speech label in the first dataset (Part III).

Fig 11

Fig. 12 Top 15 most common words per Part-of-speech label in the first dataset (Part IV).

Fig 12

The list of identified character entities per sentence from each 120 story texts is then saved in a spreadsheet *.XLSX file. There are four main columns for each *.XLSX file in this subdirectory. Table 6 displays the definition of each column in the second dataset. The second data set is also equipped with a subset of training and test data, each of which is stored in the train and test subfolders with the same table format as shown in Table 6. The division of sentences as a subset of training data and test data in this subdirectory follows the splitting results of training data and test data in trainNE.xlsx and testNE.xlsx from the first dataset by referring to the StoryID and SentenceID column in each data subset. For example, if all the words with a SentenceID=128 from a text story entitled “Arjuna nangun Tapa” (StoryID=2) become training data in trainNE.xlsx file, then this sentence with a SentenceID=128 also become training data in the charsExtraction subdirectory, as well as for a subset of test data. This was done to make sure the character identification model, which was trained on the first dataset's trainNE.xlsx file and assessed at the sentence level on the second dataset's test.xlsx file, performed unbiased.Table 6 Columns description in all *.XLSX files in the second dataset.

Table 6Column	Description	Type	
SentenceID	A primary key of the Sentence column. The first SentenceID index in each story text begins with zero.
Example: 3	Integer	
Sentence	A sentence is a segment of text or a collection of words in Balinese separated by period punctuation marks.
Example: I Siput lantas ngajak I Kancil matanding malaib ngitarin alase. (The Snail then invited The Mouse Deer to race around the forest.)	String	
TotalCharacters	The number of character entities identified in a sentence.
Example: 2	Integer	
ListCharacters	List of character entities identified in a sentence separated by semicolons. If there are no character entities in the corresponding sentence, then fill it with NULL or NaN.
Example: I Siput; I Kancil	String or NULL	

A total of 6634 sentences have been annotated from all 120 spreadsheet files in the charsExtraction subdirectory. The proportion of sentences as training data (in ./train/train.xlsx file) and test data (in ./test/test.xlsx file) is 4407 and 2227 respectively. There are at least zero-character entities and a maximum of fifteen-character entities identified in each sentence.

Apart from that, the charsExtraction subdirectory is also equipped with 10-fold cross-validation data which is split from the train.xlsx file in this subdirectory's train folder using the same method as the previous division of training data and test data. The splitting results (10 .PKL files) are saved in this subdirectory's cv subfolder. Each fold contains a subset of training folds and validation folds, which have the same table format as in Table 6. Table 8 displays the number of annotated sentences in the cross-validation data for this subdirectory. There are 3744 and 663 sentences that have been annotated in the form of a list of identified character entities in the first training and validation fold respectively.

3.6 charsAliasClustering (3rd dataset) subdirectory

The mention of a character entity in Balinese story texts often uses various aliases, even though they all refer to the same character entity (e.g., Ida Sang Prabu Aji Dharma, Prabu Dharma, Sang Aji Dharma, Ida Aji Darma, and Sang Prabu Aji refer to the same character entity). Therefore, we group the same character entity with their various aliases into one group in this third dataset. The term “character group” refers to a collection of various aliases that refer to the same character entity in each story as illustrated in Fig. 13. This dataset can be used as ground truth in developing a model for alias clustering (as known as alias resolution and named entity linking) task in Balinese story texts.Fig. 13 Illustration of a list of character groups formed in the story text entitled “Lutung dadi Pecalang” (Monkeys become the customary police).

Fig 13

The charsAliasClustering subdirectory contains 120 spreadsheet files in *.XLSX format, where each file contains a list of character groups. We group the same character entity with their various aliases, utilizing all identified character entities from the charsExtraction subdirectory. There are two columns in each file in this subdirectory, as shown in Table 7.Table 7 Columns description in each *.xlsx file in the third dataset.

Table 7Column	Description	Type	
CharactersID	A primary key of any character group (each character entity and their various aliases).
Example: Tokoh-1 (Character-1)	Unique String	
AliasCharacters	List of all aliases of the same character entity. Each alias is separated by a comma.
Example: Sang Arjuna, I Arjuna, Arjunane	String	

Table 8 Number of annotated sentences in the second datasetʼs cross-validation data.

Table 8Type	x-th Fold	
1	2	3	4	5	6	7	8	9	10	
Training Folds	3744	3370	3602	3535	3969	3544	3868	3218	3352	3197	
Validation Folds	663	1037	805	872	438	863	539	1189	1055	1210	

Figs. 14 and 15 displays statistical information on the third dataset. In total, there are 930-character groups (characters and their aliases) that have been grouped in the third dataset. The number of character groups in the third dataset ranges from 1 to 20 groups. Only 2 and 3 story texts have several character groups in the range of 22–25. An average of 7 and 8-character groups exist out of 120 story texts. Character groups can have 1 to 15 aliases with an average of 2 aliases. The average number of aliases in each character group per story text ranges from 1 to 6. Most of the story texts have an average of 2 to 3 aliases in each character group.Fig. 14 Character groups statistics in the third dataset (Part I).

Fig 14

Fig. 15 Character groups statistics in the third dataset (Part II).

Fig 15

Generally, story texts in the fable genre (such as I Lutung teken Kancil (The Monkey with Mouse Deer), I Lutung teken Baduda (The Monkey with Ground Beetle), I Lutung maborbor (The fire monkey), I Alu teken I Kedis Puuh (The Lizard with The Quail Bird), and so on) have fewer groups of characters than story texts with genres of folklore, mythology and legends (such as Bintang Lara, Sang Bima dadi caru (The Bima became an offering), Ni Dukun Sakti, and so on). This is not in line with the average number of aliases in a group used by story writers. For instance, the text entitled I Bojog teken I Kedis Sangsiah (The Monkey with The Golden-headed Cisticola) which has two-character groups turns out to be in the top 15 stories with the highest number of aliases in each character group on average (an average of 5 aliases per character group); Likewise for the story text entitled I Alu teken I Kedis Puuh.

3.7 charsClassification (4th dataset) subdirectory

The charsClassification subdirectory contains the classification of each character group that have been annotated in the charsAliasClustering subdirectory into protagonists or antagonists. This dataset can be used as ground truth in developing computing-based character classification models, such as using ML or DL. This dataset only provides a list of character groups and their classification labels as protagonists or antagonists; and does not provide a list of text features but provides an open opportunity for other researchers to explore various features to be able to classify the list of characters, such as hand-crafted features or word vector features such as TF-IDF and word embedding [16].

The classification annotation results for each character group from 120 spreadsheet files are saved in the same *.XLSX format as explained in Table 7, with the addition of Class column representing the classification labels. The fourth dataset is also equipped with a subset of training data (70 %) and test data (30 %), each stored in the train and test subfolders with the same *.XLSX format as in the earlier explanation. Using the train_test_split6 method, this dataset was divided between training and test dataset based on the percentage of protagonist and antagonist classifications. The character group labeled General (see Data Annotation section) was excluded prior to the splitting process because the goal of this fourth dataset was to divide the character groups into just two characterizations. Therefore, there are 848-character groups in the fourth dataset that have been classified into protagonists or antagonists.

The charsClassification subdirectory is also equipped with 10-fold cross-validation data which is split from the train.xlsx file in this subdirectory's train subfolder using the StratifiedKFold7 method. The cv subfolder in this subdirectory contains 10 files, each of which is saved in *.PKL format. Each file contains a subset of training and validation folds that have the same data structure as explained in Table 7, with the addition of the Class column.

Tables 9 and 10 display the classification results for each character group in the charsClassification subdirectory. Out of the 848-character groups classified in the fourth dataset, 561 and 287 are protagonists and antagonist, respectively. In the training data, the protagonist and antagonist character groups were divided 392 and 201, respectively, whereas in the test data, they were divided 169 and 86. In the first training fold, there were 352- and 181-character groups as protagonists and antagonists, respectively. In the first validation fold, there were 40- and 20-character groups as protagonists and antagonists, respectively. The number of protagonist and antagonist character groups are imbalanced (66.16 % to 33.84 % respectively). This may present opportunity for subsequent researchers to develop sampling or augmentation strategies for text data for each character group to achieve a balanced class.Table 9 The proportion of 848-character groups that have been classified into protagonist or antagonist labels is used as training data and test data in the fourth dataset.

Table 9Data subset (filename)	Protagonist (%)	Antagonist (%)	Total (%)	
Train set (train/train.xlsx)	392 (≈66.10░%)	201 (≈33.90░%)	593 (≈70░%)	
Test set (test/test.xlsx)	169 (≈66.27░%)	86 (≈33.72░%)	255 (≈30░%)	
All (train.xlsx + test.xlsx)	561 (≈66.16░%)	287 (≈33.84░%)	848 (100 %)	

Table 10 Number of the protagonist and antagonist groups in the fourth dataset's cv subfolder.

Table 10Class Label	x-th Training Fold	
1	2	3	4	5	6	7	8	9	10	
Protagonist	352	352	353	353	353	353	353	353	353	353	
Antagonist	181	181	180	181	181	181	181	181	181	181	
	
Class Label	x-th Validation Fold	
	
1	2	3	4	5	6	7	8	9	10	
	
Protagonist	40	40	39	39	39	39	39	39	39	39	
Antagonist	20	20	21	20	20	20	20	20	20	20	

4 Experimental Design, Materials and Methods

4.1 Data collecting

The Balinese story texts annotated in this study was acquired through manual text digization from books [1] and web-scraping from public websites [2,3] which provide the content. We use BeautifulSoup48 package and the Python programming version 3.8.59 for web-scraping and data analyses respectively. Only the title and content of the story text are extracted. As a first step toward creating the Balinese Story Texts Dataset, a total of 120 raw Balinese story texts were taken out. Each raw story text is then saved in the raw subdirectory in *.TXT format.

4.2 Data preprocessing

The goal of the preprocessing step is to remove any unnecessary text information from a collection of story text results in the raw subdirectory. At this point, regular expressions,10 strings,11 and NLTK12 are the packages being used. These phases consist of the following elements.1. remove HTML tags and URL links from web-scraped texts,

2. convert non-ASCII characters in Balinese text such as ‘é', ‘é', ‘è', ‘é', ‘é', ‘é', ‘é', ‘é', ‘ê', ‘ë', ‘é', ‘ì','í', ‘û', ‘å', and so on into the nearest ASCII character equivalent to it,

3. correct typographical errors manually,

4. convert strings \\n, \\u, \\r, \\x, and “\\” to an empty string,

5. convert multiple tabs to single whitespace,

6. replace punctuation marks ‘?’, ‘!’, ‘…’, and ‘„„’ to empty strings,

7. change the punctuation mark ‘–‘ to ‘-‘,

8. convert the punctuation ‘..' to ‘.'

9. removes the list of punctuations as follows ‘“#$%&\'()*+/:;≤>@[\\]^_`{|}∼,”“’‘“' as well as non-ASCII punctuations,

10. eliminate Balinese expressions or exclamations, such as “Prrrr”, “Brrr.”, “biarrrr”, “Pruaakkk”, and others,

11. add enter (\\n) at the end of the dot (.),

12. remove extra whitespace at the beginning and end of the text, as well,

13. convert multiple whitespaces in text to single whitespace.

4.3 Data annotation

The data annotation process for the four datasets in this research was carried out using double annotation by two annotators. The annotator team consisted of a postgraduate student in Informatics Engineering (first author) and an expert (fourth author). Both are native Balinese speakers and are fluent in understanding Balinese story texts. The expert involved is graduates of Masters in Linguistics who have expertise or research interests in the fields of sociolinguistics and macrolinguistics and work as lecturers and Balinese language instructors. The results of the data annotation carried out by the first author were validated by the expert.

Dataset annotation includes three main objectives of Balinese narrative text analysis, resulting in four datasets for these purposes, such as character identification, alias clustering, and character classification. Each dataset is stored in the charsNamedEntity, charsExtraction, charsAliasClustering, and charsClassification subdirectories (explanation in Data Description section). The flowchart of the data annotation process from the beginning until the gold-standard annotation is obtained on the four datasets is shown in Fig. 16. Expert initially defines the labeling guidelines for each dataset before the annotation process begins. The annotation of all four datasets uses Microsoft Excel software and is saved in *.XLSX format.Fig. 16 Flowchart of dataset annotation on the Balinese Story Texts Dataset to obtain gold-standard annotation.

Fig 16

The BIO (begin-inside-outside) format [31] is used to label words in the first dataset with five CHAR NEs labels. The prefixes B- (beginning of an entity) and I- (part of an entity) are used to mark words or phrases that are character entities, while all words that are not character entities are labeled with O (including all punctuation marks). For instance, the sentence “I Pekak Dukuh lantas ngaukin Sang Lutung ane sedeng ngamah biu di duur punyane.” (I Pekak Dukuh then shouted at The Monkey who was eating a banana on the tree.) which has the following annotation results “I/B-PNAME Pekak/I-PNAME Dukuh/I-PNAME lantas/O ngaukin/O Sang/B-ANM Lutung/I-ANM ane/O sedeng/O ngamah/O biu/O di/O duur/O punyane/O. /O” means there are two-character entities, namely I Pekak Dukuh and Sang Lutung. In the first dataset, we did not label pronouns as character entities.

Each word in the first dataset is also equipped with POS Tag label. This labeling is carried out automatically by utilizing a pretrained HMM model for POS Tagging of Balinese texts according to previous research [30]. There are 21 POS Tag labels used for HMM model training. The average performance of the model with 10-fold cross-validation and 3669 annotated words was 68.56 % [30]. This model receives input in the form of sentences and provides output in the form of words with their respective POS Tag labels. For instance, the input sentence “I Kancil lantas malaib.” (The Mouse Deer then ran.) will have a POS Tag label as follows “I/DT Kancil/NN lantas/RB malaib/VB ./Z” with DT, NN, RB, VB, and Z (see label description in Fig. 8) as the resulted POS Tag label. Therefore, every word (Word column in Table 3) in every story text in the first dataset that has the same SentenceID will be arranged into one sentence as input to the pretrained model. The output from the model is then separated between words and their POS Tag labels automatically to get the POS Tag labels which are stored in the POS Tag column (see Table 3).

In the second dataset (charsExtraction), the annotator writes a list of all character entities identified in a sentence according to the annotation results in the charsNamedEntity subdirectory. Semicolons are used to separate the occurrences of each character entity in a sentence. If there is no occurrence of any character entities in a sentence, it is left blank (NULL or NaN). The annotator writes the character entities according to what appears in the text without any typographic modifications, such as adding, removing, or modifying letters. For instance, the list of character entities for the example sentence in the previous paragraph are as follows: “I Pekak Dukuh; Sang Lutung” and not written as follows “i pekak dukuh; sAng LuTung”.

In the third dataset (charsAliasClustering), the annotator groups each list of character entities (along with their aliases) that have been identified in each sentence in each story (results in the second dataset) into the same character group (illustration in Fig. 13). Without making any typographical changes, such as adding, deleting, or changing letters, the annotator writes all the character entities and their aliases in accordance with what is written in the story by the writers. For instance, the character entities named “Sang Lutung”, “I Lutung”, “Lutunge”, and “I lutunge” (which means monkey with various aliases) should be grouped into the same group since they refer to the same character entity. Table 11 displays the annotated alias clustering guidelines for the third dataset.Table 11 The third dataset annotation guidelines used by the annotators.

Table 11No.	Description	Examples	
1.	The list of character entities and aliases that are written in each character group is unique; even though they are mentioned many times in the story, they are still written once.	Although character named “Arjuna” is mentioned over ten times, it is only written about once.	
2.	If two-character entities have a high string similarity, but there is a difference of one or two letters due to a typographical error by the story writers, then they are in the same character group.	The character entities named “Pan Karsa” and “Pan Karta” are grouped into one even though they have one different letter.	
3.	If there are various aliases that refer to the same character entity in a story text with low strings similarity, then they are grouped into the same character group.	The characters “Pianakne” (her son), “Pianakne muani (his sone)”, “panakne”, “pianakne ento (the son)” are grouped together.	
4.	Even though two-character entities have the same pronunciation, if they are written in different orthography (with capital letters), they are not considered unique (referring to number 1), even though they belong to the same group.	The character entities named “Sangarjuna” and “sangArjuna” are not considered unique aliases, even though they belong to the same character group.	

In the fourth dataset (charsClassification), the annotators were asked to read the entire contents of each story text to be able to determine the classification of each character group (results in the third dataset) in each story text as protagonist or antagonist. The provisions in the process of labeling character groups are as follows:(1) A character group is classified as Protagonist if their personality, traits, attitudes, thoughts, words, and depictions in the story text have positive sentiments or images and are in accordance with the prevailing norms of general society. On the other hand, a character group is classified as Antagonist if their characteristics conflict or contrast with the characteristics of the Protagonist.

(2) If the appearance of a character group is that of additional or supporting characters and there is not enough information for the annotator to classify the group of characters into protagonists or antagonists, then such a character group is labeled General.

The inter-annotator agreement (IAA) score is used to measure the level of agreement or reliability between the annotators. The score helps evaluate the consistency and reliability of the resulting dataset. The IAA score measurement is divided into the pilot annotation and independent annotation phases. In the pilot annotation stage, the two annotators labeled four13 of the 120 story texts for the four dataset objectives. At this stage, there are 2183 tokens, 125 sentences, and 440-character groups that must be annotated by the two annotators. At the independent annotation stage, the annotator team labeled 20 story texts.14 At this stage, there were 19,257 tokens, 1410 sentences, and 217-character groups that had to be annotated by the two annotators.

Three metrics are used to determine each dataset's IAA score. For the first and fourth datasets, the IAA score is computed using Cohen's Kappa coefficient. For the second and third datasets, the IAA score is calculated using the average F1-score. Furthermore, in the second dataset, the IAA score measurement is also completed using the average Jaccard similarity coefficient score.

Cohen's Kappa coefficient ranges from −1 to 1. A Cohenʼs Kappa coefficient that is close to one indicates a good agreement score (almost perfect agreement) and vice versa. The Jaccard similarity coefficient and F1-score range from zero to one, with a larger score indicating a good level of agreement. The threshold set for each IAA score calculation is greater than or equal to 0.81. This threshold already shows IAA with a level of almost perfect agreement [32]. If there is a disagreement on the label given between the annotators that causes the IAA score to be below the threshold, then a discussion is held between the annotators to reach an agreement, and the label is corrected according to the agreement so that a gold-standard annotation is obtained [15,24].

The IAA score calculation with the average F1-score for the second dataset is as follows. For example, Ai represents the list of character entities identified by the first annotator in the i th sentence and Bi represents the list of character entities identified by the second annotator in the i th sentence. True positive (TP) is the number of members of the set Ai∩Bi. False negative (FN) is the number of members of the set Bi−Ai. False positive (FP) is the number of members of the set Ai−Bi. The F1-score for each sentence is calculated using Eq. (1), and the average F1-score of the two annotators for M sentences in the N story texts used is calculated using Eq. (2).(1) F1score(i)=2×(TPTP+FP)×(TPTP+FN)(TPTP+FP)+(TPTP+FN)

(2) AvgF1score=∑i=1M×NF1score(i)M×N

The IAA score calculation with the average F1-score for the third dataset is as follows. For example, Ci represents the character groups that resulted in the i th story by the first annotator and Di represents the character groups that resulted on the i th story by the second annotator. TP states the number of members of the set Ci∩Di. FN states the number of members of the set Di−Ci. FP is the number of members of the set Ci−Di. The F1-score for each i th story is calculated using Eq. (1), and the average F1-score of the two annotators for the N story texts used is calculated using in the following equation.(3) AvgF1score=∑i=1NF1score(i)N

Table 12 shows the outcomes of the IAA score measurements for both pilot and independent annotations. The IAA score measurement results on the four datasets have met the minimum threshold that has been set at 0.81. In other words, the labeling results provided by the two annotators have shown almost perfect agreement [32]. Therefore, the remaining 96 story texts that had not been labeled were then divided into two independent data subsets of 48 story texts each. Each annotator then labels each data subset at the complete annotation stage. Labeling is carried out independently based on guidelines and final agreements resulting from discussions during the pilot annotation or independent annotation stage.Table 12 IAA score measurement results at the pilot and independent annotation stages.

Table 12Steps/Score	Cohen's Kappa Coefficient (κ)	Mean Jaccard similarity coefficient score	Mean F1-score	Mean F1-score	
	1st Dataset	4th Dataset	2nd Dataset		3rd Dataset	
Pilot annotation	0,8653	0,9395	0,9039	0,9571	0,8125	
Independent annotation	0,9836	0,9633	0,9786	0,9917	0,9701	

Limitations

The dataset size in this paper is limited to only 120 Balinese story texts and not all Balinese story text have been successfully annotated. The classification of character groups in the fourth dataset is only limited to single-class classification between protagonists or antagonists only. Classification of character groups into multi-class classification by adding different dimensions, for example personality, such as extrovert vs introvert [9] or OCEAN (Openness, Conscientiousness, Extraversion, Agreeableness, Neuroticism) [8] can be done in the future research.

Ethics Statement

The authors have read and follow the ethical requirements for publication in Data in Brief and we confirm that the current work does not involve human subjects, animal experiments, or any data collected from social media platforms.

Balinese story texts or Satua Bali texts are a form of traditional cultural expressions/folklore (TCE) expression. The story text grew and developed in Bali Province in Indonesia. The text of the story is passed down from generation to generation by the traditional law community on the island of Bali orally. It is not known for certain who the original creator of each story text is.a. According to Law of the Republic of Indonesia Number 28 of 2014 concerning Copyright Article 38 paragraph (1) and Government Regulation of the Republic of Indonesia Number 56 of 2022 explain that the State holds copyright on TCE as one of the communal intellectual properties (CIP) such as stories, stories, fairy tales, legends, and so on (including Balinese story texts). Article 5 paragraph (1) explains that the right to CIP is an inclusive moral right, which is guaranteed and/or carried out by customary law communities and/or local communities who produce, protect, maintain and/or develop CIP communally and across generations. Republic of Indonesia Government Regulation Number 56 of 2022 Article 6 explains in more detail the characteristics of TCE, including that it is managed and carried out communally and collectively by customary law communities and/or local communities as the community of origin; and maintained, used, and passed on across generations. Therefore, Balinese story texts or Satua Bali texts are a communal right of the customary law community on the island of Bali and not individual rights because they are supervised and/or carried out by the customary law community on the island of Bali.

b. According to Law of the Republic of Indonesia Number 28 of 2014 concerning Copyright Article 44 paragraph (1) explains that for the purposes of education, research, writing scientific papers, preparing reports, writing criticism or reviewing a problem without harming the reasonable interests of the Creator or Copyright holders, the use, appropriation, duplication and/or substantial modification of a work in whole or in part is not considered a violation of copyright if the source is stated or included in full.

c. The story text may also be adapted to suit someone's creativity by being changed and transformed into another form (such as a film) and this is protected by Law of the Republic of Indonesia Number 28 of 2014 Article 40 paragraph 2. If TCE is used for commercial needs (such as films), then you should obtain permission from the state as the copyright authority [33].

As a disclaimer, the authors do not claim the 120 raw Balinese story texts (Satua Bali) obtained and used in this research as the result of our work, but what we claim as a contribution is the annotation of the 120 story texts for computational-based narrative text analyses. The use of the story text in this paper is solely for needs in accordance with Law of the Republic of Indonesia Number 28 of 2014 concerning Copyright Article 44 paragraph (1), fair use, and not for commercial needs. The state has an obligation to advance Indonesian national culture in accordance with article 32 of the 1945 Constitution of the Republic of Indonesia and guarantee the independence of every component of society to preserve and develop their culture, in this case preserving and developing TCE [34].

CRediT authorship contribution statement

I Made Satria Bimantara: Conceptualization, Methodology, Software, Validation, Data curation, Writing – original draft, Writing – review & editing, Visualization. Diana Purwitasari: Supervision, Writing – review & editing, Funding acquisition, Validation, Visualization. Ngurah Agus Sanjaya ER: Supervision, Writing – review & editing. Putu Gede Suarya Natha: Data curation, Resources.

Data Availability

Balinese Story Texts Dataset - Characters, Aliases, and their Classification (Original data) (Mendeley Data).

Acknowledgments

This work is funded by research grant of Institut Teknologi Sepuluh Nopember with contract no 1175/PKS/ITS/2024 .

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

1 https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html

2 The morphological structure of a person's name controls the word order, with each word denoting a different meaning or characteristic—for example, the caste, gender, or order of birth on the island of Bali.

3 https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GroupShuffleSplit.html

4 https://docs.python.org/3/library/pickle.html

5 https://docs.python.org/3/library/pickle.html#pickle.loads

6 https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html

7 https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.StratifiedKFold.html

8 BeautifulSoup4 package can be downloaded from https://pypi.org/project/beautifulsoup4/

9 https://www.python.org/downloads/release/python-385/

10 https://docs.python.org/3/library/re.html

11 https://docs.python.org/3/library/string.html

12 https://pypi.org/project/nltk/

13 The four-story texts used were chosen randomly with a uniform distribution.

14 The four-story texts that had been used in the pilot annotation were not used at this stage, but instead selected 20 story texts randomly (uniform distribution) again.
==== Refs
References

1 Suwija I.N. Darmada I.M. Mulyawan I.N.R. Kumpulan Satua 2019 Dongeng Rakyat Bali Pelawa Sari, Denpasar
2 K.S. Bali, (2010). https://satua-bali.blogspot.com/(accessed 13 January 2024).
3 K.D.C.S. Bali, (2023). https://msatuabali.blogspot.com/(accessed 13 January 2024).
4 Bimantara I.M.S. Purwitasari D. ER N.A.S. Balinese story texts dataset - characters, aliases, and their classification Mendeley Data V3 2024 10.17632/h2tf5ymcp9.3
5 Muhuri S. Chakraborty S. Chakraborty S.N. Extracting social network and character categorization from bengali literature IEEE Trans. Comput. Soc. Syst. 5 2018 371 381 10.1109/TCSS.2018.2798699
6 Bajracharya A. Shrestha S. Upadhyaya S. Bk S. Shakya S. Automated characters recognition and family relationship extraction from stories 2018 8th International Conference on Cloud Computing, Data Science & Engineering (Confluence) 2018 IEEE Noida 314 319 10.1109/CONFLUENCE.2018.8442732
7 K V. Antonucci A. NOVEL2GRAPH: visual summaries of narrative text enhanced by machine learning Proceedings of the Text2StoryIR’19 2019 29 37
8 Jacobs A.M. Sentiment analysis for words and fiction characters from the perspective of computational (neuro-)poetics Front. Robot AI 6 2019 1 13 10.3389/frobt.2019.00053 33501018
9 Flekova L. Gurevych I. Personality profiling of fictional characters using sense-level links between lexical resources Proceedings of the 2015 Conference on Empirical Methodsin Natural Language Processing 2015 Association for Computational Linguistics 1805 1816 10.18653/v1/D15-1208
10 Bimantara I.M.S. Sanjaya ER N.A. Purwitasari D. Character entity recognition using hybrid binary-particle swarm optimization and conditional random field on balinese folklore text International Conference on Information Integration and Web Intelligence 2023 Springer Nature Switzerland 128 133 10.1007/978-3-031-48316-5_15
11 Jahan L. Finlayson M.A. Character identification refined: a proposal Proceedings of the First Workshop on Narrative Understanding, Association for Computational Linguistics, Minneapolis 2019 12 18 10.18653/v1/W19-2402
12 Barros C. Vicente M. Lloret E. Tackling the challenge of computational identification of characters in fictional narratives Proceedings - 2019 IEEE International Conference on Cognitive Computing, ICCC 2019 - Part of the 2019 IEEE World Congress on Services 2019 Institute of Electrical and Electronics Engineers Inc. 122 129 10.1109/ICCC.2019.00031
13 Labatut V. Bost X. Extraction and analysis of fictional character networks: a survey ACM Comput. Surv. 52 2019 10.1145/3344548
14 Park T. Kim S.H. Novel character identification utilizing semantic relation with animate nouns in Korean ACM Trans. Asian Low-Resour. Lang. Inf. Process. 17 2018 10.1145/3197657
15 Jahan L. Mittal R. Yarlott W.V.H. Finlayson M.A. A straightforward approach to narratologically grounded character identification Proceedings of the 28th International Conference on Computational Linguistics 2020 Online Barcelona 6089 6100 10.34703/gzx1-9v95/RB6ZH0
16 Srinivasan V. Power A. Character extraction and character type identification from summarised story plots J. Comput.-Assist. Linguist. Res. 6 2022 19 41 10.4995/jclr.2022.17835
17 Nagaraj A. Kejriwal M. Dataset for studying gender disparity in English literary texts Data Br. 41 2022 1 5 10.1016/j.dib.2022.107905
18 Liu P. Guo Y. Wang F. Li G. Chinese named entity recognition: the state of the art Neurocomputing 473 2022 37 53 10.1016/j.neucom.2021.10.101
19 Carik B. Yeniterzi R. A twitter corpus for named entity recognition in Turkish Proceedings of the 13th Conference on Language Resources and Evaluation (LREC 2022) 2022 4546 4551 https://huggingface.co/dbmdz/bert-base-turkish-128k
20 Kaǧan Akkaya E. Can B. Transfer learning for Turkish named entity recognition on noisy text Nat. Lang. Eng. 27 2021 35 64 10.1017/S1351324919000627
21 Ozcelik O. Toraman C. Named entity recognition in Turkish: a comparative study with detailed error analysis Inf. Process. Manag. 59 2022 10.1016/j.ipm.2022.103065
22 Santoso J. Setiawan E.I. Purwanto C.N. Yuniarno E.M. Hariadi M. Purnomo M.H. Named entity recognition for extracting concept in ontology building on Indonesian language using end-to-end bidirectional long short term memory Expert Syst. Appl. 176 2021 10.1016/j.eswa.2021.114856
23 Purwitasari D. Abdillah A.F. Juanita S. Purnama I.K.E. Purnomo M.H. A comparison of transformer and BiLSTM Based BioNER model with self-training on low-resource language texts of online health consultatio Int. J. Intell. Eng. Syst. 16 2023 213 224 10.22266/ijies2023.1231.18
24 Jahan L. Chauhan G. Finlayson M.A. A new approach to animacy detection 27th International Conference on Computational Linguistics, New Mexico 2018 1 12
25 Jayakumar A. Rao V. Rohit Kumar A.S. Banerjee P. Ravish R. Analyzing the development of complex social systems of characters in a work of literary fiction 2022 3rd International Conference for Emerging Technology, INCET 2022 2022 Institute of Electrical and Electronics Engineers Inc. 10.1109/INCET54531.2022.9824015
26 Harikrishna D.M. Rao K.S. Children's story classification in Indian languages using linguistic and keyword-based features ACM Trans. Asian Low-Resour. Lang. Inf. Process. 19 2019 10.1145/3342356
27 Vala H. Jurgens D. Piper A. Ruths D. Mr. Bennet, his coachman, and the Archbishop walk into a bar but only one of them gets recognized: on the difficulty of detecting characters in literary texts Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing 2015 Association for Computational Linguistics 769 774 10.18653/v1/D15-1088
28 Valls-Vargas J. Ontãnón S. Zhu J. Toward automatic character identification in unannotated narrative text Seventh Intelligent Narrative Technologies Workshop 2014 38 44
29 Kurniadi K. ER N.A.S. Person named entity recognition in Balinese J. Elektron. Ilmu Komput. Udayana 101 2021 99 104 10.24843/JLK.2021.v10.i01.p13
30 Pradiptha I.G.M.H. ER N.A.S. Building balinese part-of-speech tagger using hidden markov model (HMM) J. Elektron. Ilmu Komput. 9 2020 303 308
31 Santoso J. Setiawan E.I. Yuniarno E.M. Hariadi M. Purnomo M.H. Hybrid conditional random fields and k-means for named entity recognition on indonesian news documents Int. J. Intell. Eng. Syst. 13 2020 233 245 10.22266/IJIES2020.0630.22
32 Pérez J. Díaz J. Garcia-Martin J. Tabuenca B. Systematic literature reviews in software engineering—Enhancement of the study selection process using Cohen's Kappa statistic J. Syst. Softw. 168 2020 10.1016/j.jss.2020.110657
33 Ardiawan I.P.E.T. Indrawati A.A.S. Perlindungan Hukum terhadap karya cipta cerita rakyat yang di angkat menjadi film Jurnal Kertha Wicara 11 2022 788 798 10.24843/KW.2022.v11.i04.p9
34 Roisah K. Legal politics of protection of Indonesian traditional cultural expressions /folklore Diponegoro Law Rev. 2 2017 185 202 10.14710/dilrev.2.1.2017.185-202
