DevTalesShrey Profile Banner
Shreyansh Jain Profile
Shreyansh Jain

@DevTalesShrey

Followers
107
Following
179
Media
100
Statuses
267

Software engineer | IIT Roorkee grad πŸŽ“ | Passionate about coding | Blogger πŸ“ | Networking enthusiast 🌐 | Python | C and C++ | JavaScript | Git | React | Node

Bangalore, India
Joined August 2023
Don't wanna be here? Send us removal request.
@DevTalesShrey
Shreyansh Jain
2 years
Learn Python - Day 13 Topic: Swapping variables in python # Assuming we have two variables, a and b a = 1 b = 2 # To swap the values of a and b a, b = b, a # Now, a is 2 and b is 1 #SoftwareDevelopment #SoftwareEngineering #100DaysOfCode #buildinpublic #Python
2
3
29
@DevTalesShrey
Shreyansh Jain
2 years
The output from print would typically be a single line which can be hard to read, especially if the dictionary is large. The output from pprint, on the other hand, would be neatly formatted with line breaks and indentation.
0
0
1
@DevTalesShrey
Shreyansh Jain
2 years
In the below example, we have tried to print the data using print and pprint.
1
0
1
@DevTalesShrey
Shreyansh Jain
2 years
Pretty Printing in python: pprint is a python module that provides a capability to "pretty-print" arbitrary Python data structures in a formatted and more readable way. Thread: 🧡 #Python #pythonprogramming
1
0
1
@DevTalesShrey
Shreyansh Jain
2 years
Disadvantages of stemming: β€’ Loss of Semantic Meaning β€’ Generation of Non-Words β€’ Overstemming and Understemming Errors β€’ Part-of-Speech Ambiguity
0
0
2
@DevTalesShrey
Shreyansh Jain
2 years
Advantages of stemming: β€’ Reduction in Vocabulary Size β€’ Increased Recall in Information Retrieval β€’ Faster Processing β€’ Simplicity β€’ Language Support
1
0
2
@DevTalesShrey
Shreyansh Jain
2 years
Examples of stemming: running - run climber - climber programming - program programs - program programmers - programm
1
0
0
@DevTalesShrey
Shreyansh Jain
2 years
Stemming in NLP is a text normalization technique used to reduce words to their root form or base stem. It is a simpler process that chops off word endings based on common prefixes and suffixes, often without consideration of the context in which a word is used. #AI #NLP #python
2
0
4
@DevTalesShrey
Shreyansh Jain
2 years
Today, I was going through the "solutions" section of one of the Leetcode problems, I stumbled upon my solution, which had around 560 upvotes! Reading through the comments brightened my day; it was awesome to see positive feedbacks. Have you tried it? https://t.co/Iem82U9PUD
Tweet card summary image
leetcode.com
Can you solve this real interview question? Sum of Distances in Tree - There is an undirected connected tree with n nodes labeled from 0 to n - 1 and n - 1 edges. You are given the integer n and the...
1
0
2
@DevTalesShrey
Shreyansh Jain
2 years
(5/5): Thanks for reading. If you like my post, do like 🩷, follow @DevTalesShrey and re-tweet ♻️ See you in the next post 🀟
0
0
0
@DevTalesShrey
Shreyansh Jain
2 years
(4/5): word_tokenize is used to generate list of words.
1
0
0
@DevTalesShrey
Shreyansh Jain
2 years
(3/5): sent_tokenize() is used to generate list of sentences. In the below example we got 4 sentences.
1
0
0
@DevTalesShrey
Shreyansh Jain
2 years
(2/5): Importing libraries
1
1
0
@DevTalesShrey
Shreyansh Jain
2 years
(1/5) Tokenizing in NLP: When processing natural language text, tokenization usually involves dividing the text into words, phrases, symbols, or other meaningful elements called tokens. Thread: 🧡
1
0
2
@DevTalesShrey
Shreyansh Jain
2 years
You can use "spellcheck" to check the confidence of the word that it fixes.
0
0
0
@DevTalesShrey
Shreyansh Jain
2 years
You can use the "correct" function of the TextBlob to fix the spellings. In the below example, I am fixing a sentence.
1
0
0
@DevTalesShrey
Shreyansh Jain
2 years
Installing textblob
1
0
0
@DevTalesShrey
Shreyansh Jain
2 years
Spelling check using TextBlob (NLP) #Python #NLP #AI #MachineLearning TextBlob provides a simple API for common NLP tasks such as POS tagging, phrase extraction and more. One of the features of it is to correct "spelling mistakes" in a given text. ThreadπŸ§΅πŸ”½
1
0
1
@DevTalesShrey
Shreyansh Jain
2 years
String Formatting Operator % #Python #pythonprogramming The string formatting operator % allows you to format strings with specific formatting instructions, including inserting values into a string.
0
0
2
@DevTalesShrey
Shreyansh Jain
2 years
Print "most common words"
1
0
1