cb7c20f6ad714f0b016a874b2b06a9fbed4e0a59,tensorflow_transform/test_case.py,TransformTestCase,AssertVocabularyContents,#TransformTestCase#Any#Any#,290
Before Change
raise
def AssertVocabularyContents(self, vocab_file_path, file_contents):
with tf.io.gfile.GFile(vocab_file_path, "rb") as f:
file_lines = f.readlines()
// Store frequency case.
After Change
tf_utils.read_tfrecord_vocabulary_dataset(
vocab_file_path).as_numpy_iterator())
else:
with tf.io.gfile.GFile(vocab_file_path, "rb") as f:
file_lines = f.read().splitlines()
// Store frequency case.
if isinstance(file_contents[0], tuple):
word_and_frequency_list = []
for content in file_lines:
frequency, word = content.split(b" ", 1)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: tensorflow/transform
Commit Name: cb7c20f6ad714f0b016a874b2b06a9fbed4e0a59
Time: 2020-07-16
Author: zoy@google.com
File Name: tensorflow_transform/test_case.py
Class Name: TransformTestCase
Method Name: AssertVocabularyContents
Project Name: tensorflow/datasets
Commit Name: 02ccf29b446caebc140943d7fbb9f7b274861470
Time: 2019-03-05
Author: rickdey1998@gmail.com
File Name: tensorflow_datasets/audio/commonvoice.py
Class Name: CommonVoice
Method Name: _generate_examples
Project Name: tensorflow/datasets
Commit Name: 5a68c464caac68e4623f9a7b173bcf24aa719a5c
Time: 2019-12-06
Author: adarob@google.com
File Name: tensorflow_datasets/text/trivia_qa.py
Class Name: TriviaQA
Method Name: _generate_examples