How to use the opencc.OPENCC_DEFAULT_CONFIG_TRAD_TO_SIMP function in OpenCC

To help you get started, we’ve selected a few OpenCC examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github EasyIME / PIME / python / input_methods / chewing / chewing_ime.py View on Github external
def setOutputSimplifiedChinese(self, outputSimpChinese):
        self.outputSimpChinese = outputSimpChinese
        # 建立 OpenCC instance 用來做繁簡體中文轉換
        if outputSimpChinese:
            if not self.opencc:
                self.opencc = opencc.OpenCC(opencc.OPENCC_DEFAULT_CONFIG_TRAD_TO_SIMP)
        else:
            self.opencc = None
github EasyIME / PIME / python / cinbase / __init__.py View on Github external
def setOutputSimplifiedChinese(self, CinBaseTextService, outputSimpChinese):
        CinBaseTextService.outputSimpChinese = outputSimpChinese
        # 建立 OpenCC instance 用來做繁簡體中文轉換
        if outputSimpChinese:
            if not CinBaseTextService.opencc:
                CinBaseTextService.opencc = opencc.OpenCC(opencc.OPENCC_DEFAULT_CONFIG_TRAD_TO_SIMP)
        else:
            CinBaseTextService.opencc = None

OpenCC

Conversion between Traditional and Simplified Chinese

Apache-2.0
Latest version published 7 months ago

Package Health Score

78 / 100
Full package analysis