Site icon Python GUI

Integrate Robust Similarity Queries Capabilities To Your Python GUI App With Powerful Gensim Library

code projected over woman

Do you want to perform Text Mining or Natural Language Processing tasks like Topic Modeling, Similarity Queries, etc. in your GUI app? This post will get you to understand how to use Gensim Python Library using Python4Delphi (P4D) in the Delphi/C++ Builder application and perform some interesting Text Mining tasks.

Gensim is an open-source library for Unsupervised Topic Modeling and Natural Language Processing, using Modern Statistical Machine Learning. Gensim has been used and cited in over 1400 commercial and academic applications as of 2018, in a diverse array of disciplines from medicine to insurance claim analysis to patent search.

Gensim is implemented in Python and Cython. Gensim is designed to handle large text collections using data streaming and incremental online algorithms, which differentiates it from most other machine learning software packages that target only in-memory processing.

Design principles of Gensim:

By now, Gensim is known to be the most robust, efficient and hassle-free piece of software to realize unsupervised semantic modeling from plain text.

 

Hands-On

This post will guide you on how to perform Similarity Queries tasks using Python’s Gensim and then display it in the Delphi Windows GUI app.

First, open and run our Python GUI using project Demo1 from Python4Delphi with RAD Studio. Then insert the script into the lower Memo, click the Execute button, and get the result in the upper Memo. You can find the Demo1 source on GitHub. The behind the scene details of how Delphi manages to run your Python code in this amazing Python GUI can be found at this link.

Let’s perform a demo of the Gensim library, like similarity queries example. The following code is credited to Radim Řehůřek, the creator of Gensim (visit the original source here):

[crayon-662e6620ba01b744472339/]

The result in Python GUI:

 

Congratulations, now you have learned how to perform Similarity Queries tasks using Python’s Gensim and then display it in the Delphi Windows GUI app.

Check out the Gensim library for Python and use it in your projects: https://pypi.org/project/gensim/ and

Check out Python4Delphi which easily allows you to build Python GUIs for Windows using Delphi: https://github.com/pyscripter/python4delphi

Exit mobile version