The Wayback Machine - https://web.archive.org/web/20240118184043/https://www.geeksforgeeks.org/how-tp-find-relevant-emoji-from-text-on-the-command-line/
Open In App
Related Articles

How to find relevant emoji from text on the command-line?

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

An emoji can be said to be a small image or symbol which can be used most often in place of small text or phrase to describe a situation or to express an idea or emotions. Therefore, it has now become important in today’s era to add emoji integration in the messaging, text editor apps to make use of emoji features. There is also a very decent approach to use emojis on the command line, which will replace the relevant keywords with the emojis which is more appropriate. Therefore, we have to follow certain steps to implement such a feature in our command line.

Step 1 : Our first step should be to check whether we have the latest version of Node.js installed on our computer or not. To Check that open up a terminal or command prompt on your computer and type the following command

$ node -v 

Console output : If something like this in the terminal is displayed then you have node.js already installed but please make sure to check that the version number displayed is the latest one and if you don’t see any output after putting in the command then please download the latest version of Node.js from their official website. Refer to this article.

Step 2 : In our second step, we will be downloading and installing the emoj package on our machine using the below command. 

$ npm install --global emoj

Console output :

Step 3 : Now as we have got our package installed on our machine, we will be trying some examples of particular keywords which can be picked up and converted into emojis easily. Therefore to do so we will have to use the emoj keyword before “the actual sentence containing a keyword or only the keyword”. For example ” emoj horse”, ” emoj train ” etc, and press Enter.

Console output :

Learn to code easily with our course Coding for Everyone. This course is accessible and designed for everyone, even if you're new to coding. Start today and join millions on a journey to improve your skills!

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Last Updated : 23 Feb, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials