ckip_classic.client package

class ckip_classic.client.CkipParserClient(*, username=None, password=None)[source]

Bases: object

The CKIP sentence parsing client.

Parameters
  • username (str) – the username (default to the environment variable $CKIPPARSER_USERNAME).

  • password (str) – the password (default to the environment variable $CKIPPARSER_PASSWORD).

Note

One may register an account at http://parser.iis.sinica.edu.tw/v1/reg.exe

apply(text)[source]

Parse a sentence.

Parameters

text (str) – the input sentence.

Returns

str – the output sentence.

Hint

One may also call this method as __call__().

apply_list(ilist)[source]

Parse a list of sentences.

Parameters

ilist (List[str]) – the list of input sentences.

Returns

List[str] – the list of output sentences.