322d70ddf4964e7eb85334d695038ff0db7514a8,conceptnet5/builders/combine_assertions.py,,combine_assertions,#Any#Any#Any#Any#,20
Before Change
current_weight = 0.
current_sources = []
out = codecs.open(out_filename, "w", encoding="utf-8")
for line in codecs.open(csv_filename, encoding="utf-8"):
// Interpret the columns of the file.
uri, rel, start, end, context, weight, source_uri, id, this_dataset, surface = line.split("\t")[:10]
weight = float(weight)
After Change
continue
// Interpret the columns of the file.
parts = line.split("\t")
if len(parts) >= 10:
uri, rel, start, end, context, weight, source_uri, id, this_dataset, surface = parts[:10]
surface = surface.strip()
elif len(parts) == 9:
uri, rel, start, end, context, weight, source_uri, id, this_dataset = parts[:9]
surface = None
else:
raise ValueError("Malformed line in %r:\n\t%s" % (csv_filename, line))
weight = float(weight)
// If the uri is "uri", this was a header line, so ignore it.
if uri == "uri":
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: commonsense/conceptnet5
Commit Name: 322d70ddf4964e7eb85334d695038ff0db7514a8
Time: 2014-02-28
Author: rob@luminoso.com
File Name: conceptnet5/builders/combine_assertions.py
Class Name:
Method Name: combine_assertions
Project Name: maciejkula/spotlight
Commit Name: eef158f03c4ec9bf872a3e358d62a1fd21a73c35
Time: 2017-07-13
Author: maciej.kula@gmail.com
File Name: examples/movielens_cnn.py
Class Name:
Method Name:
Project Name: chainer/chainercv
Commit Name: b776ae08e9e676435c5cf8d1f31a86dfd3e1897f
Time: 2018-10-20
Author: yuyuniitani@gmail.com
File Name: chainercv/utils/image/read_image.py
Class Name:
Method Name: read_image