d0ef24d6c11eb50aae3b6d0ef92efe111710dbe5,textrenderer/corpus.py,EngCorpus,get_sample,#EngCorpus#,73

Before Change


            print("Word count {}".format(len(self.corpus)))

    def get_sample(self):
        words = [random.choice(self.corpus) for _ in range(self.length)]
        word = " ".join(words)
        return word

After Change


            print("Word count {}".format(len(self.corpus)))

    def get_sample(self):
        start = np.random.randint(0, len(self.corpus) - self.length)
        words = self.corpus[start:start + self.length]
        word = " ".join(words)
        return word
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: Sanster/text_renderer
Commit Name: d0ef24d6c11eb50aae3b6d0ef92efe111710dbe5
Time: 2018-07-05
Author: cwq1913@gmail.com
File Name: textrenderer/corpus.py
Class Name: EngCorpus
Method Name: get_sample


Project Name: ntucllab/libact
Commit Name: 7382c62fbce9f5da07cd502f6b715c7e1747fb40
Time: 2016-04-20
Author: yangarbiter@gmail.com
File Name: libact/query_strategies/random_sampling.py
Class Name: RandomSampling
Method Name: make_query


Project Name: dmlc/gluon-cv
Commit Name: d4ab9fc7f6948abcc90d64cca0d01d44e2e84f4e
Time: 2018-04-11
Author: cheungchih@gmail.com
File Name: gluonvision/data/transforms/experimental/bbox.py
Class Name:
Method Name: random_crop_with_constraints