Reader small image

You're reading from  Web App Development Made Simple with Streamlit

Product typeBook
Published inFeb 2024
PublisherPackt
ISBN-139781835086315
Edition1st Edition
Right arrow
Author (1)
Rosario Moscato
Rosario Moscato
author image
Rosario Moscato

Rosario Moscato has a master's degree in electronic engineering, a second level master in internet software design and a first level master's in science and faith. In about 25 years of experience, he has worked on innovative technology development in Europe and Asia. Recently, his interests have been focused exclusively on AI, pursuing the goal of making every business extremely competitive and analyzing the ethical implications deriving from the new scenarios that these disciplines open. Rosario has authored two books, and he is a speaker at international research centres and conferences as well as a trainer and technical/scientific consultant. Currently, he is working as CTO with one of the oldest AI companies in Italy.
Read more about Rosario Moscato

Right arrow

Introducing NLP concepts – tokens and lemmas

Let’s begin exploring Advanced Features by creating a simple summarization function in Python and Streamlit. Although many packages and libraries offer powerful summarization capabilities, this book focuses on web application development rather than NLP or summarization.

Adding the summarization function

Though the name is self-explanatory, a summarization function is a piece of code that summarizes a sentence or a text, extracting only the most important part of it. This task can be achieved in many ways – some very easy, like the one we are proposing just to show how to develop complex web applications with Streamlit, and some very sophisticated, leveraging artificial intelligence and neural networks. Figure 5.21 shows the code where we add the summarize_text function:

Figure 5.21: The summarize_text function

Figure 5.21: The summarize_text function

An attention point is that after the NLP packages, we imported two new...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Web App Development Made Simple with Streamlit
Published in: Feb 2024Publisher: PacktISBN-13: 9781835086315

Author (1)

author image
Rosario Moscato

Rosario Moscato has a master's degree in electronic engineering, a second level master in internet software design and a first level master's in science and faith. In about 25 years of experience, he has worked on innovative technology development in Europe and Asia. Recently, his interests have been focused exclusively on AI, pursuing the goal of making every business extremely competitive and analyzing the ethical implications deriving from the new scenarios that these disciplines open. Rosario has authored two books, and he is a speaker at international research centres and conferences as well as a trainer and technical/scientific consultant. Currently, he is working as CTO with one of the oldest AI companies in Italy.
Read more about Rosario Moscato