‘ED Safe Space’–Deploy NLP Classifier on Android

ED Safe Space

There are five Stages of Change that occur in the recovery process of eating disorders: Pre-Contemplation, Contemplation, Preparation, Action, and Maintenance (NEDA). Pre-Contemplation is the stage where individuals have no intention to change behavior in the foreseeable future. Many of them are unaware or under-aware of their problems. This stage is also known as ‘denial’.

The purpose of building an app, either mobile or web-based, is to create a ‘safe space’ for people at early stages of eating disorders recovery to talk and ask questions, without being ‘judged’ by other human beings. It’s common that patients who are at these early stages feel scared and ashamed to share their thoughts and behaviors with others, even with close ones, let alone seeking for help.

By sending a text message to our app, people can talk freely about what’s really going on in their mind concerning eating disorders, without worrying about being heard by anyone else, the NLP algorithm is just a ‘robot’.

The app will then offer some feedbacks corresponding to the classification results returned by the pre-trained NLP classifier. If the message shows higher risks of eating disorders, the feedback can include educational information, professional recovery communities, treatment resources and helplines, with regards to eating disorders.

If scored having low risk, we can offer other educational information about eating disorders, and help being supportive of eating disorder recovery community.

Scratch Ideas of Software Development
software design

For now, we only consider two groups of major users.

Doctors who use our app can submit text they consider to show higher risks of eating disorders, or clinical diagnosis of patient messages. With both text and label, we will be able to retrain our model to update it with new accurate training dataset.

Patient can send text input to the app and get a considerate feedback based on predictions from NLP classifier.

We will explore more functionality to develop in the future.

Demo App on Android

We have developed a demo mobile app on Android platform. Let’s take a quick look!

After training a Bert NLP Classifier (BERTNLClassifier) using TensorFlow Lite, we save the model as ‘tflite’ file and deploy it on Android platform, coding in Android Studio.

For now, this demo app only functions to test that the Bert NLP Classifier is working correctly. It takes a text input and outputs the probability of this input text belongs to each four group of forums.

In the case we can see from the picture, the classifier is doing a fine job distinguishing eating disorders post and dieting posts.

Welcome to APP development! We need more help.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: