Use THIS Algorithm To Find KEYWORDS in Text - A Short Python Project

Поделиться
HTML-код
  • Опубликовано: 30 мар 2022
  • Here's a great short beginner project using the RAKE algorithm to extract keywords from review text that we scraped online. Rake stands forRapid Automatic Keyword Extraction which uses the frequency of words in the text to score up key phrases.
    package used: csurfer.github.io/rake-nltk/_...
    my code: github.com/jhnwr/rake-on-reviews
    Support Me:
    Patreon: / johnwatsonrooney (NEW)
    Oxylabs: oxylabs.go2cloud.org/aff_c?of... - code JR15
    Amazon UK: amzn.to/2OYuMwo
    Hosting: Digital Ocean: m.do.co/c/c7c90f161ff6
    Gear Used: jhnwr.com/gear/ (NEW)
    -------------------------------------
    Disclaimer: These are affiliate links and as an Amazon Associate I earn from qualifying purchases
    -------------------------------------
  • НаукаНаука

Комментарии • 53

  • @duadox
    @duadox 2 года назад +6

    Thank you so much for the video! You are also correct in that this is great practice for a newbie like myself. I am a researcher, so I have a lot of text files in my PC. Thanks to your video, I was able to convert your extract_text() into a function that opens local files with little effort. And then I looked up how to format decimals in the print function, and it turns out getting an even cleaner output with two decimal points is as easy as -> print("{:.2f}".format(rating), keyword). So thanks again for providing the opportunity and motivation to practice and learn more!

    • @JohnWatsonRooney
      @JohnWatsonRooney  2 года назад +2

      That’s great! I really wanted this to be exactly that - when I was learning finding projects to make and then build upon was key in the learning process!

  • @konigdererste4501
    @konigdererste4501 Год назад +1

    Exactly what I was searching for a long time. Thank you very much!

  • @dimaua1830
    @dimaua1830 2 года назад +6

    Thanks for the video! I love python because of ease of use and a multitude of handy little libraries like that!

    • @JohnWatsonRooney
      @JohnWatsonRooney  2 года назад

      Me too, there’s always something to learn and explore!

  • @AndresPerez-ow4lo
    @AndresPerez-ow4lo 2 года назад +7

    Hi Jhon, great video! I was wondering, once you extract the keywords from different web pages refeiring to similar topics, how would you compare them?

  • @hossamal-dinhassan9652
    @hossamal-dinhassan9652 2 года назад +1

    Your channel is so helpful thanks for making this content

  • @brightsde3511
    @brightsde3511 2 года назад +6

    This guy is definitly underated.

  • @tronovan3d
    @tronovan3d 2 года назад +1

    Neat, thanks for the video.

  • @cicerocostahernandez
    @cicerocostahernandez Год назад

    Hello John? Wassup? Nice video man! Let me ask you, in the URL you put the link from a website, but could I set a code in order to automatize the insertion of it using a database with the link and repeat the process for other websites? Another question, could I search for specific keywords in each website link, instead of all?

  • @giantdutchviking
    @giantdutchviking 10 месяцев назад +2

    Thanks for sharing your knowledge. Started coding Python a few weeks ago through tutorials, ChatGPT and YT-vids. Started working with real data for the 1st time trying to do some basic text data analysis, this seems like a simply module to use, appreciate it.

  • @KhalilYasser
    @KhalilYasser 2 года назад +1

    Thank you very much. Amazing tutorial.

  • @usmanghani8657
    @usmanghani8657 2 года назад +6

    I'm working on a project which includes scraping 200+ websites. You are great help on my way to complete project. God bless you sir and make all of us able to be more productive for the society.
    Big love 💌and respect from Pakistan Sir.

    • @JohnWatsonRooney
      @JohnWatsonRooney  2 года назад +3

      Thank you and good luck with your project!

    • @100daychallange5
      @100daychallange5 2 года назад

      Bro I need to make one generic script that will work on 3 sites with different structure. Is it possible and how I can do it?

    • @usmanghani8657
      @usmanghani8657 2 года назад

      @@100daychallange5 yes you can use callback funtinalty to acess any many pages you want and scrapy them.

  • @colinrogers9927
    @colinrogers9927 2 года назад +1

    Awesome. Great video

  • @hayat_soft_skills
    @hayat_soft_skills 2 года назад +1

    Superv! Thanks!

  • @vbp1996sx
    @vbp1996sx 2 года назад +2

    Hey Watson. Great video, very much appreciated. By the way are you working as a python developer irl? (asking out of curoisity)

    • @JohnWatsonRooney
      @JohnWatsonRooney  2 года назад

      No I’m not a full time developer! I do work some freelance though and use Python in my day job for task automation

  • @nicholasgabaldon657
    @nicholasgabaldon657 Год назад

    Do you know the hostname it is trying to connect to when you import the nlk stopwords and punkt?

  • @experiencinglunistice
    @experiencinglunistice Год назад +1

    Thank you very much

  • @aniketbahukhandibtech-cse-9176
    @aniketbahukhandibtech-cse-9176 2 года назад

    hey john can u tell me how can i scrape geo location of crimes in my region. please reply..

  • @yusufcan1304
    @yusufcan1304 5 месяцев назад

    Thanks for share.

  • @sohanoor3291
    @sohanoor3291 Год назад

    Hi Rooney,
    I need little help. Can we extract text from class instead of div using this method:
    response.html.find('div.class_name', first=True).text
    I tried, but now worked. Please help me.
    Regards

  • @user-ux5sp1uc7o
    @user-ux5sp1uc7o 6 месяцев назад

    Can I use this as a better alternative for the Text Analysis function of Power BI ?

  • @vntconcept
    @vntconcept 2 года назад

    how about removing ads on wordpress theme?

  • @nbc2081
    @nbc2081 2 года назад

    Pls I want to build an algorithm that can use key words to rate articles which I want to use

  • @return_1101
    @return_1101 2 года назад

    Thank you very much.
    With your help I made a "keyword_searcher.py" with requests, bs4 rake_nltk and fake_useragent.
    It's amazing how to search for keywords.

  • @AlbertLeonardo
    @AlbertLeonardo 2 года назад +1

    Great video as usual! Thanks!

  • @aviator1016
    @aviator1016 2 года назад +2

    Hey can you please tell me how to install the library into vs code. I have already installed it using pip installer from the terminal but everytime I get the message that import rake_nltk could not be resolved. Thanks

    • @JohnWatsonRooney
      @JohnWatsonRooney  2 года назад

      Hey sounds like maybe you have a Python path issue? Try running Python in your terminal and try importing it there and see if it works.

  • @michaelnoardo3315
    @michaelnoardo3315 Год назад

    I'm trying to write a code to list the 1000 most used words in some language, I will feed the code with articles, books , movie subtitles... This will help people learning language to focus on what is most important, can you help me?

  • @GymPolar
    @GymPolar 5 месяцев назад

    Thankyou

  • @atultanna
    @atultanna Год назад

    Can you share the code for scrape KW from Google Autosuggest

  • @wangdanny178
    @wangdanny178 2 года назад +1

    Hey John me again. It’s in my watch later already. Thanks ahead

  • @adnanyeasir7965
    @adnanyeasir7965 2 года назад

    I am having issue importing nltk

  • @ThinAirElon
    @ThinAirElon 2 года назад +2

    Super 👍

  • @anthony2921
    @anthony2921 8 месяцев назад

    there’s always a guitar in the background of code tutorial videos

  • @ztech3401
    @ztech3401 Год назад +1

    sir , can I using this code for my app ?

  • @olgaycelik2631
    @olgaycelik2631 2 года назад +1

    I am new to this so How and where to install nltk?

    • @codewithlenny
      @codewithlenny 2 года назад

      run
      pip install ntlk
      Once it's done. Open your terminal / command line and type the following commands
      > python
      > import nltk
      > nltk.download()
      This will open up a window that allows you to install the remaining nltk resources

    • @olgaycelik2631
      @olgaycelik2631 2 года назад

      @@codewithlenny thank you I have a last question:
      when I press print then I am getting those errors:
      * import bs4 could not be resolved from source
      *import requests could not be resolved from source
      So how to fix them?

  • @hamzakhiar3636
    @hamzakhiar3636 2 года назад

    Regex :👀

  • @PerfectmindAMV
    @PerfectmindAMV 2 года назад +2

    please, make a video of machine learning in python 🙂