MCPcopy Create free account
hub / github.com/google-research/language / __repr__

Method __repr__

language/realm/featurization.py:69–79  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

67 """
68
69 def __repr__(self):
70 # Underline the masked part of the query.
71 mask_chars = [' '] * len(self.text)
72 for start, stop in self.mask_spans:
73 for i in range(start, stop):
74 mask_chars[i] = '-'
75 mask_str = ''.join(mask_chars)
76
77 return '\n'.join([self.text.decode(), mask_str])
78 # NOTE: mask_str may not line up with self.text after self.text is
79 # converted to UTF-8.
80
81
82class Featurizer(object):

Callers

nothing calls this directly

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected