We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def hanzi2pinyin(self, string=""): result = [] if not isinstance(string, unicode): string = string.decode("utf-8") for char in string: # 做ascII的判断 if ord(char) > 128: key = '%X' % ord(char) result.append(self.word_dict.get(key, char).split()[0][:-1].lower()) else: result.append(char) return result def hanzi2pinyin_split(self, string="", split=""): result = self.hanzi2pinyin(string=string) # 去除split的判断 return split.join(result) # 新增获取简拼(中国zg) def hanzi2jianpin(self, string=""): result = self.hanzi2pinyin(string=string) return
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: