4571bbf0507e935510b1a89dc6510ee574879fda,qanta/guesser/mem_nn.py,MemNNGuesser,train,#MemNNGuesser#Any#,207

Before Change



    def train(self, training_data: TrainingData) -> None:
        log.info("Collecting Wikipedia data...")
        classes = {format_guess(g) for g in training_data[1]}
        class_sentences = fetch_wikipedia_sentences(classes, self.n_wiki_sentences)

        log.info("Preprocessing training data...")
        x_train, y_train, _, x_test, y_test, _, vocab, class_to_i, i_to_class = preprocess_dataset(training_data)

After Change



    def train(self, training_data: TrainingData) -> None:
        log.info("Collecting Wikipedia data...")
        for i in range(len(training_data[1])):
            training_data[1][i] = format_guess(training_data[1][i])
        classes = set(training_data[1])
        wiki_sentences = build_wikipedia_sentences(classes, self.n_wiki_sentences)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Pinafore/qb
Commit Name: 4571bbf0507e935510b1a89dc6510ee574879fda
Time: 2017-04-19
Author: ski.rodriguez@gmail.com
File Name: qanta/guesser/mem_nn.py
Class Name: MemNNGuesser
Method Name: train


Project Name: ray-project/ray
Commit Name: 765d470c409dec3f599858b6a8ec7199eb8f2fa8
Time: 2020-05-25
Author: 869218239a@zju.edu.cn
File Name: python/ray/state.py
Class Name: GlobalState
Method Name: object_table


Project Name: biocore/scikit-bio
Commit Name: e149204a22366e7ddb1bb587f3c255ce2daf01e9
Time: 2016-04-19
Author: mcdonadt@colorado.edu
File Name: skbio/diversity/_driver.py
Class Name:
Method Name: _partial_pw