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

Before Change


    if seg_list:

        // 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: 8

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: IndicoDataSolutions/finetune
Commit Name: 2c2148e076429a42064232bdd9855d2c78efbb32
Time: 2018-10-11
Author: madison@indico.io
File Name: finetune/sequence_labeling.py
Class Name: SequenceLabeler
Method Name: _inference


Project Name: michaelhush/M-LOOP
Commit Name: 5b2331036cb69bab4948a53bb440e09d7b93dfac
Time: 2017-05-16
Author: harry.slatyer@gmail.com
File Name: mloop/nnlearner.py
Class Name: SingleNeuralNet
Method Name: fit