Urgent.News

What's breaking now, across thousands of outlets.

Tech

How I built Maliklang-A Hinglish-native Python interpreter from scratch in 19 day

Hi everyone! I wanted to share my recent project called Maliklang . It is a Hinglish-native Python programming interpreter and AI ecosystem built from scratch! It recently trended on Reddit and Peerlist, and even got indexed by Google AI Overview! Check out the code here: https://github.com/shailendra-codes/Maliklang I would love to hear your thoughts and feedback!

Last week, the author realized they were prone to thinking: "I always mess everything up." This thought is an example of overgeneralization, a cognitive distortion where a single mistake is perceived as a complete failure. The author wanted to check this immediately, so they created a journal that automatically flags cognitive distortions using a CBT Thought Analyzer API they deployed themselves.

The API can identify 11 cognitive distortions, 8 procrastination patterns, and 4 attachment styles. The analysis is based on evidence-based keyword pattern matching and does not require an AI model.

The journal entry is implemented in 50 lines of Python code. It includes functions to analyze thoughts for cognitive distortions and procrastination patterns, as well as to write a journal entry with automatic CBT analysis. The code uses the requests library to send thoughts to the CBT analyzer API and the datetime library to add a timestamp to each journal entry. The author tested the journal with four example thoughts and received automatic analysis results for each one.

The output shows the timestamp, the thought, and any detected distortions or procrastination patterns. For each thought, the analyst provides a confidence percentage for each detected distortion or pattern, as well as suggested reframes or interventions. If no distortions or procrastination patterns are detected, the analyst notes that the thought appears balanced. The journal provides immediate feedback on thought patterns, helping users identify and challenge cognitive distortions and procrastination tendencies.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at dev.to โ†’

More in Tech

Building a Persistent Smart Contact Book CLI App Using Pure Python

Hello DEV Community! As a 2nd-year BCA student aspiring to become a Web / Developer Advocate , I believe that mastering data structures, error handling, and file persistence is crucial.

  • Smart Contact Book CLI app developed with Python
  • Contacts securely stored in contacts.json file
  • CRUD operations enable contact list management

More from Sunday 20 September โ†’