1aa7e115fcf87b443373c14b7b2f3dd2e3383584,src/gensim/interfaces.py,CorpusABC,__len__,#CorpusABC#,53

Before Change


        This method is just the least common denominator and should really be 
        overridden when possible.
        
        logging.warning("performing full corpus scan to determine its length; was this intended?")
        return sum(1 for doc in self) // sum(empty generator) == 0, so this works even for an empty corpus

    @staticmethod
    def saveCorpus(fname, corpus, id2word=None):

After Change


        This method is just the least common denominator and should really be 
        overridden when possible.
        
        raise NotImplementedError("must override __len__() before calling len(corpus)")
//        logging.warning("performing full corpus scan to determine its length; was this intended?")
//        return sum(1 for doc in self) // sum(empty generator) == 0, so this works even for an empty corpus

    @staticmethod
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: RaRe-Technologies/gensim
Commit Name: 1aa7e115fcf87b443373c14b7b2f3dd2e3383584
Time: 2011-02-19
Author: radimrehurek@seznam.cz
File Name: src/gensim/interfaces.py
Class Name: CorpusABC
Method Name: __len__


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 3a6a7e8b09d8a76ad117dbecfa505653f4f93acf
Time: 2020-05-22
Author: beat.buesser@ie.ibm.com
File Name: art/attacks/evasion/projected_gradient_descent/projected_gradient_descent_pytorch.py
Class Name: ProjectedGradientDescentPyTorch
Method Name: __init__


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 3a6a7e8b09d8a76ad117dbecfa505653f4f93acf
Time: 2020-05-22
Author: beat.buesser@ie.ibm.com
File Name: art/attacks/evasion/projected_gradient_descent/projected_gradient_descent_tensorflow_v2.py
Class Name: ProjectedGradientDescentTensorFlowV2
Method Name: __init__