<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Nexxt Intelligence Engineering - Medium]]></title>
        <description><![CDATA[Software engineering stories from Nexxt Intelligence, a Toronto-based insight-tech company that builds web, mobile and AI/NLP technologies to help businesses better understand their customers. - Medium]]></description>
        <link>https://medium.com/nexxt-intelligence-engineering?source=rss----9afb8861be71---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Nexxt Intelligence Engineering - Medium</title>
            <link>https://medium.com/nexxt-intelligence-engineering?source=rss----9afb8861be71---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 10:26:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/nexxt-intelligence-engineering" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Visualizing Moods with an EmojiCloud]]></title>
            <link>https://medium.com/nexxt-intelligence-engineering/visualizing-moods-with-an-emojicloud-7e6ece5cf327?source=rss----9afb8861be71---4</link>
            <guid isPermaLink="false">https://medium.com/p/7e6ece5cf327</guid>
            <category><![CDATA[market-research]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[emotion-analysis]]></category>
            <dc:creator><![CDATA[Amit Chaudhary]]></dc:creator>
            <pubDate>Mon, 29 Jun 2020 11:55:42 GMT</pubDate>
            <atom:updated>2020-08-19T12:21:26.377Z</atom:updated>
            <content:encoded><![CDATA[<p>At Nexxt, we are always on lookout for better ways to understand our users. While traditional techniques such as using word-cloud to visualize prominent words in a text is quite common, they are very limiting in capturing the nuances in opinion.</p><p>Recently, we have been playing with a proof-of-concept for a visualization called ‘<strong>EmojiCloud</strong>’. The idea is to create word-cloud like visualizations that reflects the moods of the user from their shared open-ended responses. The model can implicitly understand the mood from the text and generate a chart to reflect the overall mood.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YO2JtlElD2PsDox_UpFW9g.png" /><figcaption><strong>EmojiCloud</strong></figcaption></figure><p>In this post, I will walk you through the whole process with a sample use case. At the end, you will be able to generate EmojiCloud for your own text files.</p><h3><strong>Step 1: Understanding Emotions</strong></h3><p>Our first challenge is to detect the mood from an open-ended response written by the user. We will use a model called “<a href="https://github.com/nexxt-intelligence/DeepMoji">DeepMoji</a>” that has been specifically trained for this task.</p><h3>DeepMoji</h3><p>When we use social media, it’s pretty common to use emojis to express our mood. <a href="https://arxiv.org/abs/1708.00524"><strong>Bjarke Felbo et al. </strong></a>used this insight to propose an interesting paper called “DeepMoji”.</p><p>Their idea is pretty simple. We have millions of people tweeting their opinion along with emojis on Twitter. If we take those tweets and create pairs of (text, emojis) from them, we will have a huge labelled dataset of emojis without any manual annotation effort. This is depicted in the GIF below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/0*t4dmK82bbu9PbgYH.gif" /><figcaption>Idea of DeepMoji</figcaption></figure><p>Now a model can be trained on this data to predict emojis for any given text. This trained model can be directly used for emoji prediction as well as be used for transfer learning to tasks such as sentiment, emotion and sarcasm detection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6aM-maYxutmboC_y9VUCvw.png" /><figcaption>Available emojis in DeepMoji</figcaption></figure><p>DeepMoji was released on September, 2017 and was <a href="https://github.com/bfelbo/DeepMoji">originally written</a> in Keras with a Tensorflow 1.0 backend and Python 2.0.</p><p>We ported it to Python 3 and migrated the models to Tensorflow 2.0. We also have added support for direct installation from pip and added wrappers for ease of use. It’s open source and available here:</p><p><a href="https://github.com/nexxt-intelligence/DeepMoji">https://github.com/nexxt-intelligence/DeepMoji</a></p><p>You can also try out emotion prediction interactively from here: <a href="https://deepmoji.mit.edu/">https://deepmoji.mit.edu</a></p><h3>Emoji Prediction with DeepMoji</h3><p>First, we will install the DeepMoji package for prediction and wordcloud and matplotlib libraries for plotting using pip.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/46142c6026d50b5aa1aeb258029a8331/href">https://medium.com/media/46142c6026d50b5aa1aeb258029a8331/href</a></iframe><p>Now, we import the DeepMoji model and use it to predict the emojis for a list of opinions in a file. The sample file contains examples of user opinions on “<strong>working from home</strong>”.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/457fe6c1eba2d6d6ae3e40a1b6e229b9/href">https://medium.com/media/457fe6c1eba2d6d6ae3e40a1b6e229b9/href</a></iframe><h3>Step 2: Generate EmojiCloud</h3><p>Here, we create a wrapper class that takes in a list of emojis and uses wordcloud package to visualize the emojis instead of words.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/879e52298568e093cdca8b23dfcaa849/href">https://medium.com/media/879e52298568e093cdca8b23dfcaa849/href</a></iframe><p>Now we create an object of EmojiCloud by passing the font path. Default fonts available on your local systems might not support all the unicode emojis. So, we use the <strong>Symbola </strong>font to render the emojis. You can download the font from <a href="https://www.wfonts.com/download/data/2016/04/23/symbola/symbola.zip"><strong>here</strong></a> and extract the zip archive to get <strong>Symbola.ttf</strong> file. Then, you need to place it in the same directory where you create this python script and specify the path using font_path argument.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2736ba711baa531e195592ef3b50a679/href">https://medium.com/media/2736ba711baa531e195592ef3b50a679/href</a></iframe><p>You can also control the color of the EmojiCloud generated using the color parameter. You can use any of ‘yellow’, ‘blue’, ‘green’ and ‘grey’ as the color value with the default being ‘yellow’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YFYOhN1oFjJXibioR_zVNA.png" /><figcaption>Example Generated EmojiCloud</figcaption></figure><h3>Try it Yourself</h3><p>You can follow the above steps using this <a href="https://colab.research.google.com/drive/1uNQY_ewQT1D-iP0ZOLaD9H0bFXGNMzhb?usp=sharing"><strong>colab notebook</strong></a><strong> </strong>and generate EmojiCloud for your own files.</p><h3>Limitations of DeepMoji</h3><p>While DeepMoji predictions are mostly relevant, it does suffer from problems due to its training procedure on weakly-labelled tweets in the wild. We have observed few cases where certain triggers caused a specific prediction.</p><p>For example, the word “traffic” is mentioned in a positive opinion given below:</p><blockquote>It is better for our streets and traffic that not everyone is going to work all at the same time.</blockquote><p>DeepMoji predicts the above positive opinion as angry(😠). This could be attributed to the fact that it saw most association of “traffic” to anger when it was trained on tweets.</p><h3>The Nexxt Iteration</h3><p>Although EmojiCloud was a fun prototype to play around with internally, there are some severe limitations related to ambiguous and/or sarcastic use of certain emojis. With some lessons learnt, the Nexxt Intelligence team is working on a more robust model tailored to textual emotions by incorporating psychological models of human emotion.</p><p>We think this will be a powerful way to understand our users, and we’d love to hear how you might extend this idea in the comments below</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e6ece5cf327" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nexxt-intelligence-engineering/visualizing-moods-with-an-emojicloud-7e6ece5cf327">Visualizing Moods with an EmojiCloud</a> was originally published in <a href="https://medium.com/nexxt-intelligence-engineering">Nexxt Intelligence Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multilingual NLP with Microsoft Azure Services]]></title>
            <link>https://medium.com/nexxt-intelligence-engineering/multilingual-nlp-with-microsoft-azure-services-b2b0f5d219a3?source=rss----9afb8861be71---4</link>
            <guid isPermaLink="false">https://medium.com/p/b2b0f5d219a3</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Volodymyr Klymenko]]></dc:creator>
            <pubDate>Tue, 23 Jun 2020 14:13:25 GMT</pubDate>
            <atom:updated>2020-06-23T14:13:25.052Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9fWuuphHfKjOLbua" /></figure><p>It’s quite possible that you might have multilingual input if you have users from different countries, and you collect some input from them in your application. If you do any natural language processing (NLP) in your app, it can be a challenge. Obviously, if you trained your NLP models with data in English, and you try to feed it with some French text, it will fail to analyze it and produce correct results. What should you do it in this case? We will show you a simple solution <strong><em>without any NLP engineering</em></strong>!</p><p>We at Nexxt Intelligence mainly use Microsoft Azure services for our infrastructure, and we had an opportunity to work and play with some really fascinating services that Microsoft offers. In this article, we will cover a few language APIs that Azure Cognitive Services has. <a href="https://azure.microsoft.com/en-us/services/cognitive-services/#customer-stories">Cognitive Services</a> also include APIs for :</p><ul><li>Decision making</li><li>Speech<strong> </strong>processing</li><li>Computer Vision</li><li>Web search</li></ul><p>In this post, we’ll create a web application that would be able to accept input in different languages and do some sentiment analysis on this data. We‘re going to use React on the client side and Express on the back end.</p><p>Firstly, let’s discuss how this idea can be brought into life. As I promised you, we’ll avoid Machine Learning programming, and we will fully rely on Azure Services instead. This solution consists of two main parts:</p><ol><li>Normalize data, i.e. translate it into one language. Obviously, it’s going to be English in our case.</li><li>Do sentiment analysis.</li></ol><p>Both these tasks can be done by <a href="https://azure.microsoft.com/en-us/services/cognitive-services/text-analytics/">Text Analytics API</a> and <a href="https://azure.microsoft.com/en-us/services/cognitive-services/translator/">Translator API</a> from Azure Cognitive Services 🚀</p><h4>Prerequisites</h4><ul><li>Microsoft Azure account</li><li>Create resources for <a href="https://azure.microsoft.com/en-us/services/cognitive-services/text-analytics/">Text Analytics API</a> (v3.0) and <a href="https://azure.microsoft.com/en-us/services/cognitive-services/translator/">Translator API</a> (v3.0) on Azure Portal</li><li>Node.js</li></ul><h3>Let’s build it!</h3><p>Now that we have an idea of how we can implement this, let’s set up our project. I’ll split this project into two folders: client and server. I initialized a React app using <a href="https://create-react-app.dev/">create-react-app</a> in the client directory and an express app in the server directory. Also, here is the list of dependencies I’m going to use for this app:</p><h4>server</h4><ul><li>express</li><li>axios</li><li>cors</li><li>dotenv</li><li>nodemon</li></ul><h4>client</h4><ul><li>axios</li><li><a href="https://github.com/pinterest/gestalt">gestalt</a> (a cute React UI component library)</li></ul><p>You can install these dependencies by running npm install DEPENDENCY_NAME or yarn add DEPENDENCY_NAME in the corresponding folder (client or server).</p><p>How about preparing our back-end first, and then we can build UI for it?</p><p>We can start with a simple Express app template that you probably saw many times:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f61af7c7ac7e9bf009269e8563e44f24/href">https://medium.com/media/f61af7c7ac7e9bf009269e8563e44f24/href</a></iframe><p>You’ll also need a .env file with the following content:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e3a773ed4532de83a8aaa86fa988f394/href">https://medium.com/media/e3a773ed4532de83a8aaa86fa988f394/href</a></iframe><p>You should replace YOUR_URL_GOES_HERE and YOUR_KEY_GOES_HERE with the URLs and API keys you got from Azure Portal when you created resource for Text Analytics and Translator APIs.</p><p>We’ll need just two endpoints for this app: /translate and /sentiment. As you might guess, translate route would translate text into English, and sentiment endpoint would return sentiment analysis for input data.</p><p>Let’s create translate endpoint:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/62556e81fe5dbe42bc47b41b198b3059/href">https://medium.com/media/62556e81fe5dbe42bc47b41b198b3059/href</a></iframe><p>The piece of code above takes text property from request body that we would send from the front-end, splits it into an array by \n delimiter, and creates an array of objects with text property, which is a format Tranlsator API expects.</p><p>You might wonder why would we split a string into the array by \n? We do it in order to ensure that Translator API returns correct translations. Currently, this API is not capable of picking up several languages on the same string object. Even though it’s very unlikely that you would have multilingual text on the same line, we still want to have a little rule for the input data of our application:<br>if a sentence starts with a different language comparing to the previous sentence, it must be on a new line, so it can be easily identified and translated into English.</p><p>Finally, we simply make a POST request to the Translator API with this data, and all required headers and send data back to user.</p><p>sentiment endpoint is next.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/208ff6714aa64d49c8f115476bc83e90/href">https://medium.com/media/208ff6714aa64d49c8f115476bc83e90/href</a></iframe><p>It’s pretty similar to /translate, actually. The main difference is that we have a normalizeData function here that takes request body and formats it to satisfy the Text Analytics API requirements.</p><p>That’s it! Now, we can build client-side of our application.</p><p>As I mentioned earlier, we will build UI using <a href="https://gestalt.netlify.app/#/">Gestalt</a>, a library developed by Pinterest engineers, which has a lot of beautiful components.</p><p>We can start with some UI for collecting input from user and send it to our back end when a button is clicked:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e2bb233d368041f7fed39d81dd2d644c/href">https://medium.com/media/e2bb233d368041f7fed39d81dd2d644c/href</a></iframe><p>Let’s walk through this code. There are four states:</p><ul><li>text which holds the value of the TextArea input field.</li><li>overallScore which is the overall sentiment analysis score for the whole text document.</li><li>sentences which contains all translated sentences as well as their sentiment scores.</li><li>isLoading which indicates the loading state.</li></ul><p>There is also a getSentiment function that call that sends data from the text to the back end when the button is clicked. By the way, I’m running back-end locally, so my baseUrl is http://localhost:8080.</p><p>Next, we want to visualize the results that we get from the back end server. Before I do that, I’ll make a few UI components.</p><h4>ScoreBar</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a1712d21091bfaa0cfe7cb198c9f934e/href">https://medium.com/media/a1712d21091bfaa0cfe7cb198c9f934e/href</a></iframe><p>It accepts a score object as a prop, and it will look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KXRuvghqVJqgQsUitR7ygg.png" /></figure><h4>SentenceCard</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/34e730f90ace0c861ad0c5f1c9f7b558/href">https://medium.com/media/34e730f90ace0c861ad0c5f1c9f7b558/href</a></iframe><p>It accepts an emoji and a sentence as props. Sentence object will contain text and its sentiment scores. As you can see, we also use ScoreBar that we created in the prev. step. Here is how a SentenceCard will look like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*0iaWmnd48WAu2nkA8XR-WA.png" /></figure><h4>AnalysisContainer</h4><p>Finally, let’s integrate all our components into one component and visualize sentiment analysis of user’s text.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/65559bcbb0478f5fd4297ccd0c8a1eb7/href">https://medium.com/media/65559bcbb0478f5fd4297ccd0c8a1eb7/href</a></iframe><p>This components basically displays overall sentiment score using ScoreBar, all sentences from user’s input using SentenceCards, and there is also a SegmentControl component, which looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wd8voJojPr9to6wBiJ83cg.png" /></figure><p>and allows users to filter sentences.</p><p>After this is done, simply import AnalysisContainer in the App component, and put in in the end of &lt;Box display=”flex” wrap minWidth={275} justifyContent=”evenly”&gt;, passing down local state properties as props:</p><pre>&lt;AnalysisContainer<br>    isLoading={isLoading}<br>    overallScore={overallScore}<br>    sentences={sentences}<br>/&gt;</pre><h3>Demo</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T7fnd_yY44DIzWQRdeudOg.gif" /></figure><h3>Final thoughts</h3><p>In this post, I showed you how to build a simple NLP application that can do sentiment analysis <em>only</em> using cognitive services available on Azure. Definitely, this solution isn’t perfect and may not work well with complex input data. Even when I tested with some simple data, I was not always satisfied with the results as it could show a high positive sentiment score on quite obvious neutral statement. This is one of the reasons why we do a lot of in-house NLP Research &amp; Development at Nexxt Intelligence.</p><p>On the other hand, developing this application didn’t even involve any line of NLP-related code! It would be fair to mention that Azure Text Analytics has “ <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking?tabs=version-3">named entity recognition</a>” feature which lets you identify different entities and categorize them, but it’s far beyond the scope of this post. Also, note that <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/language-support?tabs=sentiment-analysis#language-list-and-status">it currently supports only 19 languages, and Text Analytics API v3.x is not available in Central India, UAE North, China North 2 and China East</a>.</p><p>Source code is available on GitHub:</p><p><a href="https://github.com/nexxt-intelligence/multilingual-nlp">nexxt-intelligence/multilingual-nlp</a></p><p>Hope you enjoyed this reading! Feel free to share and give this post a few claps so others can enjoy it too 👏</p><p>If you have any questions, drop a comment below 👇</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2b0f5d219a3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nexxt-intelligence-engineering/multilingual-nlp-with-microsoft-azure-services-b2b0f5d219a3">Multilingual NLP with Microsoft Azure Services</a> was originally published in <a href="https://medium.com/nexxt-intelligence-engineering">Nexxt Intelligence Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>