Personalization is the most sought-after discipline to boost user-engagement, drive value and ultimately make sure the readers keep coming back. For the past couple of years, the importance of a personalized experience has been the top driving priority for many businesses.
And with easy accessibility of internet and online information, the need for personalized content has never been so high for media and publishing industry. Keeping in mind the problems faced by media and publishing industry, we at OpenSense Labs developed a module to tackle such issues.
The intelligent content tools module is developed with the popular scope of Natural Learning Processing to help with:
- Auto-tagging
- Text Summarization
- Duplicacy in content
To simplify, these three features have been developed as submodules.
- The Auto Tag Module assists with tags. It analyzes the content on the website with the field specified and then it tags the content by extracting text from that field. Take for example a news website, the specified field for tagging was the body of articles. The module will automatically tag the articles with tags generated from the content and so it’ll be a lot easier for the users to look for contents with the same tags.
- When the world suffers from the Goldfish Conundrum, a smart Text Summarize Module is what you need to catch the user attention. It summarizes the text in the field. For a media website, it is important that the teaser shows just the right information. The text summarizer helps in writing the summary doesn't matter how big the number is.
- With a surge in information, it is also known that the plagiarism has become quite a common practice. And while the number of plagiarism checkers available in the market is high, Duplicity Rate Module tells you if there is any duplicate content available on the website. It is an intelligent agent module based on Natural Language Processing. It’s a helpful tool for a website designer and content editor.
Coming to the technicality, Drupal doesn’t have another tool like this, so we used a flask script that Drupal sends a request to and fetches the output.
In this tutorial, we are going to learn how to use this tools for a smoother management of the content on our website. Let’s get started.
Setup Environment & Files of the Module
- Clone the Module in the modules directory of the website from Drupal.org.
- Setup the flask script along with python libraries mentioned in requirements file. Those libraries can be installed using pip, command to install that is:
pip3 install -r requirements.txt
- You can also locally run the flask app using the following command
python3 app.py
- Or you can deploy the script to a server with the above steps.
In this article, we are assuming you’re running the scripts locally so we’ll use address similar to http://localhost:5000/
Installation & Configuration of the Intelligent Content Tools Module
- On successful downloading of the module, enable it.
To enable the module go to the link : [D8-site]/admin/modules, search for the Intelligent Content Tools module and enable the module as shown below and click install.
Also, enable any of the submodules you want to use on your website.
- After installing the module, go the configuration link: [D8-site]/admin/config/intelligent_tools and select any of the submodule configurations you want to use.
For Auto Tag settings
Add a new setting with the server address of the flask application.
Note: The server address will be added just one time. After then you can edit it from the edit settings at the module config page.
After that, if want to add new settings just add from add settings button, it won’t ask for a server address again.
For Text Summarize settings
Add a new setting with the server address of the flask application.
After saving the configuration will look something like the image below
For Duplicity Rate settings
Add a new setting with the server address of the flask application as we did previously with other two.
After saving the configuration it will look like the image below.
How To Use The Module?
- Now on setting the configurations select the content type, you have to set up in configuration. In this tutorial, it was an Article.
- Add a new content or edit the already saved one.
- Add the text to the field that is to be extracted. In our case, it is body field.
- After saving the content, the article will have the new fields according to the module that you’ve selected.
- Now I’ve 2 submodules enabled: Auto Tag and Text Summarize Module
My test article looked something like the image below.
It has tags related to the body content and a summary extracted from the body.
Similarly, Duplicity Rate module tells the percentage of the duplicate data. The duplicity module works only on the new content added to the site and starts checking the content after it is installed. It doesn't work with previously saved data.
Appropriate solutions for your organizational purposes can be found and we would love to hear your requirements at [email protected]
(The project is not covered by security advisory policy please use it at your own risk.)
Subscribe
Related Blogs
RFP: How To Create An RFP For Open Source Solutions?
A good Request for Proposals (RFP) or Call for Proposals (CFP) clearly states the goals and expectations of your project and sets the…
Drupal 7 End Of Life: Top Reasons You Should Migrate To Drupal 10
Drupal 10 was released in December 2022 and ever since, the community has been pushing its users to do Drupal 7 to 10 migration. As per…
DrupalCon Barcelona: 2024 Wrap-Up From Europe
DrupalCon, the key conference for the digital experience platform Drupal, was held this year in Barcelona, Spain, from September 24 to 27…