self.assertAllEqual(expected_words, actual_words)
np.testing.assert_almost_equal(expected_frequency, actual_frequency)
else:
file_lines = [content.strip(b"\n") for content in file_lines]
self.assertAllEqual(file_lines, file_contents)
def WriteRenderedDotFile(self, dot_string, output_file=None):
tf.compat.v1.logging.info(
After Change
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 = []