<?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[Stories by Anmol Pant on Medium]]></title>
        <description><![CDATA[Stories by Anmol Pant on Medium]]></description>
        <link>https://medium.com/@anmolpant?source=rss-7de3668498e7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*HcYb2gwebHZdh70o7L52AQ.jpeg</url>
            <title>Stories by Anmol Pant on Medium</title>
            <link>https://medium.com/@anmolpant?source=rss-7de3668498e7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 16:02:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anmolpant/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The ABC of (Online) Campus Placements.]]></title>
            <link>https://medium.com/codechef-vit/the-abc-of-online-campus-placements-70ca59091020?source=rss-7de3668498e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/70ca59091020</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[stem]]></category>
            <category><![CDATA[campus-placements]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Anmol Pant]]></dc:creator>
            <pubDate>Thu, 19 Aug 2021 07:20:00 GMT</pubDate>
            <atom:updated>2021-08-19T07:20:00.601Z</atom:updated>
            <content:encoded><![CDATA[<h4>The complete roadmap to demystify the Campus Placement process for final, prefinal, sophomore, and freshmen years alike.</h4><p>Campus placements can be a tough nut to crack, considering the sheer vastness of knowledge that is expected from a candidate, coupled with the ever uncertain factor of luck.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*UrgTv1238d0rzm1M9Dp-kQ.jpeg" /><figcaption>Image Courtesy — <a href="https://admission.aglasem.com/">https://admission.aglasem.com/</a></figcaption></figure><p>I, as a matter of fact, was fortunate enough to bag a superdream offer within 3 weeks of the commencement of the placement season and since then have been bombarded with doubts, by final years and juniors alike, as to how one should go about the preparation, what to expect in interviews and the resources one should refer for the same.</p><p>This blog would be a humble yet extensive attempt to tackle the above predicaments; including the Do’s and Dont’s, personal experiences, important topics, resources, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*FdNNJKJivAxyIaBB61e2FQ.jpeg" /></figure><h4>★ Have substantial command over one object-oriented language.</h4><p>Choose any one object-oriented programming language, and try to master it as if it were your mother tongue.<strong><em> Knowing the mere basics of 7 languages might not land you anywhere, being proficient in just one, might.</em></strong> Face-to-face interviews, more often than not, involve live coding; where being well versed with the syntax, jargon, and definitions of the language of choice becomes a necessity with no Google to help you debug errors and lookup syntaxes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*PHmolGRC6vY7XvjeHS0WrA.png" /><figcaption>Image Courtesy — <a href="https://in.pinterest.com/pin/273171533626638788/">https://in.pinterest.com/pin/273171533626638788/</a></figcaption></figure><p><strong>C++</strong> and <strong>Java</strong> happen to be the most common programming languages amidst aspiring developers for problem-solving and DSA. Python, due to its over-simplistic nature, is seen as something anyone can pick up in a short span of time and hence, seldom might be seen with an eye of inferiority by <strong><em>some</em></strong> interviewers, compared to its counterparts.</p><h4>★ Don&#39;t underestimate DSA and Competitive Programming. 💻</h4><p>Your understanding of diverse technologies and frameworks comes second, <strong><em>your prowess in competitive programming and your mastery over DSA comes first</em></strong>.</p><ul><li><strong><em>The ‘Why?’</em></strong></li></ul><p>One common question people often have is —</p><blockquote>“But if we have to work on domains like - client and server-side development, machine learning, AR/VR, cloud computing, etc. in the corporate world anyway, isn’t the system flawed as it tests the knowledge in an entirely unrelated domain instead of development centric frameworks?”</blockquote><p>The straightforward answer to this is —<strong><em> “No”</em></strong>. The system isn’t flawed, it is just ‘<strong><em>standardized</em></strong><em>’</em>. Just like the <strong><em>Joint Entrance Examination (JEE)</em></strong> follows a standard of testing an aspirant&#39;s knowledge in Physics, Chemistry, and Mathematics and not the specific branch of engineering that the candidate is aiming for, DSA has been established as a fundamental benchmark in the software engineering sector, which each candidate is tested against.</p><p>An expertise in Data Structures and Algorithms not only gives one an edge in the initial online coding tests but also in the technical interviews, which more often than not is the deciding factor in whether or not the candidate progresses to the subsequent interview rounds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*EU7jge4ZHjQTj-Twjh0pGQ.png" /><figcaption>Image Courtesy — @Salman Chishti on LinkedIn</figcaption></figure><ul><li><strong><em>The ‘How’?</em></strong></li></ul><p>Dedicating a good<strong> 3–4 months</strong> solely to data structures and algorithms right before your placement season can do wonders in enhancing your placement prospects by many a fold.</p><p>There are abundant resources online for programmers with varying degree of dexterity and command over DSA. <a href="https://www.codingninjas.com/courses/java-data-structures-and-algorithms">Coding Ninjas’ — Data Structures and Algorithms in Java course</a> along with <a href="https://www.youtube.com/c/AdityaVermaTheProgrammingLord/featured">Aditya Verma’s</a> &amp; <a href="https://www.youtube.com/channel/UCZCFT11CWBi3MHNlGf019nw">Abdul Bari’s</a> Youtube channels, were my go to resources for referring, learning, and practicing concepts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uF6osO68PwFh_OulWZDx8g.jpeg" /></figure><p>For solving problems, I primarily used <a href="https://www.codingninjas.com/">Coding Ninjas</a>, along with <a href="https://leetcode.com/">Leetcode</a>, <a href="https://www.geeksforgeeks.org/">GeeksforGeeks</a>, and <a href="https://www.interviewbit.com/">InterviewBit</a>; some other popular platforms include <a href="https://www.codechef.com/">CodeChef</a>, <a href="https://codeforces.com/">Codeforces</a>, <a href="https://www.hackerrank.com/">HackerRank</a>, etc. <strong><em>A platform, in the end, is only as good as the level and number of problems on it</em></strong>, and the above names are unfamiliar to none.</p><p>As they say, “<em>Problem Solving, like mathematics, often gets better in proportion to the time spent practicing &amp; the standard of problems practiced</em>”, and hence the <strong><em>quality of problems should always be given priority over the sheer number of problems solved</em></strong>. Most coding platforms (including the ones above) often categorize problems based on topics and difficulty level to fulfill this very purpose.</p><p>Maintain a <a href="https://github.com/">GitHub</a> repository to keep track of your daily progress and problems solved across multiple platforms. The darker those green dots get, the more motivated you’ll find yourself. 📗</p><h4>★ Aptitude goes a long way.</h4><p><strong><em>Quantitative aptitude</em></strong> or <strong><em>Quants</em></strong>, has a reputation of being an underrated and neglected section that often leads to one’s undoing during online tests. Most of the companies now boast of incorporating a Quantitative Aptitude section in their programming tests, that carries a substantial, if not equal, weightage to the coding section.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ftenor.com%2Fembed%2F6081931&amp;display_name=Tenor&amp;url=https%3A%2F%2Ftenor.com%2Fview%2Fconfused-math-what-wtf-peep-gif-6081931&amp;image=https%3A%2F%2Fc.tenor.com%2FCowGNQSUsOYAAAAC%2Fconfused-math.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=tenor" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/1540dd2ad600f82ab449508ff928f8cd/href">https://medium.com/media/1540dd2ad600f82ab449508ff928f8cd/href</a></iframe><p>Quants can be daunting primarily because of its sheer vastness, testing both the mathematical and the logical aptitude of the candidate. Though Quants can’t possibly be summed up in a definite list, below are some of the topics that have found themselves in almost every online test I have appeared in —</p><ul><li>Pipes and Cisterns</li><li>Profit and Loss</li><li>Ratio and Proportions</li><li>Work and Wages</li><li>Cube Cutting</li><li>Distance and Speed</li><li>Permutation and Combination</li><li>Probability</li><li>Time and Work</li><li>Arrangements</li><li>Directions</li><li>Blood Relations</li><li>Number and Alphabet Series</li></ul><p><a href="https://www.indiabix.com/">IndiaBix</a> has an extensive collection of almost all forms of questions previously asked in numerous examinations and is hands down the best repository online for practicing and mastering Quantitative Aptitude.</p><h4>★ Never neglect your core subjects.</h4><p>In the words of <a href="https://medium.com/u/cfb227e047dc">Ishaan Ohri</a> —</p><blockquote>“You cannot become a coder overnight, but you can sure ameliorate the knowledge of your core subjects the night before your interview.”</blockquote><p>If DSA is the gold medalist when it comes to the degree of importance during placements, Core subjects are hands down the runners-up; and hence something one can’t afford to neglect, especially in technical interviews and online rounds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AgcbY_REvVMCeeip4-wRmQ.jpeg" /></figure><p>Some of the most commonly asked core subjects along with their subsequent difficulty level are —</p><ul><li>OOPs- (intermediate)</li><li>Operating Systems- (intermediate)</li><li>Database Management Systems (DBMS)- (intermediate)</li><li>Network and Communication- (basic)</li><li>Internet and Web Programming- (basic)</li><li>Software Engineering- (basic)</li></ul><p>An in-depth knowledge of just the definitions and grassroot level concepts of the above subjects would give you a cushion to fall back on, in case you are unable to solve/code a question, in a face-to-face interview, to perfection.</p><p><a href="https://www.interviewbit.com/">InterviewBit</a> has an extensive compilation of 100+ interview questions spanning across all major subjects; and is something I’d highly recommend one to look into, to brush up the basics in a short span of time (say, the night before the interview 😏 ).</p><h4>★ Make an impactful first impression. 👼</h4><p>No matter how many rounds of interviews a company might have, what the company profile might be, what role they may be hiring for, etc. A common question that often arises irrespective of the nature of the interview (technical or non-technical) is —</p><blockquote>“Tell me something about yourself”.</blockquote><p><strong><em>The interviewer, more often than not, expects more than just a mere recitation of your CV/ Resume.</em></strong> Shed some light yourself as an individual, as a professional, your USP, and what you bring to the table. The more it’s dissimilar to your resume, the better.</p><p>Often a <strong>1.5–2 minute</strong> long introduction covering all fronts (not just technical) is enough to do the trick, gives you a hell lot of self-confidence, and often dictates the entire vibe of the interview ahead. Hence, make sure your first impression (ie. the answer to this question) is a lofty and enduring one.</p><h4>★ Believe in SQL supremacy. 🙏</h4><blockquote>“TechStacks are temporary, Databases are permanent.”</blockquote><p>React replaced HTML, NodeJS replaced PHP, Flutter replaced Android Studio, Python replaced R. Technologies and frameworks change by the second, the only commodity unalterable is, the <strong><em>data</em></strong> they act on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*e-mdQ8UrjPDHXITjkNDwRg.png" /><figcaption>Image Courtesy — <a href="http://www.devhumor.com/">www.devhumor.com</a></figcaption></figure><p>Independent of the company type (Product or Sevice based), or the role they are hiring for (Web/App Dev, Analyst, SDE, ML/DL Engineer, etc.), chances are you will be working with data and hence, databases, at some point or another. Companies, more often than not, prefer candidates with prior knowledge of database concepts, writing meaningful queries, performing joins and CRUD operations, etc.</p><p>To test a candidate’s prior knowledge, SQL questions are either included in the online test itself or asked in face-to-face technical interviews. In my case too, after the coding questions, I was asked to write three SQL queries ranging from retrieval to assigning keys to performing joins and normalizations.</p><p>In the end, getting the SQL queries right was what ruled the outcome of the technical interview in my favor. Therefore, one cannot afford to underestimate the vitality of SQL and DBMS.</p><h4>★ Have a bulletproof resume. 📃🔫</h4><p>A common misconception people usually have is believing that the sheer scope of the technical interview is too vast. It is not. <strong><em>Most employers don’t expect freshers to be omniscient</em></strong>. But, what they do expect from the candidate is to be thorough with just one or two pages of information; ie. your Resume.</p><blockquote>“CGPA will get you shortlisted, DSA will get you to the interviews, Resume will get you the offer.”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*8GgClD_xP9KD6EhMGnT7HA.jpeg" /></figure><p>Often a one or two-page document with subdivisions like — Education, Work Experience, Positions of Responsibility, Organizations, Projects, Achievements, Certificates, etc. usually does suffice. Most of the companies have a resume-specific technical interview round that is mostly Projects and Internships centric, although the scope of the same is decided by the contents of your Resume. <strong>Hence, one wants to make sure that no subdivision (especially Projects and Work Experience) has been left blank.</strong></p><ul><li><strong><em>Projects </em>📔</strong></li></ul><p>Probably the only phase in the campus recruitment process where your development skills have a chance to shine. Include 4–5 of your personal projects which you are absolutely thorough with, questions on projects are often along the lines of— ‘<em>What have you built?’ , ‘Why?’, ‘What problem does it solve?’, tech stacks used</em>, etc.</p><ul><li><strong><em>Work Experience </em>👷</strong></li></ul><p>Having a couple of internships under your belt shows that you are somewhat <strong><em>familiar with working in an industrial/corporate environment</em></strong> and gives you an edge over your counterparts<strong><em>.</em></strong> Questions regarding Work Experience often revolve around the company profile, your role, the project you worked on, your individual contributions, and the technical &amp; soft skills acquired during the tenure of the internship.</p><p>Lastly, making a resume that is <em>aesthetically pleasing</em> to look at, and at the same time drives home all the necessary information, is quite a time-consuming task in itself. <a href="https://novoresume.com/">Novoresume</a> offers a wide range of templates and intuitive designs to choose from and would top the charts as far as personal recommendations for online resume makers go.</p><h4>★ Confidence Counts 😎</h4><p>Being underconfident and being nervous, though often used interchangeably, are two entirely different things, especially in the context of an interview.</p><blockquote>“At times you can afford to be underprepared, but not under confident.”</blockquote><p>The role you are applying for will most likely require you to be decisive and confident so that you can take initiative and get things done. Often Managerial and HR interviews are conducted not to check your knowledge, but your confidence level in situational-based questions and how you react to the pressure of a panel of interviewers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*tPYSun_wVSr1vtHNSYWRaQ.png" /><figcaption>Image Courtesy — me.me</figcaption></figure><p><strong><em>You should enter every interview with a level of confidence that reflects your ability to perform effectively in the job.</em></strong> If it&#39;s an in-person interview, your body language speaks volumes about your confidence levels, in online mode, your way of maintaining eye contact and speech patterns are the prime indicators. <strong><em>Showing confidence is a sign that you trust yourself and your trust in yourself is critical because it can lead your interviewer to show trust in you</em></strong>.</p><p>So calm your fidgeting, maintain natural and steady eye contact, dawn a smile, and don’t let nervousness get the better of you. 💪</p><h4>★ Have a Mentor. 🎓</h4><p>The campus placement process is something that varies starkly across campuses, with the Training and Placement Office (TPO) being the governing body and formulating the rules and procedures one must adhere to.</p><p>Being in touch with a senior from your own institution, who has attended the placement process, keeps you aware of the protocols and procedures specific to your campus, the past placement records, the DOs &amp; Don’ts, etc.</p><p>After all,</p><blockquote>“Its better to learn from experience than from mistakes.”</blockquote><h4>★ Take everything in your stride. 🙌</h4><blockquote>“Until it’s my turn, I will keep clapping for others happily.”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*wiIPIukLXIgVZjnN3NoacQ.png" /><figcaption>Image Courtesy — <a href="http://www.dreamstime.com/">www.dreamstime.com</a></figcaption></figure><p>Last, but not least (<strong><em>probably the most important</em></strong>), don’t get dishearted. Campus placements can be draining at times, especially when you feel your efforts are not yielding fruit. Remember that <strong><em>you will have enough opportunities to prove your mettle, and comparisons, only lead to self-doubts</em></strong>. It’s natural to feel a sense of desolation after every rejection, whilst watching your peers getting placed, but that time and energy, are better channeled elsewhere, especially during the placement season.</p><p>I, for myself, didn’t even get shortlisted for 10+ companies and was rejected post the coding round in half a dozen others. <strong><em>Take every rejection as a learning experience rather than a shortcoming; sometimes, it&#39;s just not your day.</em></strong></p><h4><strong><em>Lastly, summing it all up for each year.</em></strong> ✨</h4><ul><li><strong><em>Final Years</em></strong> — keep your hopes high and try to do your level best in each and every online test, keep yourself updated by participating in rated contests to check your time management skills during actual placement tests. <strong><em>Dedicate equal time to both coding and core subjects.</em></strong></li><li><strong><em>Pre-Final Years</em></strong> — work on your problem-solving skills (DSA) and try to undertake a few internships if possible, to add weight to your resume.</li><li><strong><em>Sophomores</em></strong> — work on learning, exploring, and mastering different development frameworks and domains by building projects.</li><li><strong><em>Freshers</em></strong>— For now, just focus on your academics and maintaining a good enough CGPA.</li></ul><p>If you have stuck around for so long till the very end, I&#39;m sure you’re as familiar with the on-campus recruitment process as I am, without actually attending it. 😅<br>Let me know your thoughts in the replies if you feel that I missed out on something. Share it amidst your circles so that it reaches the people who might find it helpful.</p><p><strong><em>Do drop some claps </em>👏<em> (and maybe a follow </em>👼<em>) if you found the article informative; and may you ace the placement season. </em>✌️</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70ca59091020" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codechef-vit/the-abc-of-online-campus-placements-70ca59091020">The ABC of (Online) Campus Placements.</a> was originally published in <a href="https://medium.com/codechef-vit">CodeChef-VIT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Menacing Trend of the Rise in Politically Motivated Protests & Violence in India.]]></title>
            <link>https://medium.com/politically-speaking/the-menacing-trend-of-the-rise-in-politically-motivated-protests-violence-in-india-363e63903f0b?source=rss-7de3668498e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/363e63903f0b</guid>
            <category><![CDATA[protest]]></category>
            <category><![CDATA[indian-politics]]></category>
            <category><![CDATA[farmlaws2020]]></category>
            <category><![CDATA[india]]></category>
            <category><![CDATA[politics]]></category>
            <dc:creator><![CDATA[Anmol Pant]]></dc:creator>
            <pubDate>Fri, 13 Aug 2021 23:00:57 GMT</pubDate>
            <atom:updated>2021-08-13T23:00:57.032Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Menacing Trend of the Rise in Politically Motivated Protests &amp; Violence in India</h3><h4>All too common to no longer be labeled as a mere coincidence or dissent from the Government&#39;s policies, but as a full-fledged smear campaign by holding the nation at ransom.</h4><p>A widely anticipated policy that had been included in the manifesto of multiple political parties for years, at long last, passes in the parliament; <a href="https://twitter.com/rishibagree/status/1335489544058064898?ref_src=twsrc%5Etfw%7Ctwcamp%5Etweetembed%7Ctwterm%5E1335490285095198720%7Ctwgr%5E%7Ctwcon%5Es2_&amp;ref_url=https%3A%2F%2Fwww.thetatva.in%2Findia%2Fwhy-did-these-same-farmer-unions-demanded-the-3-laws-in-2008-and-now-theyre-protesting%2F">the very section who once stood in solidarity</a> with the bill incites violence, the bill goes on hold — the above vicious cycle is now far too familiar to the Indian common folk, as the <a href="https://en.wikipedia.org/wiki/Bharatiya_Janata_Party">BJP Government</a> completes 7 years of its administration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*jh9-gy94DOtmYZ9wS7JTVQ.jpeg" /><figcaption>Farmers at Singhu Border on outskirts of Delhi protesting against the 3 farm laws [IMAGE — AP Photo]</figcaption></figure><p>The Government too has to be held liable and accountable for lacking the perspicacity and far-sightedness whilst being a mere mute spectator and doing nothing to curb the misinformation that is spreading on social media and other media houses regarding their policies, which more often than not, has played a major role in brainwashing a particular section of our population, against the Government, and in the long run, against the law, against the country.</p><p>The ongoing <a href="https://en.wikipedia.org/wiki/2020%E2%80%932021_Indian_farmers%27_protest">farmers’ protest</a>, that started as a dissent and was open to deliberation, has now turned completely political, with different political sections trying to capitalize on the ongoing bandwagon and detract it for their personal agendas against the Government; be it <a href="https://www.timesnownews.com/india/article/farmers-protest-at-tikri-border-group-demands-release-of-umar-khalid-varavara-rao-others/693269">freeing political prisoners</a>, <a href="https://www.dnaindia.com/india/report-dna-explainer-how-khalistan-supporters-are-conspiring-to-use-farmers-protest-to-unleash-mayhem-in-india-2877111">demanding separate states</a>, <a href="https://www.bbc.com/news/uk-55793731">instigating violence</a> on days of national importance or <a href="https://indianexpress.com/article/india/farmers-protest-live-updates-sadbhavna-divas-singhu-ghazipur-tikri-7167452/">defamation of the country’s administration</a> on a national and international level.</p><p>The farmers’ protest, unlike its <a href="https://timesofindia.indiatimes.com/blogs/blunt-frank/cause-effect-of-shaheen-bagh-protest/">Shaheen Bagh</a> counterpart, had come a long way in the numerous rounds of deliberation with the Government, with the Government offering a proposal to put the implementation of laws on hold for 18 months and finding a cordial solution to the union’s demands through a joint committee.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*JAjHJHKmJ1Ag-zXp_kpKIw.jpeg" /><figcaption>Stills from the infamous Delhi riots instigated by the Shaheen Bagh Protesters [IMAGE — asianage.com]</figcaption></figure><p>But the unions repudiated the Government’s proposition; leading to a stalemate and had since then clung onto the fact that there would be no further talks until the government promises to repeal laws completely.</p><p>The 11 rounds of dialogues coming to no particular cessation has led to a 7-month long deadlock, with both sides sticking to their original stands. Which has resulted in the Samyukta Kisan Morcha (SKM) leaders now seeking the Prime Minister’s intervention for the resumption of talks regarding the repealment of the farm laws.</p><p>The protests, that have now not only lost their indigenous direction and credibility but have deterred the international persona of the country by <a href="https://en.wikipedia.org/wiki/2021_Farmers%27_Republic_Day_protest">stirring up riots and violence</a> on a day as historically significant as <a href="https://en.wikipedia.org/wiki/Republic_Day_(India)">26th January</a>, are now being rightly accredited and recognized as one of the <a href="https://economictimes.indiatimes.com/news/politics-and-nation/farmers-protest-at-delhi-borders-may-act-as-covid-superspreader-event-experts/articleshow/79491435.cms?from=mdr">premier causes for the second COVID-19 wave</a>, and one of the reasons the number of cases in some states skyrocketed, taking the perilous form we see today, with union leaders being frequently seen<a href="https://www.hindustantimes.com/cities/chandigarh-news/hundreds-of-farmers-defy-covid-curbs-in-amritsar-head-for-delhi-to-protest-101620206602942.html"> flouting and making a mockery of the COVID-19 rules and protocols</a>, just because they have been advocated by the Government, with some going as far as branding the virus as-</p><blockquote>“a hoax to divert public attention away from the farmers’ protest”.</blockquote><p>What started as a protest against the Governments’ policies, has slowly taken the face of a systematic political vendetta and an attempt to libel the nation on a global level, <a href="https://www.hindustantimes.com/world-news/sikh-politicians-separatists-in-canada-wade-into-farmers-protest-row/story-Ls6no8yBl3HDqREIEydbhL.html">with instances of political connections with separatists</a>, <a href="https://timesofindia.indiatimes.com/india/bjp-mla-beaten-up-stripped-by-punjab-farm-protesters/articleshow/81729825.cms">violence</a>, <a href="https://www.newindianexpress.com/magazine/voices/2021/jan/03/farmers-agitation-a-recipe-for-anarchy-2243770.html">anarchy</a>, <a href="https://indianexpress.com/article/cities/delhi/fir-names-six-in-gangrape-of-26-year-old-at-tikri-protest-site-7309577/">rapes</a>, <a href="https://www.thetatva.in/india/farmers-attack-vaccination-drive-in-haryana/">blood donation &amp; vaccination camp vandalizations</a>, etc. coming to light as the nation is reeling under the second wave.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=363e63903f0b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/politically-speaking/the-menacing-trend-of-the-rise-in-politically-motivated-protests-violence-in-india-363e63903f0b">The Menacing Trend of the Rise in Politically Motivated Protests &amp; Violence in India.</a> was originally published in <a href="https://medium.com/politically-speaking">Politically Speaking</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Github to Scrape Programming Terms like ‘Master’ and ‘Slave’?]]></title>
            <link>https://medium.com/equality-includes-you/github-to-scrape-programming-terms-like-master-and-slave-4723d486e365?source=rss-7de3668498e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/4723d486e365</guid>
            <category><![CDATA[culture]]></category>
            <category><![CDATA[diversity]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[race]]></category>
            <category><![CDATA[blacklivesmatter]]></category>
            <dc:creator><![CDATA[Anmol Pant]]></dc:creator>
            <pubDate>Sat, 22 May 2021 17:52:25 GMT</pubDate>
            <atom:updated>2021-05-22T17:52:25.016Z</atom:updated>
            <content:encoded><![CDATA[<h3>Github to Scrape Programming Terms Like ‘Master’ and ‘Slave’?</h3><h4>As BLM protests continue to erupt across the United States, it’s an appreciated yet trivial move from the software company, which still has ties with ICE.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*u0Pk-feV2uAMLCfcbXUVDw.jpeg" /><figcaption>Logo Courtesy: <a href="http://www.github.com/">www.github.com</a></figcaption></figure><p>The<a href="https://en.wikipedia.org/wiki/Killing_of_George_Floyd"> killing of George Floyd</a> while in the custody of cops has set off and sparked an influx of fights and protests on the racial foul play that has proceeded continually in the United States for a considerable amount of time. As the collective indignation at the incident developed in the US, various organizations raised their voice with the protesters. These include numerous household brands, clothing, and fashion retailers, sporting companies, game publishers, fast food chains, and media outlets that are giving substantial donations to the Black Lives Matter (<a href="https://blacklivesmatter.com/">BLM</a>) foundation to play their part in this fight against systematic oppression.</p><p>As the difference in just adopting a hashtag for brand activism and actually taking these beliefs to your boardroom is monumental, we will not be delving too deep into the socio-economic aspects of the same, but more into the nuances of what the benefaction of these tech giants means for techies and for the community as a whole.</p><p>When many organizations have not backed their claims with significant contributions and are yet to set the ball rolling, some tech behemoths — like Apple, Amazon, Microsoft, and others, have followed upon their reassuring words with generous donations, with Microsoft taking it a step further by making its firm, GitHub, used by over 50 million <strong>developers abandon decade-old coding terms to remove references to slavery.</strong></p><p>GitHub Chief Executive <a href="https://twitter.com/natfriedman?lang=en">Nat Friedman</a> said on Twitter about the tech community taking steps to rename and revise certain terminologies — particularly, to switch that of the default branch structure from ‘<strong><em>master</em></strong>’ to ‘<strong><em>main</em></strong>.’ This is a major step in a more extensive campaign to remove such rudimentary terms from software jargon altogether.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*uBnR9emdCuf6NrwHDRhAVA.png" /><figcaption>Image Courtesy: <a href="https://twitter.com/natfriedman">https://twitter.com/natfriedman</a></figcaption></figure><p>The master-slave relationship in technology and software development has always referred to a system where the master controls or has access to all other copies or processes. A GitHub spokesperson also said that they will soon be changing the default branch name from master and making it easier for the users to set their own customized names for default branches. The users will also be getting the alternative to rename their default branch in already existing repositories and projects.</p><p>Although Github might not be the only website removing and changing terminologies, with <em>Apple</em> and<em> LinkedIn</em> engineers voicing their opinions into amending and modifying terms like ‘<strong><em>whitelist</em></strong>’ and ‘<strong><em>blacklist</em></strong>’ to ‘<strong><em>allowlist</em></strong>’ and ‘<strong><em>blocklist</em></strong>’ instead; it is most certainly one of the largest platforms to do so, hosting numerous widely used libraries and frameworks that still make use of the conventional jargon. With users and developers following the bandwagon of opening issues for a bunch of libraries that employ these phrases, sustainers of many notable frameworks are not only complying but also actively incorporating these changes into their ecosystems. Here is what <a href="https://twitter.com/jamuhl?lang=en"><strong>Jan Mühlemann</strong></a>, maintainer of <a href="https://github.com/i18next/i18next/"><strong>i18n</strong></a>, one of the most popular react ecosystems on GitHub had to say on this accord.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rD9HUvWUtGlxPjdswUysqw.png" /><figcaption>Image Courtesy: <a href="https://github.com/i18next/i18next/issues">https://github.com/i18next/i18next/issues</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_uM6ARlQiDO2BBliH0QBoA.png" /><figcaption>Image Courtesy: <a href="https://github.com/i18next/i18next/issues">https://github.com/i18next/i18next/issues</a></figcaption></figure><p>It is true that while many developers could be risking failures on numerous fronts as decade-old frameworks and libraries try to incorporate these changes, but it is also true that it&#39;s not the first time something along these lines has been attempted and even accomplished to perfection. <a href="https://www.python.org/"><strong><em>Python</em></strong></a> and <a href="https://www.chromium.org/"><strong><em>Chromium</em></strong></a> are the best examples, with Python programming language successfully removing such references from its documentation in 2018 and Chromium, one of the most widely used open-source browser project developed by Google, also made the change to more racially objective and inclusive language striking out terms like ‘<strong><em>blackhat</em></strong>’ /’<strong><em>whitehat</em></strong>’ &amp; ‘<strong><em>blacklist</em></strong>’/’<strong><em>whitelist</em></strong>’ that reiterated the notion of black being equated with something bad and undesirable and white being equated with something acceptable and beneficial.</p><p>While the fight against systematic racial injustice and inequality is still a far cry away from being won, this step could well potentially act as a major pedestal that creates a ripple effect leading to technical corporations becoming not only a more inclusive, but also a more welcoming place for people of color.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4723d486e365" width="1" height="1" alt=""><hr><p><a href="https://medium.com/equality-includes-you/github-to-scrape-programming-terms-like-master-and-slave-4723d486e365">Github to Scrape Programming Terms like ‘Master’ and ‘Slave’?</a> was originally published in <a href="https://medium.com/equality-includes-you">Equality Includes You</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NLP 101 — Data Preprocessing & Representation Using NLTK.]]></title>
            <link>https://medium.com/codechef-vit/nlp-101-data-preprocessing-representation-using-nltk-def9b01194ce?source=rss-7de3668498e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/def9b01194ce</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[nltk]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Anmol Pant]]></dc:creator>
            <pubDate>Sun, 02 Aug 2020 04:37:25 GMT</pubDate>
            <atom:updated>2020-08-02T04:37:25.738Z</atom:updated>
            <content:encoded><![CDATA[<h3>NLP 101 — Data Preprocessing &amp; Representation Using NLTK.</h3><h4>An insight into how vital a role data pre-processing and representation play in Natural Language Processing and how to go about it.</h4><p><strong>NLP</strong> or<strong> Natural Language Processing</strong> primarily deals with how machines understand, convert and perceive textual data present in human-readable languages into formats that they can perform computations on. Contemporary corporates often work with huge amounts of data. That data can be moulded into a variety of different forms and formats including text documents, emails, tweets, blog posts, spreadsheets, audio recordings, JSONs, online activity logs and more. One of the most common ways that such data is recorded is via text. This text usually draws parallels to the natural languages that we use in our day-to-day conversations, both online and offline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nMhQdot34bjn3uhXzghwoA.png" /><figcaption>Image Courtesy: aliz.ai</figcaption></figure><p><a href="https://en.wikipedia.org/wiki/Natural_language_processing">Natural Language Processing</a> (NLP) is the discipline of programming computers to process, analyze and parse large amounts of this very natural textual data to build effective and generalized machine learning models. But, unlike its numeric counterpart, before this textual data can be used to build models, it must first be preprocessed, visualized, represented and moulded in such a way that it can be effectively handled.</p><p>This is where python’s <strong>NLTK </strong>or<strong> Natural Language Processing Toolkit</strong> module comes into the picture. NLTK is one of the leading platforms out there used to work with human language data. It provides ready to use, convenient methods of data handling and pre-processing that are most commonly deployed to mould the human-readable text into a workable format.</p><p>As this article adopts a more <em>hands-on approach</em> to using NLTK as a framework, I won’t be delving too deep into all the jargons and terminologies associated with it and will be addressing only the ones that are either most commonly used, or will be used in the implementation that follows. If you are still curious, do check out <a href="https://medium.com/codechef-vit/understanding-nlp-3cffc6663cdb">this</a> blog by one of our Core Committee members, that explains all the terms one might come across whilst using NLTK.</p><p>So, let’s get started.</p><h3>Tokenization</h3><blockquote><em>Tokenization is the process of segmenting and dividing the given block of text into sentences or words. That is, all punctuation marks and special characters are first removed and the character strings then obtained without spaces are considered as tokens (also called terms). The primary advantage it offers is that it gets the text into a format that’s easier to convert to raw numbers, which can be used for actually processing the data.</em></blockquote><h3><strong>Stemming</strong></h3><blockquote><em>In layman’s terms, stemming usually refers to the crude heuristic process that chops off the ends of words in the hope of achieving its goal of reducing the word into its base or root form correctly. This approach often includes the removal of derivational affixes and hence the root words obtained post stemming, might not always make perfect sense.</em></blockquote><h3>Lemmatization</h3><blockquote><em>Lemmatization usually refers to reducing the word into its base or root form with the use of vocabulary and morphological analysis of words, instead of blindly chopping off the word endings. It normally aims to remove inflectional endings only and returns the base or dictionary form of a word, which is known as the lemma.</em></blockquote><p><strong>Example</strong>: If confronted with the token ‘saw’, stemming might return just the letter ‘s’, whereas lemmatization would attempt to return either see or saw depending on whether the use of the token was as a verb or a noun.</p><h3>Stopword Removal</h3><blockquote><em>Articles, prepositions, and other common words that appear frequently in the text but do not add any meaning or contribute towards distinguishing documents are called stopwords. The process of their detection and deletion is termed as stopword removal</em>.</blockquote><p><strong>Examples</strong>: a, an, the, on, in, at, etc.</p><h3>POS tagging</h3><blockquote><em>The process of labelling a word in a text or corpus as corresponding to a particular part of speech, based on both its definition and context.</em></blockquote><h3>Document Representation</h3><blockquote><em>The collection of words left in the document after performing all of the above steps is different from the original document and may be considered as a formal representation of the document. The purpose of the document representation is to aid the process of keyword matching. However, as some words are either reduced or removed, it may also result in loss of information. The three most common conventions of document represenation are Complete, Boolean and Bag of Words. Let’s look into their nuances one by one.</em></blockquote><h4><strong>Complete Representation</strong>:</h4><p>The representation in which the term <strong>positions</strong> are included along with the <strong>frequency</strong> is called the ‘complete’ representation. Such a representation preserves most of the information and can be used to generate the original document back from its representation.</p><h4>Boolean Representation:</h4><p>The simplest way to use a term as a feature in a document representation is to simply check whether or not the <strong>term occurs</strong> in the document. Thus, the term is considered to be a Boolean attribute, and this representation is called Boolean representation.</p><h4>Bag-of-Words Representation:</h4><p>Document representation that includes just the<strong> term frequencies</strong> but not the <strong>term position</strong>, is called a ‘bag-of-words’ representation.</p><h3>Web Scraping</h3><blockquote><em>The technique we will deploy in the upcoming example to extract textual data to work with from different websites.</em></blockquote><p>With all this knowledge about natural language processing and NLTK in our arsenal, we are now ready to see NLTK in action by working on a hands-on <strong><em>mini-project</em></strong> in python3.</p><h3>Problem Statement</h3><h4>Part 1</h4><p><strong>Extract</strong> the source content from the website (<a href="https://en.wikipedia.org/wiki/Natural_language_processing">https://en.wikipedia.org/wiki/Natural_language_processing</a>) and display the number of terms and their corresponding term frequency after <strong>stopword removal</strong>. Also, apply <strong>stemming</strong> and<strong> lemmatization</strong> to the same document and display the number of terms along with their corresponding stemmed as well as lemmatized root words. Count the total number of stemmed and lemmatized words hence obtained.</p><p><strong>Installing libraries and dependencies</strong></p><pre>import requests<br>from bs4 import BeautifulSoup<br>from nltk.corpus import stopwords<br>from nltk.stem import PorterStemmer, WordNetLemmatizer<br>import pandas as pd<br>from nltk import pos_tag<br>import io</pre><ul><li><a href="https://requests.readthedocs.io/en/master/">requests</a> — an HTTP library in python for parsing URLs and links.</li><li><a href="https://www.crummy.com/software/BeautifulSoup/bs4/doc/">BeautifulSoup</a> — a Python library for extracting data out of HTML documents and web pages.</li><li><a href="https://www.nltk.org/_modules/nltk/corpus.html">stopwords</a> — a part of nltk.corpus, provides us with a list of stopwords to work with.</li><li><a href="https://www.nltk.org/_modules/nltk/stem/porter.html">PorterStemmer</a> — a stemming algorithm inbuilt into NLTK.</li><li><a href="https://www.nltk.org/_modules/nltk/stem/wordnet.html">WordNetLemmatizer</a> — a lemmatizing algorithm inbuilt into NLTK.</li><li><a href="https://pandas.pydata.org/">pandas</a> — python library for data analysis and plotting data frames.</li><li><a href="https://kite.com/python/docs/nltk.pos_tag">pos_tag</a> — part of speech tagger incorporated into NLTK to tag the given list of tokens.</li><li><a href="https://www.import.io/">io </a>— library used for web data integration.</li></ul><p><strong>Extracting Text</strong></p><p>After importing all the required dependencies, we then parse the given URL into BeautifulSoup() using the requests library so as to remove all the javascript and style tags and retain just the text content present on the webpage.</p><pre>url = “<a href="https://en.wikipedia.org/wiki/Natural_language_processing">https://en.wikipedia.org/wiki/Natural_language_processing</a>&quot;<br>r = requests.get(url)<br>html_text = r.text<br>soup = BeautifulSoup(html_text)<br>for script in soup([&quot;script&quot;, &quot;style&quot;]):<br>    script.extract()</pre><p><strong>Stopword Removal</strong></p><p>Now we will carry out stopword removal by checking the text obtained above for stopwords and removing the words that are present in both the text and the list of stopwords imported earlier.</p><pre>sample = soup.get_text()<br>stopword = stopwords.words(“english”)<br>sample_stop = [x for x in sample.lower().split() if x not in stopword]</pre><p><strong>Stemming and Lemmatization</strong></p><p>We then carry out stemming and lemmatization of the text we get post stopword removal and store the outputs hence obtained in lists stem_words and lemmatize_words respectively.</p><pre>stem_words = []<br>stemmer = PorterStemmer()<br>for x in list(d.keys()):<br> stem_words.append(stemmer.stem(x))</pre><pre>lemmatize_words = []<br>lemmatizer = WordNetLemmatizer()<br>for x in list(d.keys()):<br> lemmatize_words.append(lemmatizer.lemmatize(x))</pre><p><strong>Printing the output in the form of a data frame.</strong></p><pre>words = list(d.keys())<br>freq = list(d.values())</pre><pre>final_dict = {“Word”:words, “Stemmed Word”:stem_words, “Lemmatized Words”:lemmatize_words, “Frequency”:freq}</pre><pre>df = pd.DataFrame(final_dict)</pre><pre>print(“Total Terms before stopword removal:”,len(sample.split()))<br>print(“Total Terms after stopword removal:”,sum(freq))<br>print(“Unique Stemmed Words:”,len(list(set(stem_words))))<br>print(“Unique Lemmatized Word:”,len(list(set(lemmatize_words))))<br>df.head()</pre><h4>Output</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zQQO7PurgV_QOTZKXPNQhw.png" /><figcaption>Output data frame showing the frequency of the stemmed and lemmatized words.</figcaption></figure><h4>Part 2</h4><p>Add <strong>one new word</strong> to NLTK stopword list and <strong>filter</strong> the content extracted from the website in order to display the number of terms and their term frequency count after excluding the newly added stopword. Display the <strong>POS tag</strong> for all the stopwords, which are removed from the content.</p><p>Let us add the word ‘<strong>language</strong>’ to our list of stopwords and then filter the content based on this newly obtained list.</p><pre>stopword.append(“language”)<br>sample_stop = [x for x in sample.lower().split() if x not in stopword]</pre><p>We then create a dictionary containing the words remaining after stopword removal as keys and their corresponding frequency of occurrence as values. By converting this dictionary into two subsequent lists, we can print the required output.</p><pre>d ={}<br>for x in sample_stop:<br>    if(x not in d.keys()):<br>        d[x] = 1<br>    else:<br>        d[x] += 1</pre><pre>words = list(d.keys())<br>freq = list(d.values())</pre><p>Displaying the output in the form of a data frame.</p><pre>df = pd.DataFrame(final_dict)</pre><pre>final_dict = {“Word”:words, “Frequency”:freq}</pre><pre>print(“Total Terms before stopword removal:”,len(sample.split()))<br>print(“Total Terms after stopword removal:”,sum(freq))<br>df.head()</pre><h4>Output</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*08ksElRp5WvUlCkxaJNdog.png" /><figcaption>Output data frame showing term frequency after adding a new stopword.</figcaption></figure><p><strong>Part of Speech or POS tagging.</strong></p><p>Printing out the <strong>POS tag</strong> for all the stopwords, which were removed from the text content.</p><pre>removed_words = [x for x in stopword if x in sample.lower().split()]</pre><pre>removed_words_pos = pos_tag(removed_words)</pre><pre>removed_words_pos</pre><h4>Output</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*EW78GjYSmJmZHgsvTCG30Q.png" /><figcaption>POS tags of removed stopwords.</figcaption></figure><p>Now that we have developed some basic familiarity with NLTK, let us take it up a notch by extracting, analysing and comparing the text content of two different web pages.</p><h4>Part 3</h4><p><strong>Extract</strong> the contents from two websites (<a href="https://en.wikipedia.org/wiki/Natural_language_processing">https://en.wikipedia.org/wiki/Natural_language_processing</a> &amp; <a href="https://en.wikipedia.org/wiki/Machine_learning">https://en.wikipedia.org/wiki/Machine_learning</a><a href="https://en.wikipedia.org/wiki/Machine_learning">)</a> and save the content in two separate documents. <strong>Remove stopwords</strong> from the content and represent the documents using <strong>Boolean</strong>, <strong>Bag-of-words</strong> and<strong> Complete</strong> representation. Process a <strong>search query</strong>, <strong>compare the contents</strong> of both the pages for the existence of the query and display the <strong>similarity result</strong> based on highest matching count (bag-of-words).</p><p><strong>Extracting Text</strong></p><p>We first extract the text from the above two mentioned URLs via the very same procedure deployed above to remove javascript and other Html tags.</p><pre>url_1 = “<a href="https://en.wikipedia.org/wiki/Natural_language_processing">https://en.wikipedia.org/wiki/Natural_language_processing</a>&quot;<br>url_2 = “<a href="https://en.wikipedia.org/wiki/Machine_learning">https://en.wikipedia.org/wiki/Machine_learning</a>&quot;<br>r = requests.get(url_1)<br>html_text = r.text<br>soup = BeautifulSoup(html_text)<br>for script in soup([“script”, “style”]):<br> script.extract()<br>content_1 = soup.get_text()<br>r = requests.get(url_2)<br>html_text = r.text<br>soup = BeautifulSoup(html_text)<br>for script in soup([“script”, “style”]):<br> script.extract()<br>content_2 = soup.get_text()</pre><p><strong>Stopword Removal</strong></p><p>We then store the text so obtained in two separate doc files and perform stopword removal.</p><pre>with io.open(‘nlp.doc’, mode = ‘w+’,encoding=”utf-8&quot;) as file_1:<br> file_1.write(content_1)<br>with io.open(‘ml.doc’, mode = ‘w+’,encoding=”utf-8&quot;) as file_2:<br> file_2.write(content_2)<br>stopword = stopwords.words(“english”)<br>content_1_stop = [x for x in content_1.lower().split() if x not in stopword]<br>content_2_stop = [x for x in content_2.lower().split() if x not in stopword]<br>all_words = content_1_stop + content_2_stop<br>all_words = list(set(all_words))</pre><p><strong>Boolean Representation</strong></p><p>To formulate a boolean representation tabulating the presence of each word in the two documents, we traverse through the list of words obtained after performing stopword removal and check for the occurrence of each word. The output thus obtained is displayed in the form of a data frame.</p><pre>bool_1 = []<br>bool_2 = []<br>for x in all_words:<br>    if x in content_1_stop:<br>        bool_1.append(1)<br>    else:<br>        bool_1.append(0)<br>    if x in content_2_stop:<br>        bool_2.append(1)<br>    else:<br>        bool_2.append(0)<br>final_dict = {&quot;Word&quot;:all_words, &quot;Doc 1&quot;:bool_1, &quot;Doc 2&quot;:bool_2}<br>df = pd.DataFrame(final_dict)<br>df.head()</pre><h4>Output</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*Sgtszjp02hDRjNNJxJafrg.png" /><figcaption>Output data frame showing the occurrence of words in the two documents.</figcaption></figure><p><strong>Query Processing</strong></p><p>The following code block asks the user to enter a query and looks for the occurrence of that particular keyword in both the documents. It displays ‘1’ if the required word is found in the document and ‘0’ otherwise.</p><pre>query=input(&quot;Enter query:&quot;)<br>for q in query.lower().split():<br>    try:<br>        f1=df[&#39;Doc 1&#39;][all_words.index(q)]<br>        print(&quot;Presence of \&quot;&quot;+ query +&quot;\&quot; in Doc 1:&quot;,f1)<br>    except ValueError:<br>        print(&quot;Presence of \&quot;&quot; + query + &quot;\&quot; in Doc 1:&quot;,0)<br>    try:<br>        f2=df[&#39;Doc 2&#39;][all_words.index(q)]<br>        print(&quot;Presence of \&quot;&quot;+ query +&quot;\&quot; in Doc 2:&quot;,f2)<br>    except ValueError:<br>        print(&quot;Presence of \&quot;&quot; + query + &quot;\&quot; in Doc 2:&quot;,0)</pre><p><strong>Bag-Of-Words Representation</strong></p><p>The code snippet below then counts the number of times each word occurs in both our documents and includes just the<strong> </strong>term frequencies, neglecting the term position altogether.</p><pre>d1 = {}<br>d2 = {}<br>for x in all_words:<br>        if x in content_1_stop:<br>            for y in content_1_stop:<br>                if x == y:<br>                    if x not in d1.keys():<br>                        d1[x] = 1<br>                    else:<br>                        d1[x] += 1<br>        else:<br>            d1[x] = 0<br>        if x in content_2_stop:<br>            for y in content_2_stop:<br>                if x == y:<br>                    if x not in d2.keys():<br>                        d2[x] = 1<br>                    else:<br>                        d2[x] += 1<br>        else:<br>            d2[x] = 0<br>final_dict = {&quot;Word&quot;:all_words, &quot;Freq in Doc 1&quot;: list(d1.values()), &quot;Freq in Doc 2&quot;: list(d2.values())}<br>df = pd.DataFrame(final_dict)<br>df</pre><h4>Output</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*OwYWfRYIufKdciJkgnMk4w.png" /><figcaption>Output data frame showing the frequency of words in both the documents.</figcaption></figure><p>As the position at which the words occur often holds importance, neglecting how to find the same, might not do justice to our objective of learning data pre-processing. Hence the following code snippet creates a data frame enlisting all the words and their respective position in Document 1.</p><pre>word = []<br>pos = []<br>for x in all_words:<br>    i = 0<br>    if x in content_1_stop:<br>        for y in content_1_stop:<br>            i += 1<br>            if x == y:<br>                word.append(x)<br>                pos.append(content_1_stop.index(x,i-1))<br>final_dict = {&quot;Word&quot;:word, &quot;Position&quot;:pos}<br>df = pd.DataFrame(final_dict)<br>df.head()</pre><h4>Output</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*35PIe303Mvea64NkCCQcaw.png" /><figcaption>Output data frame showing the position of words in Document 1.</figcaption></figure><p>The very same process can then be repeated for the second document as well.</p><pre>word = []<br>pos = []<br>for x in all_words:<br>    i = 0<br>    if x in content_2_stop:<br>        for y in content_2_stop:<br>            i += 1<br>            if x == y:<br>                word.append(x)<br>                pos.append(content_2_stop.index(x,i-1))<br>final_dict = {&quot;Word&quot;:word, &quot;Position&quot;:pos}<br>df = pd.DataFrame(final_dict)<br>df.head()</pre><h4>Output</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*DdB-cFIi3e8uOM3ZhgzmxA.png" /><figcaption>Output data frame showing the position of words in Document 2.</figcaption></figure><p>Hope this article could drive home some basics related to data preprocessing and representation in NLP using NLTK. Here is the Github link containing the source code of the problems discussed above.</p><p><a href="https://github.com/anmolpant/Medium_Resources/tree/master/NLP%20101%E2%80%8A-%E2%80%8AWeb%20Scraping%2C%20Tokenization%20and%20Data%20Representation%20with%C2%A0NLTK">anmolpant/Medium_Resources</a></p><p>Please drop a <strong>clap</strong> [<strong>or maybe a follow? :)</strong>] if you found this informative and stay tuned for more upcoming articles.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=def9b01194ce" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codechef-vit/nlp-101-data-preprocessing-representation-using-nltk-def9b01194ce">NLP 101 — Data Preprocessing &amp; Representation Using NLTK.</a> was originally published in <a href="https://medium.com/codechef-vit">CodeChef-VIT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Women in STEM. An Endangered Species?]]></title>
            <link>https://medium.com/predict/women-in-stem-an-endangered-species-ee45dd7ba664?source=rss-7de3668498e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee45dd7ba664</guid>
            <category><![CDATA[science]]></category>
            <category><![CDATA[women]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <dc:creator><![CDATA[Anmol Pant]]></dc:creator>
            <pubDate>Sun, 05 Jul 2020 20:26:01 GMT</pubDate>
            <atom:updated>2020-07-05T20:26:01.520Z</atom:updated>
            <content:encoded><![CDATA[<h4>Why women abandon careers in tech despite having the required skills at their disposal.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*dfPsADG76UzJN0tS16hbZg.jpeg" /><figcaption>Image Courtesy: Yardi.com</figcaption></figure><p>Women on aggregate have habitually found themselves at a numerical handicap when it comes to STEM subjects as a whole, but this predicament often shows trends for the worse when we isolate ‘Engineering’ as a major, and when we do so as a profession, the situation only seems to exacerbate.</p><p>Since the industrial revolution that marked the unofficial beginning of engineering as an occupation, the number of women taking up careers in STEM is gradually increasing, but at a rate so feeble that one cannot help but question the very nature and mnemonics of this trend and make an attempt to draw much-needed attention to the predicament of the industry becoming increasingly male dominant, with gender-based preponderance occupying the centre stage and unfeigned academic flair being shoved into the backseat.</p><p>Statistics reveal that currently, for every hundred guys in engineering there are about forty-five females, but what statistics fails to shed light on is the fact that there is also a boatload of sexism and prejudice that either drives women away from the profession altogether or makes them want to abandon engineering as a discipline and look for other career alternatives. Hence, even in this self-proclaimed ‘<em>contemporary society</em>’ of ours, female retention in engineering still remains a gargantuan problem.</p><p>While the motivation to improve the representation and retention of women in STEM-based careers has always been strong, it must also be highlighted that many of the underlying discipline-specific causes have not been fully examined and explored, attributing to which, one is often kept devoid of the complete picture of the sorry state of women in STEM-based fields. We as a people, love seeing how high a woman can rise in STEM-related careers, be it <strong><em>Susan Wojcicki</em></strong> (<em>CEO- YouTube</em>), <strong><em>Ginni Rommetty</em></strong>( <em>CEO- IBM</em>), <strong><em>Sheryl Sandberg</em></strong>(<em>COO- Facebook</em>) or <strong><em>Safra Catz</em></strong> (<em>Co-CEO, Oracle</em>) but we, as a scientific community have done virtually nothing to raise the floor. That is the hypocrisy, and that is the first thing to be deracinated if we are to start taking baby steps towards ameliorating the state of women in STEM-based professions and vocations. Because none of this happens in a vacuum, it happens in a system.</p><p><em>Academic misogyny </em>is due its fair share of credit when it comes to the conspicuousness problem women face. Like women in any other male-dominated field, they are commonly perceptible as women, but are turned a blind eye to, when it comes to their technical prowess and expertise; often leaving them with an impending feeling of anguish and desolation, when the contributions of their male peers are given paramount importance over theirs, because of the roles in the industry becoming increasingly gendered. This sort of dejection on a daily basis can be mentally draining in the long run.</p><p>My motives are not to instigate altercations of any kind or to join the bandwagon of popularizing the generalization of one particular gender and the victimization of the other, but to the all and sundry male engineering students, mentors and recruiters out there, who still refuse to see and treat their female peers as equals; you are right, because we are not.</p><p>You may be in the same academic institution right now, enrolled in the same program and even in the very same class as them, but does that strengthen your case as equals? ‘<em>No</em>’. Because you did not grow up in a world where you were belaboured by social media and advertising campaigns telling you your true worth was decided by how you look and dress. Neither were you subjected to the assumption that the reason you couldn’t grasp a perplexing mathematical or scientific concept, was in fact, your gender. You weren’t discouraged or branded as ‘<em>bossy</em>’ when trying to pursue leadership roles, and if and when you experienced success, the general public opinion was always inclined towards the notion that you earned it owing to your hard work and qualifications and not because of your gender.</p><p>The reasons divulged above are just the tip of an iceberg compared to what our female peers have faced and conquered to reach where they are today. So, we can never really be ‘<em>equals</em>’ in the true sense of the word, because they have already triumphed over more in this field just to stand on the same pedestal as us, that we will ever get to grips with.</p><p>Please drop a <strong>clap</strong> [<strong>or maybe a follow? :)</strong>] if you found this informative and stay tuned for more upcoming articles.</p><p><em>Anmol Pant is the Editorial Head of CodeChef-VIT Student Chapter, a front- end web development &amp; Machine Learning Enthusiast and an upcoming freelance writer who takes a keen interest in technical, social and web content writing.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee45dd7ba664" width="1" height="1" alt=""><hr><p><a href="https://medium.com/predict/women-in-stem-an-endangered-species-ee45dd7ba664">Women in STEM. An Endangered Species?</a> was originally published in <a href="https://medium.com/predict">Predict</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>