MCPcopy Create free account
hub / github.com/csxmli2016/MARCONetPlusPlus / tensor2str

Function tensor2str

utils/utils_transocr.py:114–121  ·  view source on GitHub ↗
(tensor, alpha_path)

Source from the content-addressed store, hash-verified

112 return alphabet_character
113
114def tensor2str(tensor, alpha_path):
115 alphabet = get_alphabet(alpha_path)
116 string = ""
117 for i in tensor:
118 if i == (len(alphabet)-1):
119 continue
120 string += alphabet[i]
121 return string

Callers

nothing calls this directly

Calls 1

get_alphabetFunction · 0.85

Tested by

no test coverage detected