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

Method _particular

utils/text_norm.py:608–617  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

606 self.norm_text = ''
607
608 def _particular(self):
609 text = self.norm_text
610 pattern = re.compile(r"(([a-zA-Z]+)二([a-zA-Z]+))")
611 matchers = pattern.findall(text)
612 if matchers:
613 # print('particular')
614 for matcher in matchers:
615 text = text.replace(matcher[0], matcher[1] + '2' + matcher[2], 1)
616 self.norm_text = text
617 return self.norm_text
618
619 def normalize(self, remove_punc=True):
620 text = self.raw_text

Callers 1

normalizeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected