Open Chinese Convert 0.4.3 A project for conversion between Traditional and Simplified Chinese

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

All Data Structures Files Functions Variables Groups Pages
Data Structures | Functions
Python API

API in python language. More...

## Data Structures
class | opencc.OpenCC
| OpenCC Python language binding. More...

## Functions
def | opencc.OpenCC.__init__
| Constructor. More...
def | opencc.OpenCC.convert
| Converts text. More...

## Detailed Description

API in python language.

## Function Documentation

def opencc.OpenCC.__init__ | ( |  | self,
|  |  | config = `None`,
|  |  | verbose = `True`
| ) |  |

Constructor.

Parameters

  self | The object pointer.
  config | Filename of config.
  verbose | Specifies whether error information is printed.

Definition at line 26 of file opencc.py.

def opencc.OpenCC.convert | ( |  | self,
|  |  | text
| ) |  |

Converts text.

Parameters

  self | The object pointer.
  text | Input text.

Returns
  Converted text.

Definition at line 66 of file opencc.py.