Skip to content
JoaoGuiMBPublic

About

LGPDúvida is a chatbot that answers user's doubt about the brazilian's General Data Protection Regulation LGPD.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

25 Commits

Folders and files

Repository files navigation

LGPDúvida

LGPDúvida is a chatbot that answers user's doubt about the brazilian's General Data Protection Regulation LGPD.

This project is a search engine that compares the users's doubt with the text of each article and classify them according with their content.

How it works?

Firstly, each article of the official brazilian General Data Protection Regulation pass through a process of analysis that removes punctuation and accents, stop words (most common portuguese words), convertion to lowercase and applying stemming to every word (ensuring that different forms of a word map to the same stem, like brewery and breweries).

Then the query text (user's doubt) will pass through the same process and be compared with the articles and ranked by the term frequency.

To improve the scoring algorithm, it's necessary to compute the inverse articles frequency for a term by dividing the number of articles (N) in the index by the amount of articles that contain the term, and take a logarithm of that, then simply multiple the term frequency with the inverse article frequency during our ranking, so matches on terms that are rare in the article text will contribute more to the relevancy score.

The chatbot itself was developed using the low code platform Blip

Usage

  1. Clone the respository
 git clone https://github.com/JoaoGuiMB/lgpduvida.git
  1. Install dependencies
pip3 freeze > requirements.txt
  1. Run application
gunicorn main:app

4.Query

curl --request POST \
  --url http://localhost:8000/query \
  --header 'Content-Type: application/json' \
  --data '{
	"query": "Quais são os princípios dessa lei?"
}'

Or access the chatbot

Credits

This applications was strongly influeced by the tutorial made by Bart de Goede

About

LGPDúvida is a chatbot that answers user's doubt about the brazilian's General Data Protection Regulation LGPD.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages