e64a027b9a50e6a10e520aeaa540adf60ceeb87c,lexos/processors/prepare/cutter.py,,cut_by_number,#,182

Before Change



        // the length of every chunk
        seg_size = len(seg_list) / (num_segment + 1)
        int_seg_size = int(math.ceil(seg_size))

        // cut the seg_list
        final_seg_list = cut_list_with_overlap(
            input_list=seg_list, norm_seg_size=int_seg_size, overlap=0,
            last_prop=1)

    // if the seg_list is empty
    else:
        final_seg_list = seg_list

After Change



            return words_list[start: start + norm_seg_size]

    seg_list = [get_single_seg(index) for index in range(num_segment)]

    // join words in each sublist
    final_seg_list = join_sublist_element(input_list=seg_list)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: WheatonCS/Lexos
Commit Name: e64a027b9a50e6a10e520aeaa540adf60ceeb87c
Time: 2017-08-15
Author: darias0826@gmail.com
File Name: lexos/processors/prepare/cutter.py
Class Name:
Method Name: cut_by_number


Project Name: Shawn1993/cnn-text-classification-pytorch
Commit Name: 380653e086e1eee3342e3c9d54854e10e19a711d
Time: 2019-07-17
Author: rriva002@ucr.edu
File Name: cnn_text_classification.py
Class Name: CNNClassifier
Method Name: __preprocess


Project Name: geekcomputers/Python
Commit Name: e1c4e6a7c7db68e123d978bfc56feb057898935f
Time: 2019-10-24
Author: kostasdedesar@penguin
File Name: Counting-sort.py
Class Name:
Method Name: