be5b7adef5a75a8db9af53c641cf6e2233fb2832,snips_nlu/slot_filler/data_augmentation.py,,get_noise_iterator,#Any#Any#Any#,70

Before Change


    for subtitle in subtitles_it:
        size = random.choice(range(min_size, max_size + 1))
        tokens = tokenize(subtitle)
        while len(tokens) < size:
            tokens = tokenize(next(subtitles_it))
        start = random.randint(0, len(tokens) - size)
        yield " ".join(t.value.lower() for t in tokens[start:start + size])

After Change


    tokenized_subtitles = [tokenize(s) for s in subtitles]
    tokenized_subtitles = [t for t in tokenized_subtitles if
                           len(t) >= max_size]
    if len(tokenized_subtitles) == 0:
        raise ValueError("Could not find long enought subtitles")
    subtitles_it = cycle(np.random.permutation(tokenized_subtitles))
    for tokens in subtitles_it:
        size = random.choice(range(min_size, max_size + 1))
        start = random.randint(0, len(tokens) - size)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: snipsco/snips-nlu
Commit Name: be5b7adef5a75a8db9af53c641cf6e2233fb2832
Time: 2017-04-12
Author: clement.doumouro@snips.ai
File Name: snips_nlu/slot_filler/data_augmentation.py
Class Name:
Method Name: get_noise_iterator


Project Name: Bihaqo/t3f
Commit Name: 4257bd12136ce3a135a4fab4ad0667dfccf8368d
Time: 2017-02-03
Author: novikov@bayesgroup.ru
File Name: variables.py
Class Name:
Method Name: get_tt_variable


Project Name: chainer/chainercv
Commit Name: babf7c9f50282143ab8efee96a587bf5cb74123f
Time: 2017-06-01
Author: yuyuniitani@gmail.com
File Name: chainercv/evaluations/eval_semantic_segmentation_iou.py
Class Name:
Method Name: calc_semantic_segmentation_confusion