{'fraction_non_alphanumeric': 0.029962156719786134, 'fraction_numerical': 0.007672811859875707, 'mean_word_length': 5.0360435875943, '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}}
Lightme: Analysing Language in Internet Support Groups for Mental Health

Background: Assisting moderators to triage harmful posts in Internet Support Groups is relevant to ensure its safe use. Automated text classification methods analysing the language expressed in posts of online forums is a promising solution. Methods: Natural Language Processing and Machine Learning technologies were used to build a triage post classifier using a dataset from Reachout mental health forum for young people. Results: When comparing with the state-of-the-art, a solution mainly based on features from lexical resources, received the best classification performance for the crisis posts (52%), which is the most severe class. Six salient linguistic characteristics were found when analysing the crisis post; 1) posts expressing hopelessness, 2) short posts expressing concise negative emotional responses, 3) long posts expressing variations of emotions, 4) posts expressing dissatisfaction with available health services, 5) posts utilising storytelling, and 6) posts expressing users seeking advice from peers during a crisis. Conclusion: It is possible to build a competitive triage classifier using features derived only from the textual content of the post. Further research needs to be done in order to translate our quantitative and qualitative findings into features, as it may improve overall performance.


Introduction
Internet Support Groups (ISG) has been important and popular technologies for individuals with mental ill-health to receive support from other peers that have similar lived experiences [17] and to anonymously share their stories with others to support their recovery [26]. They are also referred to as online peer-support forum or networks. ISGs have supported groups of people with specific chronic health conditions, such as diabetes or mental health [17,29]. Current evidence suggests ISGs may have a positive impact on individuals with mental ill-health; however, it may also exacerbate a person's distress levels [19]. Nevertheless, the safe use of ISGs will require more attention, especially designing mechanisms that can assist in mitigating possible adverse effects and harm to ISG users [13].
Assessment and monitoring in ISGs are challenging and costly because it relies on the manual detection of posts in an online forum by trained moderators. This raises particular concerns on the scalability of ISGs as a potential digital health intervention. To overcome limitations, Natural Language Processing (NLP) and Machine Learning (ML) technologies can be used to build systems that can assist trained moderators in detecting and responding to hazardous posts that may cause further distress or self-harm to ISG users. Prior research has shown text classification methods to be promising solutions in reducing the workload of trained moderators [16].
Moderators play an important role in managing communication between users in an ISG. They offer a range of informal support and advice to users, including providing personal experiences of recovery, motivating users to participate in the discussion, and enhancing the adoption of digital mental health services [21]. However, moderators may lack the necessary skills and expertise to guide appropriate decision making on issues relating to clinical safety [14]. Triaging ISG posts to assist moderators in reviewing new content uploaded daily is an automated text classification task designed to efficiently detect individuals' thoughts, feelings, emotions, and possible behaviors represented in messages [7,40].
Previous research has often focused on evaluating the performance of different ML classification models using mental health ISG data, such as Logistic Regression [6,35,43], Stochastic Gradient Descent (SGD) [20], and Linear Discriminant Analysis (LDA) [37]. The study by [17] used different ML techniques to detect depression from Facebook data. They evaluated the performance of several classification models, including Support Vector Machines (SVM), Decision Tree (DT), ensemble methods, and K-Nearest Neighbor (KNN). The results demonstrated the relative performance for specific classifiers. However, the authors did not evaluate the performance of different language features from lexical resources and deep learning models.
Lexicon-based resources are central to modelling the linguistic characteristics of ISGs. Over the years, examples of comparative systems have used different lexicon-based features to classify hazardous posts in an ISG for mental health [15,27], including in posts from Twitter data [8,18,31,32]. While modelling linguistic characteristics are important for accuracy performance, other features such as interactions of ISG users, forum structure, meta-data and other external features may likely improve the prediction performance [2,38]. However, some authors have stated that relying on features extracted from external sources (e.g., forum structure and meta-data) may introduce biases; therefore, decreasing the predictive capabilities of the classifier on never seen before messages published on online forums [1].
Our study focuses on developing an automated classifier for triaging posts using only features from the textual content of the post derived from lexicon-based resources. We want to investigate the language of ISGs that exclude the use of the forum structure or post threads. By excluding forum structure and meta-data features from the model, the study primarily focuses on optimizing the linguistic aspects of detecting forum posts to avoid biases on unseen messages. Furthermore, given the extent of previous research on the combination of different ML classification models, we want to experiment on a broad combination of features using only a relatively small number of linear and nonlinear ML techniques including a couple of different deep learning models.

Research rationale
This study used state-of-the-art methods to develop handcrafted features derived from the Reachout online support forum [15]. The model aims to achieve the best classification performance for crisis posts and competitive results for other classification labels, described in Section 2. We conducted a qualitative analysis of the post, which requires the immediate attention of moderators. The study has two aims: -Shed some light about the linguistic characteristics of the urgent posts. -Examine the feasibility of lexical resources in an ML classification system for triage post using the Reachout dataset.

Dataset
This study used a collection of posts from the Australian Reachout mental health online forum released by the Computational Linguistics and Clinical Psychology Shared Task (CLPsych) [15]. Participants range from 18 to 25 years old. All of the posts are written in English. Each post in the dataset is labelled with a semaphore pattern to indicate the urgency of the post, and the required attention of the moderator, as shown in Table 1. Label distribution across the training and testing dataset of the Reachout online forum is given in Table 2. Precision, recall and F-measure were used to examine the performance of the classifier. Precision is defined as the proportion of correctly classified posts into a particular label by the ML model. Recall is defined as the proportion of the labels that are successfully classified. The F-measure is the mean of precision and recall. Macro f-score metric is preferred since it gives more weight to infrequent yet more critical labels, such as red and crisis. Similar to [1], the fscore for crisis versus non-crisis was reported. This metric measured the classifier's capability to detect the most severe cases. Details of the official evaluation matrices are described below; -Macro-averaged F-score: The macro-averaged f-score is calculated among crisis, red and amber, and after excluding the green class. -F-score for flagged vs. non-flagged: This metric separates the posts that moderators need to action (i.e. crisis, red, amber) compared to posts that can be safely ignored (i.e. green). This is the most important metric in Label Description Example Green No input from a moderator, and it can be safely left for the wider community of peers to respond.
I'm proud that I was able to call and keep up a phone conversation with my mum. Amber A moderator should address the post at some point, but they do not need to do so immediately.
There are so many stuff I'm thinking about, but my medications are slowing my thoughts down and making it more manageable.

Red
A moderator should respond to the post as soon as possible.
I feel helpless and things seem pointless. I hate feeling so down.

Crisis
The author, or someone they know, is in imminent risk of being harmed, or harming themselves or others. Posts should be prioritized above all others.
Im having some strong thoughts about ending my life, nothing helps.  CLPsych since it measures the classifier's capability to identify the post that requires moderator attention. -F-score for urgent vs. non-urgent: This metric is the average F1-score among urgent (crisis + red) and nonurgent (amber + green) labels.
A search of key computing and health databases (IEEE, ACM, PubMed and PsycINFO) were conducted to identify the key components of previous text classifiers for ISGs. Table 3 shows the features and methods used by the best performing classifiers using the Reachout dataset, more details in [27] and [15].

Predicting Alerts Approach
The Reachout dataset D = {x i , y i } n i=1 consist of n training instances, where the ith instance is a feature vector x i and label y i . The classification task is to predict the label y i given the feature vector x i for each forum post such that: We trained a Support Vector Machine (SVM) multi-class classifier with linear kernels [41]. SVM is a supervised ML method used widely in text classification. This method used a state-of-the-art triage classification using the Reachout dataset. Hyper-parameters 1 were selected with a grid search 2 scheme with a 5-fold Cross-Validation over the training set. The C hyper-parameter 3 is 1 with l 1 regularization type, and the loss function 4 is hinge, the maximum number of iterations is 2000.
In order to compare Lightme (which used SVM) against other ML classifiers, we also trained K-Nearest Neighbour (KNN), and Naïve Bayes. Since deep learning models are the state-of-the-art in many natural language processing applications, we trained two neural network classifiers: Multi Layer Perceptron (MLP) and Recurrent Neural Networks (RNN) with Long Short Term Memory (LSTM).
The feature set is shown in Table 4. All the features were derived from the post themselves. No features derived from the forum structure or interactions between posts were used. We included additional language features such as MPQA, offensive language, and mental health lexicons.
During feature extraction, negation was model as in [5]. Thus, when a term i from a post is found in a lexicon, its negation is checked by inspecting the term term i−1 . As in [5], we used a list of negation terms: no, nobody, nothing, none, never, neither, nor, nowhere, hardly, scarcely, barely, don't, isn't, wasn't, doesn't, ain't, can't, won't, wouldn't, shouldn't, couldn't, hasn't, haven't, didn't If a negation term was found, the polarity of the term was shifted when the lexicon differentiate between positive and negative terms (e.g., the PERMA lexicon); otherwise, it was skipped and not included as a feature. 1 In machine learning, an hyper-parameter is a parameter whose value is set before the learning process, while the value of other parameters are derived via learning. 2 Grid search is a way of choosing the best hyper-parameters, and consist of exhaustively searching through a subset of the hyperparameter space of a learning algorithm. 3 The C hyper-parameter referrers to the regularization value, which serves as a degree of importance that is given to miss-classification. The larger the value, the less the wrongly classified examples are allowed. 4 A loss function or cost function measures how good a prediction model does in terms of being able to predict the expected outcome.

Triage Classification Experimental Results
The results of the triage classification experiment using the different features, including lexical resources and treating negation, are presented in Table 5. Best results are highlighted in boldface. Exclusive use of lexicon features resulted in lower performance for all classes (flagged, urgent and crisis) and the overall performance (macro F1-score).
Treating negation when using only lexicons did not boost the classification performance. However, adding Term Frequency-Inverse Document Frequency (TF-IDF) contributed to improving the classification performance for all classes 7 . Best results were achieved with features that included "TF-IDF + lexicons with negation", F1-score of 0.44. The most complex set of features (included all features in Table 4) showed competitive results with the most state-of-the-art triage classification system by [1], and the baseline classification system by [27]. 7 TF-IDF is the amount of times a word appears in a document weighted by the number of meaningful words across multiple documents We also experimented on a linear and nonlinear classification method. Naïve Bayes was trained with the Lightme feature set since it is an easy and fast linear classification method suitable for classifying large chunks of data. Similarly, KNN was trained with the same feature set due to its practicality and ease. Hyper-parameters such as the number of neighbours were selected with a grid search scheme using a range from 1 to 25. Table 6 shows the results of Naïve Bayes and KNN, which underperformed SVM and other state-of-the-art systems. Compare to Naïve Bayes and KNN, SVM is known to perform better on rich feature sets such as the one presented in this study.
MLP was trained using the same set of features as Lightme with hidden layer sizes that varied between 100 and 300 nodes, depending on the development set. The RNN+LSTM model was trained with pre-trained word embeddings and without features since one of the advantages of this type of model is its ability to learn feature representations automatically. Important hyper-parameters such as the number of epochs, size of the hidden layer and batch size were tuned using a portion of the training set as the development set. As shown in Table 6, the deep learning models underperformed the other models. This is not surprising as deep learning models are data-hungry and the size of Reachout The number of words overlap between each category in the NRC-Emotion-Lexicon-v0.92 lexicon and a post Mental Disorder lexicon 5 The number of words overlap between the Mental Disorder lexicon and a post PHQ 9 lexicon The number of words overlap between the PHQ 9 and a post PERMA lexicon (1)* The number of bi-gram and tri-gram overlap between PERMA and a post PERMA lexicon (2) The number of bi-gram and tri-gram overlap between PERMA negatives categories and a post PERMA lexicon (3) The weights sum of the bi-gram and tri-grams overlap between PERMA and a post Offensive word lexicon 6 The number of words overlap between offensive word list Other Features   Table 3).  is small, especially some of the classes (e.g., red and crisis) only have a few instances.

Qualitative formative analysis of crisis posts
We randomly selected 40 crisis posts to analyse from the training dataset. We then used open coding to understand linguistic characteristics. Through the qualitative analysis of the selected crisis posts, we identified six linguistic characteristics. We extracted selected phases of crisis posts (including the post id) that matched the given linguistic profile, and suggested recommendation of features to the model.

Expressing hopelessness in crisis
Many of the posts used language or words that described a person's feeling of immediate hopelessness. Extreme hopelessness or helplessness may be associated with an increased risk of suicide [4]. Learned helplessness comes from a repeated belief that uncomfortable situations are inescapable, an example statement is "I tried doing this for my anxiety, but I ended up faced with these challenges" [24]. Hopelessness is the feeling of a combination of helplessness and experiences of depression resulted from a person's response to a negative event [4,24]. An example statement is "I am fed up with my friend anger! I can't bother trying anymore because I am frustrated".

Short crisis posts and emotional response
Short length posts contained concise descriptions of a person's negative emotions. Contrast to longer post; shorter posts contained more variations in expressing positive and negative emotions. As noted by [31], lexicons may be limited in detecting certain expressions such as irony, sarcasm, and metaphors. Therefore, any text under 50 words should be interpreted with caution. Further limitations of interpreting short posts included the use of negation [12].
Examples of short crisis posts describing a concise negative emotion: -

Long crisis posts and emotional coping
Long length posts were found to start with a user expressing some negative emotions, followed by positive emotions related to their abilities to cope. This may be a positive sign as it may indicate a person attempting to reconcile negative emotions [30]. However, they may express negative emotions after showing signs of positivity.
Extracted phases of crisis posts that expresses patterns of health service dissatisfaction:   Table 6: Comparison results on the test set in terms of F-score can include detecting negative emotions at the beginning of a sentence followed by subsequent positive emotions. Checking for spelling mistakes can also be a feature. A feature can detect positive emotions such as keywords relating to coping; getting there, I faced the world, or getting up and working.

Health service dissatisfaction
It was found that people who seek support services (e.g., health service, counsellors, or treatment) in the forum would sometimes feel hopelessness, avoidance, or frustration. This pattern may signal a person using the forum to vent their dissatisfaction or frustrations with local mental health support services, or failures with their treatment of care.
Extracted phases of crisis posts that expresses patterns of health service dissatisfaction: -"(Service) My gp was running late today, which heightened my anxiety. At first she didn't realise it was my 3month follow up apt. She also had no idea that the psych was meant to write a letter, so the psych either ran out of time or forgot. Meh. I just wanted to run away and hide. It was SO VERY hard not to close off and run. I didn't even hear her call my name the first time. Blergh..." (Post ID: 137919) -"im having bad thought about ending my life, nothing helps not even (Service) my counceller" (Post ID: 136895) -"I know looking back at therapy experiences that didn't work out will only discourage me. I'm highly impatient and annoyed. I'm trying to find the right (Service) professionals for me, its a very frustrating process. I can feel pretty hopeless at times too. I start questioning if I can ever get better. It's hard enough to live." (Post ID: 136600) Recommended features to model: Categorical features can be used to model any mention of support services. Features can also consider detecting the negative expression of support services in crisis posts, factoring the length of the posts, and checking for spelling mistakes.

Utilising story telling to express crisis
According to [38], there are two types of behaviours when ISG users seek help. The first behaviour involves a person wanting to communicate their story or 'trouble telling', and the other behaviour involves a person wanting advice. Appropriate timing for offering advice is crucial. If the advice is suggested too soon, it is likely to be rejected. It was found some people would join the forum to seek advice about some issue followed by opening up to talk about their problems.
Extracted phases of story telling in crisis posts: -"...(Event) So today I went to the doctors and they told me that the chemotherapy that I am on is not working, my body isnt reacting to it the way it should be, which means that I now need to start this new treatment that is going to knock me around a lot more then the ast chemotheraphy..." (Post ID: 136116) -"(Event) I moved out of home into a defacto relationship about a year ago now, and despite having troubles with my mum, who I used to live with (single parent), I have the feeling that she is very lonely and she often gets teary about that. (Event) She mentioned today that she may as well just kill herself because she feels like she's not really worth it anymore." (Post ID: 137384) Recommended features to model: Features can detect a sequence of personal events. Personal events may contain temporal features, such as today, yesterday, or tomorrow. Additionally, features can detect negative and positive emotional responses relating to different events identified in the post. Other features can include checking spelling mistakes.

Seeking advice of peers during crisis
Crisis post was found to contain more advice seeking information than information providing support to other peers. Gaining the support of peers online is a common behaviour among people with severe mental ill-health [30]. [2] differentiate posts that provide support to peers and posts that attempt to seek advice from other peers in an ISG. Supportive posts were characterized by the user providing emotional support, and informational support, such as offering website links to seek help. However, posts that seek advice are characterized by the users seeking informational support and seeking emotional support, and companionship from other peers.
Extracted phases of advice seeking in crisis posts: Recommended features to model: Features can detect questions relating to an emotional response. Other feature can also detect advice-seeking information as a text embedding feature that identifies information relating to emotional support.

Principal Findings
This study demonstrates a solution that utilises a variety of lexicon-based resources and supervised ML techniques to assist trained moderators to efficiently moderate ISGs. Contrast to other similar research; this study extracted lexiconbased features from the textual content of posts which may avoid possible biases during classification. The classification experiment found one of our classifier (Liteme) achieved the best results for the crisis post (0.52 F1-score) and competitive results in the other classes (i.e., non-green, flagged, and urgent posts). These results may indicate that it is possible to build a strong classifier that can process only textual features extracted from individual messages. However, the experimental results also demonstrated that using only lexicons was not enough to classify posts into all relevant classes. Exclusive use of vocabulary in the Reachout dataset was built into the solution which may have introduced some noise that may have impacted on the classification performance of flagged and urgent posts. Furthermore, this study demonstrated the limitations of utilizing lexicons, especially their ability to only capture information at the 'word' level. This may prevent their ability to understand the contextual meaning at the 'sentence' level.
Furthermore, the findings suggest that using mental health lexicons can have an impact on the classification of posts requiring immediate response by trained moderators. This is unsurprising given the distinct domain-specific properties of lexicons, especially their association with certain mental and behavioural health theoretical constructs [21]. Lastly, six linguistic characteristics were identified in the qualitative analysis of crisis posts. Interestingly, we found a person in crisis will use words or language associated to hopelessness, publish short posts containing concise negative emotional responses, publish long posts containing variations of emotions, express dissatisfaction with locally available health services, use storytelling to express crisis, and seek the advice of peers during a crisis.

Comparison to Previous Research
Our best classifier showed comparative results with the stateof-the-art systems for triage classification with the Reachout dataset and the baseline classifiers. The baseline system by [27] used uni-grams and bi-grams as features, and a default scikit-learn logistic regression classifier [33]. We also found the classification performance of the best system by [1] from the CLPsych 2017 Shared Task also utilized an SVM classifier. This classifier used a richer set of features, including features from the forum structure and interactions between posts, which outperformed our system for flagged and urgent posts. Interestingly, our approaches showed better results in identifying crisis posts. This is an important category for this problem, especially the moderator's need to immediately respond to these posts. Adding features derived from the forum structure may help to improve the classification performance. However, the trade-off is the expense of not properly classifying posts from new users.
Similar to other systems, our triage text classifier found using TF-IDF with lexicons improved classification performance. [20] received the best results in CLPsych 2016 Shared Task when using TF-IDF weighted n-grams and post embeddings using Sent2vec in an SGD classifier, and a set of twelve fine-coarse grained labels, instead of the coarse-grained four labels. The system by [3] also weights n-grams with TF-IDF producing similar results. Similarly, the use of TF-IDF showed comparative results to triage text classifiers for Twitter [32], and an online support forum for substance abuse [21].
The qualitative findings appeared to support prior research that found similar patterns of online interactions in people with mental ill-health using social media. As highlighted in previous research, online peer-to-peer interactions can improve health and psychosocial outcomes by facilitating a range of positive behaviours that can empower people, such as seeking information and emotional support [30]. However, these online networks can also become harmful when social media content begin to promote self-harm, suicide, or pro-eating disorder behaviours [9,11]. Particularly, social media posts that promote "problematic" content that may be difficult to identify by specifically moderating hashtags in online communities [11].

Implication on Future Research
Most of the qualitative findings may be translated into features that could improve classification performance. As noted, the qualitative findings of the crisis posts could be used to distinguish salient linguistics characteristics of the language used in urgent messages for moderators. For example, specific features for detecting hopelessness may improve detection of crisis messages. Suggestions for future work may also include differentiating posts that provide support or seek advice to other peers and identifying participants roles, such as leaders, influence, and opinion users [2]. Furthermore, various types of help-seeking behaviours can be identified, such as users wanting to share their personal stories of struggle [38]. The analysis of satisfaction with available services can play a role in developing enhanced mixed reality care approaches combining eHealth and on-site services [10].

Limitation
There was a limitation to this study. First, our classifier is restricted to one dataset. More data is needed to generalize the model to avoid overfitting. Second, the training set was relatively small. This may have had implications to our approach and subsequent results. Third, an error analysis was not conducted. The error analysis could have examined why certain posts were misclassified or classified correctly.

Conclusion
The current study examines a triage classifier using features derived only from the textual content of the post. Various lexicons were used to analyse the value of lexical resources on the text classifier for triaging posts. Lexical resources alone were not enough to build a good performing classifier; however, a solution that includes lexicons with other features derived from the content of the posts performed well in identifying crisis posts. Qualitative investigation on the crisis posts found six salient linguistic characteristics. While qualitative findings are still formative, more work is needed to translate these findings into features that can improve the overall performance.