MCPcopy Create free account
hub / github.com/MoonInTheRiver/DiffSinger / strip_ids

Function strip_ids

utils/text_encoder.py:28–33  ·  view source on GitHub ↗

Strip ids_to_strip from the end ids.

(ids, ids_to_strip)

Source from the content-addressed store, hash-verified

26
27
28def strip_ids(ids, ids_to_strip):
29 """Strip ids_to_strip from the end ids."""
30 ids = list(ids)
31 while ids and ids[-1] in ids_to_strip:
32 ids.pop()
33 return ids
34
35
36class TextEncoder(object):

Callers 2

decodeMethod · 0.85
decodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected