e6b037e428c705168d7bc7173df2d38efcb56147,megam_to_libsvm.py,,convert_to_libsvm,#Any#,39

Before Change


                del split_line[0]
                // Loop through all feature-value pairs printing out pairs separated by commas (and with feature names replaced with numbers)
                for field_num, value in sorted(izip([field_num_dict[field_name] for field_name in split_line[::2]],
                                                    [float(value) if value != "N/A" else 0.0 for value in split_line[1::2]])):
                    // Check for duplicates
                    if field_num in line_fields:
                        field_name = (field_name for field_name, f_num in field_num_dict.items() if f_num == field_num).next()

After Change


            if len(split_line) > 1:
                del split_line[0]
                // Loop through all feature-value pairs printing out pairs separated by commas (and with feature names replaced with numbers)
                for field_num, value in sorted(izip((field_num_dict[field_name] for field_name in islice(split_line, 0, None, 2)),
                                                    (float(value) if value != "N/A" else 0.0 for value in islice(split_line, 1, None, 2)))):
                    // Check for duplicates
                    if field_num in line_fields:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: EducationalTestingService/skll
Commit Name: e6b037e428c705168d7bc7173df2d38efcb56147
Time: 2013-07-19
Author: dblanchard@ets.org
File Name: megam_to_libsvm.py
Class Name:
Method Name: convert_to_libsvm


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: JsonHandler
Method Name: parse


Project Name: chakki-works/doccano
Commit Name: f8a72a0a60658d462753fe39a2119932358ccca5
Time: 2018-12-26
Author: sergiy.n@attendify.com
File Name: app/server/views.py
Class Name: DataUpload
Method Name: post