06e94610dc2d71997ca567b45df02f5ea7613a81,apps/analyzer/classifier.py,Classifier,get_features,#Classifier#Any#,15

Before Change


        self.feed = feed

    def get_features(self, doc):
        splitter=re.compile("\\W*")
        // Split the words by non-alpha characters
        words=[s.lower() for s in splitter.split(doc) 
              if len(s)>2 and len(s)<20]
  
        // Return the unique set of words only

After Change


        
        for phrase in self.phrases:
            if phrase in doc:
                if phrase in found:
                    found[phrase] += 1
                else:
                    found[phrase] = 1

        return found
        
    def increment_feature(self, feature, category):
        count = self.feature_count(feature,category)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: samuelclay/NewsBlur
Commit Name: 06e94610dc2d71997ca567b45df02f5ea7613a81
Time: 2009-11-15
Author: samuel@ofbrooklyn.com
File Name: apps/analyzer/classifier.py
Class Name: Classifier
Method Name: get_features


Project Name: MolSSI/QCEngine
Commit Name: 8561e951aa162ef48ef73ba78f675cfe88f0c180
Time: 2019-09-25
Author: jsteinmetzer1108@aol.com
File Name: qcengine/programs/turbomole/harvester.py
Class Name:
Method Name: harvest


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: c84eb9306a521ddcefe8ca805ac633408e5b312a
Time: 2015-05-09
Author: voellm@google.com
File Name: perfkitbenchmarker/benchmarks/iperf_benchmark.py
Class Name:
Method Name: _RunIperf


Project Name: hellohaptik/chatbot_ner
Commit Name: 00778415bcdc7f786fa3b9dc6f44664f17cc38a6
Time: 2017-11-27
Author: jain.chirag925@gmail.com
File Name: ner_v1/detectors/temporal/date/date_detection.py
Class Name: DateAdvanceDetector
Method Name: _detect_range