Repository: oppia/oppia

Issue:
ClassifyMatches constant should be renamed back to FuzzyMatches
The ClassifyMatches constant introduced in https://github.com/oppia/oppia/blob/develop/core/domain/exp_domain.py#L88 should be renamed back to 'FuzzyMatches', to avoid an unnecessary and significant bloat of the answer storage model.



Discussion:
/cc @seanlip @wxyxinyu 


Resolving patch:
diff --git a/core/domain/exp_domain.py b/core/domain/exp_domain.py
--- a/core/domain/exp_domain.py
+++ b/core/domain/exp_domain.py
@@ -85,7 +85,7 @@
 # used as an identifier for the default rule when storing which rule an answer
 # was matched against.
 DEFAULT_RULESPEC_STR = 'Default'
-CLASSIFIER_RULESPEC_STR = 'ClassifyMatches'
+CLASSIFIER_RULESPEC_STR = 'FuzzyMatches'
 
 
 def _get_full_customization_args(customization_args, ca_specs):


Test patch:
diff --git a/core/domain/exp_domain_test.py b/core/domain/exp_domain_test.py
--- a/core/domain/exp_domain_test.py
+++ b/core/domain/exp_domain_test.py
@@ -339,12 +339,12 @@ def test_validation(self):
                     'inputs': {
                         'training_data': ['Test']
                     },
-                    'rule_type': 'ClassifyMatches'
+                    'rule_type': 'FuzzyMatches'
                 }, {
                     'inputs': {
                         'training_data': ['Test']
                     },
-                    'rule_type': 'ClassifyMatches'
+                    'rule_type': 'FuzzyMatches'
                 }]
             })
         )
diff --git a/core/tests/data/string_classifier_test.yaml b/core/tests/data/string_classifier_test.yaml
--- a/core/tests/data/string_classifier_test.yaml
+++ b/core/tests/data/string_classifier_test.yaml
@@ -111,7 +111,7 @@ states:
               is n*n-1.
             - I think it is 6 because you can start with each of 3 balls and there
               are two permutations for each start colour.
-          rule_type: ClassifyMatches
+          rule_type: FuzzyMatches
         - inputs:
             x: permutations
           rule_type: StartsWith
@@ -163,7 +163,7 @@ states:
             - bcse combinations
             - 3C3
             - It is a combination
-          rule_type: ClassifyMatches
+          rule_type: FuzzyMatches
       - outcome:
           dest: Home
           feedback:
@@ -1077,7 +1077,7 @@ states:
             - With each color first ball there are 2 combinations
             - I know you do this by multiplying 1 x 2 x 3 because you have 3 balls
             - There are n x n-1 combinations
-          rule_type: ClassifyMatches
+          rule_type: FuzzyMatches
       - outcome:
           dest: Home
           feedback:
@@ -1273,7 +1273,7 @@ states:
             - r,b,y r,y,b b,r,y b,y,r y,b,r y,r,b
             - I counted in my head
             - b-y-g b-g-y g-b-y g-y-b y-b-g y-g-b
-          rule_type: ClassifyMatches
+          rule_type: FuzzyMatches
       - outcome:
           dest: Home
           feedback:
@@ -1308,7 +1308,7 @@ states:
             - realmente solo adivin\u00e9
             - I guessed.
             - don't know
-          rule_type: ClassifyMatches
+          rule_type: FuzzyMatches
         - inputs:
             x: hardrule
           rule_type: StartsWith