38f2221f5a1d62d7dceeef7d9671d16705ae9c9e,gensim/topic_coherence/probability_estimation.py,,p_boolean_document,#Any#Any#,34

Before Change


    // Iterate through the documents, appending the document number to the set for each top_id it contains
    for n, document in enumerate(corpus):
        doc_words = frozenset(x[0] for x in document)
        top_ids_in_doc = top_ids.intersection(doc_words)
        if len(top_ids_in_doc) > 0:
            for id in top_ids_in_doc:
                per_topic_postings[id].add(n)
    num_docs = len(corpus)

After Change


    // Iterate through the documents, appending the document number to the set for each top_id it contains
    for n, document in enumerate(corpus):
        doc_words = frozenset(x[0] for x in document)
        for word_id in top_ids.intersection(doc_words):
            per_topic_postings[word_id].add(n)
    num_docs = len(corpus)
    return per_topic_postings, num_docs
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: RaRe-Technologies/gensim
Commit Name: 38f2221f5a1d62d7dceeef7d9671d16705ae9c9e
Time: 2017-05-27
Author: menshikh.iv@gmail.com
File Name: gensim/topic_coherence/probability_estimation.py
Class Name:
Method Name: p_boolean_document


Project Name: azavea/raster-vision
Commit Name: a60b85451dab80d3480f822bf6f52215e35dc8fb
Time: 2018-10-06
Author: lewfish@gmail.com
File Name: src/rastervision/data/raster_source/geojson_source.py
Class Name:
Method Name: geojson_to_raster


Project Name: tensorflow/models
Commit Name: 0ad4922f5617a0bdede56fa9d5cccf26bbdc294c
Time: 2020-07-08
Author: rathodv@google.com
File Name: research/object_detection/model_lib.py
Class Name:
Method Name: unstack_batch


Project Name: gboeing/osmnx
Commit Name: bc844551d6d2829668b9ed8dd5cee3ffdb48f0d8
Time: 2020-07-01
Author: boeing@usc.edu
File Name: osmnx/utils_geo.py
Class Name:
Method Name: _intersect_index_quadrats