Skip to main content
Image
banner-3.jpg

How to use Drupal Intelligent content tools Module

article publisher

Utkarsh

Drupal

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:

  1. Auto-tagging
  2. Text Summarization
  3. Duplicacy in content

To simplify, these three features have been developed as submodules. 

  1. 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. 
    admin interface after using auto tagging module
     
  2. 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.
    admin interface after using text summarizer module
     
  3. 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. 
    admin interface after using duplicity rate module

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.

enabling intelligent content tools module in Drupal 8

Also, enable any of the submodules you want to use on your website.

enabling auto tag, text summarize in the Drupal 8 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.

configuring auto tag, duplicity rate, text summarize settings in Drupal 8 website

For Auto Tag settings

Add a new setting with the server address of the flask application.

adding web address in the auto tag settings and saving configurations

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.

admin interface after saving the auto tag settings in the server

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.

adding web address in the text summarize settings and saving configurations

After saving the configuration will look something like the image below

admin interface after saving the text summarize settings in the server

For Duplicity Rate settings

Add a new setting with the server address of the flask application as we did previously with other two.

adding web address in the Duplicity Rate settings and saving configurations

After saving the configuration it will look like the image below.

admin interface after saving the Duplicity Rate settings in the server

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.
user interface after the intelligent content module has been put to use

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

Ready to start your digital transformation journey with us?

Related Blogs

DrupalCon Singapore: It’s A Wind Up For 2024

DrupalCon Singapore Wind Up DrupalCon Singapore OpenSense Labs

OpenSense Labs team attended the DrupalCon Singapore 2024 and it was a wonderful and valuable experience, especially since it…

Drupal SDC: Advantages of Single Directory Components 

Advantages of Drupal SDC OpenSense Labs

What if one solution could organize website UI components, make them easy to reuse in different projects, ensure consistency…

Drupal 11 Upgrade: Checklist For Drupal 7 to 11 Migration 

Drupal 11 Upgrade Checklist OpenSense Labs

Drupal 10 was released in December 2022, and Drupal 11 upgrade arrived in just a year and a half. Drupal 11 came out early,…