ckipnlp.ws package¶
-
class
ckipnlp.ws.
CkipWs
(*, logger=False, inifile=None, **options)[source]¶ Bases:
object
The CKIP word segmentation driver.
Parameters: - logger (bool) – enable logger.
- inifile (str) – the path to the INI file.
- options – the options, see
ckipnlp.util.ini.create_ws_ini()
.
-
apply
(text)[source]¶ Segment a sentence.
Parameters: text (str) – the input sentence. Returns: str – the output sentence. Notes
One may also call this method as
__call__()
.