top of page
Search

Introducing the BERT Keyword Extractor: a Streamlit interface for KeyBERT! 🎈

Updated: Oct 1, 2021


🎲 Want to jump right in? Try the Streamlit app here!


Automatic keyword generation methods have been around for a while (TF-IDF, Rake, YAKE!, just to name a few), all widely implemented in Python, all widely used in fields such Information Retrieval, Text Mining and of course, SEO!


Although techniques vary, they usually extract keywords and keyphrases from a document, assign a weight to each word, to signify the importance of that word in the wider document and corpus.


What's KeyBERT?


While all valuable, the KeyBERT library goes a step further than most in terms of accuracy by leveraging BERT embeddings!


What also makes KeyBERT stand out from the library crowd is its lightweightness, power and versatility.


Lightweight, as unlike other libraries, KeyBERT works very well with CPU configs. It can be used with a wide range of applications as a result.


Powerful, as KeyBERT supports the latest and best-performing embedding models, such as:

  • Flair

  • Spacy

  • Gensim

You can even select any sentence-transformers model and pass it through KeyBERT!


KeyBERT is also versatile with a bazillion of parameters to choose from. Here's a non-exhaustive list below:


That being said, like with any elaborate library, that versatility may come with a trade-off.

It can sometimes be cumbersome to choose the right model embedding and set of parameters to quickly iterate through your use cases.


This is where Streamlit comes in handy!


Introducing the BERT Keyword Extractor! 🎈


With the BERT Keyword Extraction (BERT KE), I wanted to create a simple interface that provides the relevant parameters at your fingertips, allowing you to iterate through in seconds and allow you to export your results!


🎲 Try the app here!


The BERT Keyword Extractor is currently in early beta with the following limitations:

  • 2 embedding models (DistilBERT and Flair)

  • Only the first 500 words are currently reviewed

Once the app is deemed stable, I will add more models, more parameters, and more text allowance, so keep your eyes peeled!


Let's see what settings are currently available:


Choosing your model





At present, you can choose between two embedding models: DistilBERT, which is the default engine, and Flair. More to come soon!


Top N results





You can choose the number of results to be displayed. Between 1 and 30, the default number is 10.


Min/Max Ngrams









You can choose the minimum and maximum values for the ngram range.


This sets the length of the resulting keywords/keyphrases.


  • To extract a set of single keywords only, set the ngram range to (1, 1)

  • To extract keyphrases, set the minimum ngram value to 2. The maximum ngram value can be set to 2 or higher, depending on the number of words you would like to see in each keyphrase.


Check Stop Words



Tick this box to remove stop words from the document (currently English only).


Use MMR



You can use Maximal Margin Relevance (MMR) to diversify the results. It creates keywords/keyphrases based on cosine similarity.


Try high/low 'Diversity' settings for interesting variations.


Diversity






The higher the setting, the more diverse the keywords. Note that the *Keyword diversity* slider only works if the *MMR* checkbox is ticked.


Credits


Just a note where credit is due, KeyBERT has been created by the amazing Maarten Grootendorst


Maarten writes insightful Data Science articles in Medium, and is also the creator of 2 other awesome Python libraries: BERTopic and PolyFuzz!


BERTopic is a semi-supervised topic modelling library with a built-in visualiser. Check out Koray’s excellent article for some SEO use cases!

PolyFuzz is a mighty fuzzy string-matching/string-grouping library. It has been my go-to tool for fuzzy matching for over a year now, and it’s bang on for SEO tasks!


It can be used for mapping keywords to URLs, site migrations & redirect management.


It’s also got some good momentum in the SEO community, check-out what Greg Bernhardt, SearchSolved's Lee Foot, and yours truly have been doing with it!

 
 
 

55 Comments


dwainnervi55
3 days ago

Sau vài lần quan sát hệ sinh thái https://sc88bn.com/ , mình thấy điểm đáng nhớ nằm ở cách nền tảng giữ các phần khác nhau trong cùng một nhịp vận hành. Mình chuyển từ nổ hũ sang casino rồi thử xem thêm xổ số để cảm nhận sự thay đổi giữa các khu. Mỗi phần có nội dung riêng nhưng không làm người dùng mất cảm giác quen thuộc với giao diện. Cá nhân mình cho rằng sự đa dạng chỉ bền hơn khi đi cùng cảm giác an toàn, rõ ràng và có thể kiểm soát trong quá trình sử dụng.


Like

dwainnervi55
4 days ago

Có thời điểm mình xem https://sc8844.com/ chủ yếu qua thể thao và xổ số vì hai khu này đều thiên về theo dõi thông tin. Cách phân nhóm rõ giúp mình dễ xác định phần muốn xem, trong khi bố cục chung vẫn đủ thống nhất để chuyển qua lại mà không bị rối. Mình cũng kiểm tra thêm khu giao dịch và thấy chức năng này được đặt riêng khỏi các sảnh nội dung. Với mình, cách tổ chức như vậy khá thuận khi sử dụng lâu dài. Người dùng có thể tập trung vào thông tin ở từng khu, sau đó chuyển sang quản lý tài khoản khi cần mà không phải thay đổi hoàn toàn cách thao tác…


Like

dwainnervi55
4 days ago

Mình thường phân tích https://tylekeonhanh.com/ dựa trên hoàn cảnh sử dụng thay vì chỉ nhìn vào danh sách tính năng. Có lúc mình theo dõi Esports trên máy tính, sau đó chuyển sang điện thoại để xem bắn cá, nên sự liên tục giữa các thiết bị khá quan trọng. Mình không kỳ vọng mọi thứ giống hệt nhau, nhưng cách thao tác cần đủ quen để không phải học lại. Nền tảng được giới thiệu là hỗ trợ iOS, Android, Windows và macOS. Với mình, việc này hữu ích ở khả năng thích ứng với thói quen thực tế: thiết bị có thể thay đổi trong ngày nhưng trải nghiệm vẫn giữ được một nhịp tương đối nhất quán.


Like

A structural engineer UK pathway can provide learners with the technical knowledge required to understand how structures are designed to remain stable, safe, and suitable for their intended use. Structural engineering involves principles of mathematics, physics, materials, structural analysis, and design. Developing knowledge in these areas can help aspiring professionals understand the technical demands of the construction industry. Structured education can provide a valuable foundation for further professional development.

Like


Like

© Charly Wargnier - 2025

Follow me on:

  • X
  • LinkedIn
  • logo (1)
bottom of page