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:
m.update(entity_data)
data.append(m)
After Change
// 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:
entity_data = self._get_span(m)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
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: 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: dask/distributed
Commit Name: db758d0f8609dd0fa041b212ecc89a088b57291e
Time: 2018-06-23
Author: mrocklin@gmail.com
File Name: distributed/deploy/adaptive.py
Class Name: Adaptive
Method Name: _adapt
Project Name: deepgram/kur
Commit Name: ac9487d9a381e4f0f2b769524da27e4baed45189
Time: 2017-01-19
Author: ajsyp@syptech.net
File Name: kur/utils/environtools.py
Class Name: EnvironmentalVariable
Method Name: __exit__