dynamic-learning-model 2.1__tar.gz → 2.1.5__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dynamic-learning-model
3
- Version: 2.1
3
+ Version: 2.1.5
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
@@ -223,8 +223,8 @@ class DLM:
223
223
  },
224
224
  "rectangle": {
225
225
  "keywords": ["area", "rectangle"],
226
- "params": ["length", "width"],
227
- "formula": lambda d: d["length"] * d["width"]
226
+ "params": ["height", "width"],
227
+ "formula": lambda d: d["height"] * d["width"]
228
228
  },
229
229
  "parallelogram": {
230
230
  "keywords": ["area", "parallelogram"],
@@ -265,8 +265,10 @@ class DLM:
265
265
  },
266
266
  "rectangular prism": {
267
267
  "keywords": ["volume", "rectangular prism"],
268
- "params": ["length", "width", "height"],
269
- "formula": lambda d: d["length"] * d["width"] * d["height"]
268
+ # "params": ["length", "width", "height"],
269
+ # "formula": lambda d: d["length"] * d["width"] * d["height"]
270
+ "params": ["height", "length", "width"],
271
+ "formula": lambda d: d["height"] * d["length"] * d["width"]
270
272
  },
271
273
  "cylinder": {
272
274
  "keywords": ["volume", "cylinder"],
@@ -708,9 +710,13 @@ class DLM:
708
710
  break
709
711
  is_similar = difflib.get_close_matches(phrase, [obj], n=1, cutoff=0.70)
710
712
  if is_similar and is_similar[0] == obj:
711
- object_intel.extend(self.__geometric_calculation_identifiers[obj]["keywords"])
712
- end_check = True
713
- break
713
+ geom_type = self.__geometric_calculation_identifiers[obj]["keywords"]
714
+ if (lower_tokens.__contains__(geom_type[0])):
715
+ object_intel.extend(geom_type)
716
+ end_check = True
717
+ break
718
+ else:
719
+ continue
714
720
  if end_check:
715
721
  break
716
722
 
@@ -759,9 +765,13 @@ class DLM:
759
765
  try:
760
766
  if "height" in params:
761
767
  formula_inputs["height"] = height_value
768
+ if "side" in params:
769
+ formula_inputs["side"] = height_value
762
770
 
763
771
  value_idx = 0 # count how many values to be added in formula_inputs
764
772
  for param in params:
773
+ if len(other_values) < 1:
774
+ break
765
775
  if param == "height":
766
776
  continue # already added
767
777
  elif param == "other": # two consecutive numbers to append
@@ -770,7 +780,8 @@ class DLM:
770
780
  else: # only one number to append
771
781
  formula_inputs[param] = other_values[value_idx]
772
782
  value_idx += 1
773
-
783
+ if len(other_values) <= 1:
784
+ break
774
785
  # Try calculating the result and return
775
786
  result = round(formula(formula_inputs), 4)
776
787
  return result
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dynamic-learning-model
3
- Version: 2.1
3
+ Version: 2.1.5
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='2.1',
8
+ version='2.1.5',
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.',