1207689fa1e6ff2d321ccc182be13825b4e2575e,pytext/models/embeddings/word_embedding.py,WordEmbedding,from_config,#Any#Any#Any#Any#Any#,41

Before Change


                        "`min_freq` must be 1"
                    )
                    if not config.vocab_from_train_data:  // Reset token counter.
                        tensorizer.vocab_builder._counter = collections.Counter()
                    pretrained_vocab = pretrained_embedding.embed_vocab
                    if config.vocab_size:
                        pretrained_vocab = pretrained_vocab[: config.vocab_size]
                    tensorizer.vocab_builder.add_all(pretrained_vocab)

After Change


            if config.pretrained_embeddings_path and not init_from_saved_state:
                if not any(
                    vocab_file.filepath == config.pretrained_embeddings_path
                    for vocab_file in tensorizer.vocab_config.vocab_files
                ):
                    raise ValueError(
                        f"Tensorizer"s vocab files should include pretrained "
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: facebookresearch/pytext
Commit Name: 1207689fa1e6ff2d321ccc182be13825b4e2575e
Time: 2019-07-12
Author: mikaell@fb.com
File Name: pytext/models/embeddings/word_embedding.py
Class Name: WordEmbedding
Method Name: from_config


Project Name: OpenNMT/OpenNMT-py
Commit Name: d556116728d4f505eb14be081f29e32212145725
Time: 2017-09-01
Author: bpeters@coli.uni-saarland.de
File Name: onmt/IO.py
Class Name:
Method Name: merge_vocabs


Project Name: JasonKessler/scattertext
Commit Name: 144aa65949d84526980d53ad1434d0a6ae9cba27
Time: 2017-01-24
Author: jason.kessler@gmail.com
File Name: scattertext/TermDocMatrixFactory.py
Class Name: TermDocMatrixFactory
Method Name: _get_features_from_parsed_text


Project Name: dpressel/mead-baseline
Commit Name: 92849315a08ac89243ef2613e28ff56efecd21cb
Time: 2018-12-03
Author: blester125@users.noreply.github.com
File Name: python/baseline/reader.py
Class Name: LineSeqReader
Method Name: build_vocab