dynamic-learning-model 3.2__tar.gz → 3.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dynamic_learning_model-3.2 → dynamic_learning_model-3.3.0}/PKG-INFO +1 -1
- {dynamic_learning_model-3.2 → dynamic_learning_model-3.3.0}/dlm/DLM.py +18 -13
- {dynamic_learning_model-3.2 → dynamic_learning_model-3.3.0}/dynamic_learning_model.egg-info/PKG-INFO +1 -1
- {dynamic_learning_model-3.2 → dynamic_learning_model-3.3.0}/setup.py +1 -1
- {dynamic_learning_model-3.2 → dynamic_learning_model-3.3.0}/LICENSE +0 -0
- {dynamic_learning_model-3.2 → dynamic_learning_model-3.3.0}/README.md +0 -0
- {dynamic_learning_model-3.2 → dynamic_learning_model-3.3.0}/dlm/DLM_Compute_Model.py +0 -0
- {dynamic_learning_model-3.2 → dynamic_learning_model-3.3.0}/dlm/DLM_Memory_Model.py +0 -0
- {dynamic_learning_model-3.2 → dynamic_learning_model-3.3.0}/dlm/__init__.py +0 -0
- {dynamic_learning_model-3.2 → dynamic_learning_model-3.3.0}/dynamic_learning_model.egg-info/SOURCES.txt +0 -0
- {dynamic_learning_model-3.2 → dynamic_learning_model-3.3.0}/dynamic_learning_model.egg-info/dependency_links.txt +0 -0
- {dynamic_learning_model-3.2 → dynamic_learning_model-3.3.0}/dynamic_learning_model.egg-info/requires.txt +0 -0
- {dynamic_learning_model-3.2 → dynamic_learning_model-3.3.0}/dynamic_learning_model.egg-info/top_level.txt +0 -0
- {dynamic_learning_model-3.2 → dynamic_learning_model-3.3.0}/pyproject.toml +0 -0
- {dynamic_learning_model-3.2 → dynamic_learning_model-3.3.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dynamic-learning-model
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.3.0
|
|
4
4
|
Summary: A Dynamic Learning Model for processing NLP queries using hybrid AI and reasoning.
|
|
5
5
|
Home-page: https://github.com/VigneshT24/Dynamic_Learning_Model
|
|
6
6
|
Author: Vignesh Thondikulam
|
|
@@ -4,10 +4,10 @@ import random
|
|
|
4
4
|
import spacy
|
|
5
5
|
import time
|
|
6
6
|
import sqlite3
|
|
7
|
-
from DLM_Compute_Model import perform_advanced_CoT
|
|
8
|
-
from DLM_Memory_Model import get_category
|
|
9
|
-
from DLM_Memory_Model import get_specific_question
|
|
10
|
-
from DLM_Memory_Model import learn
|
|
7
|
+
from .DLM_Compute_Model import perform_advanced_CoT
|
|
8
|
+
from .DLM_Memory_Model import get_category
|
|
9
|
+
from .DLM_Memory_Model import get_specific_question
|
|
10
|
+
from .DLM_Memory_Model import learn
|
|
11
11
|
import math
|
|
12
12
|
from transformers import pipeline
|
|
13
13
|
from better_profanity import profanity
|
|
@@ -26,7 +26,7 @@ class DLM:
|
|
|
26
26
|
__nlp_similarity_value = None # saves the similarity value by doing SpaCy calculation (for debugging)
|
|
27
27
|
__special_stripped_query = None # saves query without any special words for reduced interference while vector calculating
|
|
28
28
|
__nltk_names = set(name.lower() for name in names.words()) # list of name corpus to be identified in complex word problems
|
|
29
|
-
__refuse_to_respond = False # if profanity
|
|
29
|
+
__refuse_to_respond = False # if profanity and all caps-lock frustration is detected, refuse to respond and suggest user to rephrase nicely
|
|
30
30
|
__model = None # bot automatically chooses between "compute" or "memory" model based on query type (auto-routing)
|
|
31
31
|
__hf_classifier = None # loading huggingface model to determine the query type for auto_mode
|
|
32
32
|
__successfully_computed = False # for when computation model was able to give an answer to a mathematical problem
|
|
@@ -1038,13 +1038,18 @@ class DLM:
|
|
|
1038
1038
|
learn(self, self.__expectation, self.__category) # learn this new question and answer pair and add to knowledgebase
|
|
1039
1039
|
print("I learned something new!") # confirmation that it went through the whole process
|
|
1040
1040
|
else: # only executes when in apply mode and bot cannot find the answer
|
|
1041
|
-
if
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1041
|
+
if self.__try_compute:
|
|
1042
|
+
if display_thought:
|
|
1043
|
+
self.__loading_animation(f"Let me put this into my computation model, maybe it was a mathematical query", 0.5)
|
|
1044
|
+
self.__model = "compute"
|
|
1045
|
+
self.__try_compute = True
|
|
1046
|
+
self.__generate_thought(filtered_query, best_match_question, best_match_answer, highest_similarity,
|
|
1047
|
+
display_thought)
|
|
1048
|
+
if not self.__successfully_computed:
|
|
1049
|
+
print(f"{'\033[34m'}{random.choice(self.__fallback_responses)}{'\033[0m'}")
|
|
1050
|
+
self.__try_compute = False
|
|
1051
|
+
self.__successfully_computed = False
|
|
1052
|
+
else:
|
|
1048
1053
|
print(f"{'\033[34m'}{random.choice(self.__fallback_responses)}{'\033[0m'}")
|
|
1049
1054
|
self.__try_compute = False
|
|
1050
|
-
self.
|
|
1055
|
+
self.__try_memory = False
|
{dynamic_learning_model-3.2 → dynamic_learning_model-3.3.0}/dynamic_learning_model.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dynamic-learning-model
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.3.0
|
|
4
4
|
Summary: A Dynamic Learning Model for processing NLP queries using hybrid AI and reasoning.
|
|
5
5
|
Home-page: https://github.com/VigneshT24/Dynamic_Learning_Model
|
|
6
6
|
Author: Vignesh Thondikulam
|
|
@@ -5,7 +5,7 @@ with open('README.md', 'r', encoding='utf-8') as f:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name='dynamic-learning-model',
|
|
8
|
-
version='3.
|
|
8
|
+
version='3.3.0',
|
|
9
9
|
author='Vignesh Thondikulam',
|
|
10
10
|
author_email='vignesh.tho2006@gmail.com',
|
|
11
11
|
description='A Dynamic Learning Model for processing NLP queries using hybrid AI and reasoning.',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|