{'fraction_non_alphanumeric': 0.022931143398610233, 'fraction_numerical': 0.0038534428300694883, 'mean_word_length': 5.337469975980785, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Create Living Context Map from Social Network

People frequently interact through communication and social software in their daily life. In addition to strengthening emotional connections between relatives and friends, social software also enable people to accumulate large amounts of information daily. Although such communications might contain numerous trivial matters, it may also include pertinent details, such as personal emotions, work matters, and activities of the users’ and their friends. Therefore, our study aims to collect and analyse these communications and resemble a diary in that it indirectly records all activities communicated using it. After the integration and categorization of these messages, the key points from these events and conversations are summarized and recorded. The sentiment of the conversations can be inferred from the analysis and interpretation of semantic meaning of the information. Finally, the analytical results are organized to establish a robust living context map.


INTRODUCTION
In modern society, people frequently interact through communication and social software. Such tools are essential in people's daily life, enabling an efficient transmission of messages. In addition to enhancing emotional connections between relatives and friends, communication software can be applied in workplaces for dissimilar units or personnel to swiftly grasp situations in real-time to improve work efficiency. During these communications, the software resembles a diary in that it indirectly records all activities communicated using it. Although such a diary might contain numerous trivial matters, it may also include pertinent details, such as personal emotions, work matters, and activities of the users' and their friends. After integration and analysis, associations may be found in several events in these records, proving that those data are not merely meaningless records of text.
In addition to strengthening emotional connections and instantly grasping messages, communication and social software also enable users to record major and minor events. Interpersonal communications currently relies mainly on means of text input and voice dialogues; people send messages to a host system and wait for the intended receiver to connect to the Internet to view the message. Such a communicative measure has become a regular activity for people of this era who have been trained to habitually use digital devices. From chatting and reminiscing with friends or from dealing with work, in an interpersonal context, people accumulate large amounts of information daily. After the integration and categorization of these messages, the key points from these events and conversations are summarized and recorded. The sentiment of the conversations can be inferred from the analysis and interpretation of semantic meaning of the information. Finally, the analytical results are organized to establish a robust living context map.  This study aims to develop a living-context system, as shown in Fig. 1. This system contains two subsystems. The first one, an interpersonal data extraction system, organizes a user's textual records from chats, voice messages, and replies from comment sections in a chronological order to create a summary that resembles a dairy entry. The sentiments in the messages are interpreted through a semantic analysis. Events, such as leisure activities or business affairs, and names of people mentioned in text are extracted. Subsequently, by connecting associated people, events, and locations, a user's complete living context is portrayed in a time-based figure, as Fig. 2 illustrates. Thereafter, through analysing semantic and sentiment data, the user's interpersonal relationships can be predicted. The other subsystem is a health and dietary tracking system. This subsystem tracks users' diets through an analysis of their dietary records and converts them into calorie intake. This system also uses a built-in sensor in the users' mobile phones to analyse the amount of exercise they partake.

A. Textual Analysis for Semantic and Sentiment
Li and Qiu [1] proposed a sentiment analysis method of short texts in a microblog. First, they obtained the dependency between texts through an analysis of the dependency between sentences in short texts. When calculating phrase-level sentiment, the influence of modifiers on emotion words and the effect of modification distance on modification intensity are considered. With the contribution of emotion words and sentences in the text considered, the sentiment polarity and intensity of the short text in a microblog were determined.
Zhang and Zheng [2] divided the sentiments of Chinese text into two classification problems, namely positive and negative sentiment tendencies. Verbs, adjectives, and adverbs were employed as textual features, and term frequency-inverse document frequency was used to calculate the weights of these features. Last, support vector machine classifier and an elaboration likelihood model were adopted to learn training samples to obtain the sentiment classification result of the testing set.
Jiang, Luo, Xuan, and Xu [3] conducted sentiment analysis of news events using a semantic approach; the subjects of the computation were simple words. The computational process was divided into two steps. First, the computation of emotion words was conducted through a word emotion association network, and subsequently the emotion words were further classified through a standard sentiment thesaurus. The word emotion association network was developed to determine the semantic and sentimental aspects of emotion words, which are the foundations for sentiment analysis of emotion words and texts.
Amelia and Maulidevi [4] employed a keyword spotting technique to determine the sentiment terms and to compute the intensity of sentiment in each word. The dominant emotion of a story was determined according to the number of simple words with a sentiment meaning.

B. Text Summary
Singh, Kumar, Mangal, and Singhal [5] developed an automatic text summarizer that used an unsupervised deep learning method to extract 11 features from each sentence of a document, generating feature matrices, which enhanced the relevance of sentences through a restricted Boltzmann machine. The proposed algorithm reached an output accuracy of approximately 85%, while retaining the meaning of the summarized document.
Mirani and Sasi [6] used an extractive-based approach and a sentiment analysis to create a two-level text summary from online news sources. The summary was generated by extracting two or three news articles. With such a method, essential sentences were identified and rearranged according to their significance. The most crucial sentences, generated from the two or three abstracts corresponding to the news topic, were used to produce a summary.
Kumar, Goh, Ghani, and Albaham [7] proposed using sentence ranking based on voting models to conduct summary extraction. The text was first preprocessed, and each extracted sentence was ranked. Subsequently, the voting models were used to arrange the sentences according to their ranking. Finally, the sentences with the highest ranks were selected for text summaries.

C. Interpersonal Relationship
Hwang [8] proposed three types of interpersonal relationships, or ties, according to the level of sentiment: 1) Instrumental ties: The purpose of individuals establishing instrumental ties with people outside their lives and their families is to achieve certain material goals. Therefore, this relationship is fundamentally transient and unstable. 2) Mixed ties: The two parties are acquainted and possess a certain degree of sentiment relation less intense than that of primary groups where people are comfortable expressing their genuine behaviour. Such ties might include interpersonal roles, such as relatives, neighbours, teachers and students, classmates, colleagues, and fellow townspeople, constituting relationships of diverse complexity. 3) Expressive ties: Such ties are often of enduring and stable social relationships. Primary groups include families, close friends, and peers. Hwang also proposed the following three rules: 1) The equity rule: This is a universal, nonpersonalized rule, in which people classified by individuals as subjects of instrumental ties are treated equitably with the same principle.
2) The equality rule: The two parties must always consider etiquette and be aware of the interpersonal contact to maintain the sentiment relationship.
3) The need rule: The main rule of social transactions and resource allocation in Asian households is to serve their families with conviction. Based on this rule, each member should exert all effort towards the family, whereas the family is obliged to the member with resources to meet daily necessities. Berscheid, Snyder, and Omoto [9] defined the closeness of a relationship in terms of frequency, strength, and diversity: 1) Frequency: The longer individuals spend with their relationship partners, the high the frequency is, and vice versa. 2) Strength: The effect of activities both parties experienced that are intense. It is used to present people with diverse life domains and to ask them to estimate the degree to which they believe they are influenced by their partner. 3) Diversity: An individual's level of disclosure during interpersonal communication with others determines the closeness of their relationships; a high level of selfdisclosure indicates an intimate relationship. Lin [10] defined the relationship of individuals with people, events, and locations: 1) People: The relationship between individuals changes as they age. At each stage, individuals choose to socialise with suitable people to satisfy their needs. 2) Events: Individuals develop profound experiences with others, such as traveling with loved ones, going on first dates, and participating in college graduation parties. Individuals expect to relate to others through this process. Both parties are expected to have and identify with a committed relationship through experiences of interpersonal contact. 3) Locations: The connection where an individual connect with people or events serves as a symbol of sentiment or meaning. Moreover, the impression of a location can affect whether an individual continues to develop a relationship with it in the future.
III. SYSTEM OVERVIEW The living context system comprises two subsystems, namely the interpersonal data extraction system and the health and dietary tracking system. Fig. 3 is the information processing flowchart in our proposed system. The Server side is responsible for storing the communications and favourability value. The Client APP can be installed on users' electronic devices, such as computers or mobile devices. When users talk to remote users, the interpersonal Events Extraction module analyses the communications synchronously. Since closeness degree of interpersonal relationships can affect emotional feelings, the Favourability Calculation computes the importance of the events based on their interpersonal data stored in the Server. Then in the Visualization module, the Mapping function converts the events into 2D/3D coordinates and the Drawing function draws the time-based figure, as shown in Fig. 2.   Fig. 3. Flowchart of information processing in our living context system.

IV. INTERPERSONAL EVENTS EXTRACTION SYSTEM
The interpersonal event extraction system utilizes programs to collect the text of chat history from social and communication software. The collected information is recorded separately in the form of a diary and according to the concept of a timeline, whereby the interpersonal relationship of the user can be determined from the diary (Fig. 4).
A. Feature Extraction 1) Names of people: Regarding social networking software, such as Facebook, Twitter, and Instagram, the names of people corresponding to user accounts from comment sections are extracted. If the diary contains specific addresses, including family members, colleagues, or close friends, then the relationship between the individual and those people are stored in the database under their categories.
2) The sentiment level of terms: First, the system establishes a positive lexicon and a negative lexicon, of which the maximal positive value is 5 and the maximal negative value is -5. The adjectives in the diary are labelled to calculate the sentiment tendency of the diary (Fig. 5). 3) Events: Among the labelled parts of speech, particular parts of speech are integrated for event extraction to determine whether individuals and associated people have a related and profound experience in the particular event. Both parties are expected to develop a type of relationship through the experience in this particular event. 4) Locations: Derived from preprocessing the diary, the location is linked to people and events to determine whether the individuals and associated people have strong sentiments towards this location. 5) Correlation index of comments: Concerning the comment sections, the number of responses reflects the level of favourability. Moreover, the comments found relating to the user's diary are labelled to create a "mutual diary" to enrich the content of the diary. 6) Occurrence: The frequency of occurrence of the aforementioned features is analysed according to the concept of a timeline. A high frequency of occurrence indicates frequent interactions, whereas a low frequency implies infrequent interactions.

B. Calculation of Favourability
The calculation process of favourability is shown in Fig. 6. Based on the three types of interpersonal ties corresponding to the three sets of distinctive set functions, an increase or decrease in favourability will vary, and the changes in favourability affect the sentiment level of interpersonal relationships.

C. Health and Dietary Tracking System
In view of users' dietary records, the total amount of calories ingested can be obtained from converting the portion and type of food in users' meals into calories according to a calorie table. Regarding users' exercise records, sensors in mobile phones can calculate the total number of steps taken by the users to compute the expended calories. This system can thus be used to assess the physical health of users.

V. CONCLUSION
Composed of two subsystems, namely an interpersonal data extraction system and a health and dietary tracking system, the living context system can be adopted to assess the sentiment changes of a user. When substantial sentiment changes occur, users can be provided with positive information to enable them to make necessary physical and mental adjustments. Through the analysis of the interests regarding the same events, users can be provided with friend requests and competition invitations to help expand their interpersonal relationships.
Zong-Xian Yin received the BS and MS degrees in the industrial design at National Cheng Kung University (NCKU), Taiwan in 1997 and 2000, respectively, and the PhD degree in the Computer Science and Information Engineering at NCKU in 2007. He is an associate professor in department of Computer Science and Information Engineering at Southern Taiwan University of Science and Technology (STUST), Taiwan. His current research interests include intelligent computing, big data application, humanmachine interaction, and game-based learning.
He-Yi Tsai recived the BS degrees in the computer science and information engineering from Southern Taiwan University of Science and Technoloy (STUST) in 2016. He is now pursuit his master degree in the department of Computer Science and Information Engineering at STUST. His research interests include web application and data application.

Retrieve sentiment terms
Textural diary