db4b9f4d50af9e83733fc301c32e85cbe6d9c812,conceptnet5/builders/json_to_solr.py,,convert_to_solr,#Any#Any#,12
Before Change
writer = SolrEdgeWriter(out_stream)
for line in in_stream:
if not line.strip():
continue
info = json.loads(line.strip().decode("utf-8"))
writer.write(info)
writer.close()
if __name__ == "__main__":
After Change
if "surfaceText" in info and info["surfaceText"] is None:
del info["surfaceText"]
solr_struct = {"doc": info, "boost": boost}
solr_fragment = "\t"add": %s," % json.dumps(solr_struct)
print(solr_fragment, file=out)
print("\t"commit": {}", file=out)
print("}", file=out)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: commonsense/conceptnet5
Commit Name: db4b9f4d50af9e83733fc301c32e85cbe6d9c812
Time: 2014-02-25
Author: rob@luminoso.com
File Name: conceptnet5/builders/json_to_solr.py
Class Name:
Method Name: convert_to_solr
Project Name: chakki-works/doccano
Commit Name: 49d41416e440926f0a9a8243b4d77f6f5468efe9
Time: 2019-03-12
Author: light.tree.1.13@gmail.com
File Name: app/server/utils.py
Class Name: CoNLLHandler
Method Name: parse
Project Name: facebookresearch/ParlAI
Commit Name: 72c304fa7cac16ed19d8bc75a017f17c8073dd2f
Time: 2020-02-13
Author: roller@fb.com
File Name: parlai/utils/misc.py
Class Name: TimeLogger
Method Name: log