df1dd9b108f3cd7d5130e7f654ea099021c7a2b3,qanta/guesser/experimental/elasticsearch_instance_of.py,ElasticSearchIndex,search,#ElasticSearchIndex#Any#Any#Any#Any#,82
Before Change
def search(self, text: str, predicted_instance_of: str,
instance_of_probability: float, confidence_threshold: float):
if predicted_instance_of == NO_MATCH:
apply_filter = False
elif instance_of_probability > confidence_threshold:
apply_filter = True
else:
apply_filter = False
if apply_filter:
s = Search(index=INDEX_NAME)\
.filter("term", instance_of=predicted_instance_of)\
.query(
After Change
for sent in q:
x_data.append(sent)
if p in instance_of_map:
y_data.append(class_to_i[instance_of_map[p]])
else:
y_data.append(class_to_i[NO_MATCH])
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: Pinafore/qb
Commit Name: df1dd9b108f3cd7d5130e7f654ea099021c7a2b3
Time: 2017-05-24
Author: ski.rodriguez@gmail.com
File Name: qanta/guesser/experimental/elasticsearch_instance_of.py
Class Name: ElasticSearchIndex
Method Name: search
Project Name: nilmtk/nilmtk
Commit Name: 5eeca7d385178092790e08c1d5ad6cbcff35d3dc
Time: 2014-12-11
Author: jack-list@xlk.org.uk
File Name: nilmtk/metergroup.py
Class Name: MeterGroup
Method Name: load
Project Name: kmike/pymorphy2
Commit Name: 07652d40f99f814d0497ac68ce8e636d96f3c6a7
Time: 2015-01-24
Author: kmike84@gmail.com
File Name: pymorphy2/opencorpora_dict/parse.py
Class Name:
Method Name: parse_opencorpora_xml