9007173bc361484fb7484d3abff437d91717c602,pliers/extractors/api/google.py,GoogleLanguageAPIExtractor,_to_df,#GoogleLanguageAPIExtractor#Any#,460

Before Change


        // TODO: use mention-specific data
        for entity in response.get("entities", []):
            mentions = []
            entity_data = {}
            for k, v in entity.items():
                if k == "mentions":
                    mentions = [self._get_span(m) for m in v]
                elif k == "sentiment":
                    entity_data.update(self._prefix_keys(v, "sentiment"))
                elif k != "name":  // avoid redundancy with "text" field
                    entity_data["entity_%s" % k] = v

            for m in mentions:

After Change


        // Entity-level features
        // TODO: use mention-specific data
        for entity in response.get("entities", []):
            entity_copy = entity.copy()
            mentions = entity_copy.pop("mentions", [])
            entity_copy.pop("name", None)

            for m in mentions:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 4

Instances


Project Name: tyarkoni/pliers
Commit Name: 9007173bc361484fb7484d3abff437d91717c602
Time: 2018-06-14
Author: quinten.mcnamara@gmail.com
File Name: pliers/extractors/api/google.py
Class Name: GoogleLanguageAPIExtractor
Method Name: _to_df


Project Name: elfi-dev/elfi
Commit Name: 55bd09be272701797abcf9e549fffe8b0311e387
Time: 2017-03-28
Author: jarno.lintusaari@aalto.fi
File Name: elfi/bo/gpy_model.py
Class Name: GPyRegression
Method Name: copy


Project Name: etal/cnvkit
Commit Name: ece2d040904bd9d3885f9da5b5915a2ffdf5441b
Time: 2015-06-13
Author: eric.talevich@gmail.com
File Name: cnvlib/gary.py
Class Name: GenomicArray
Method Name: add_columns


Project Name: pantsbuild/pants
Commit Name: 5470b8650698945efa4fe7bc09f3fbc57ab8a149
Time: 2017-02-21
Author: stuhood@twitter.com
File Name: src/python/pants/invalidation/build_invalidator.py
Class Name: CacheKeyGenerator
Method Name: key_for_target


Project Name: maciejkula/spotlight
Commit Name: fac728372b7f27cb8831eac1daf0ace958f87af9
Time: 2017-08-13
Author: maciej.kula@gmail.com
File Name: examples/bloom_embeddings/example.py
Class Name: Results
Method Name: save


Project Name: ray-project/ray
Commit Name: b796de41049aa3b3696a6b7242799284c3f0c641
Time: 2021-01-20
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/util/metrics.py
Class Name: Metric
Method Name: record