ckipnlp.util.ini module¶
-
ckipnlp.util.ini.
create_ws_ini
(*, data2dir=None, lexfile=None, new_style_format=False, show_category=True, sentence_max_word_num=80, **options)[source]¶ Generate CKIP word segmentation config.
Parameters: - data2dir (str) – the path to the folder “Data2/”.
- lexfile (str) – the path to the user-defined lexicon file.
- new_style_format (bool) – split sentences by newline characters (“\n”) rather than punctuations.
- show_category (bool) – show part-of-speech tags.
- sentence_max_word_num (int) – maximum number of words per sentence.
-
ckipnlp.util.ini.
create_parser_ini
(*, wsinifile, ruledir=None, rdbdir=None, do_ws=True, do_parse=True, do_role=True, sentence_delim=',, ;。!?', **options)[source]¶ Generate CKIP parser config.
Parameters: - ruledir (str) – the path to “Rule/”.
- rdbdir (str) – the path to “RDB/”.
- do_ws (bool) – do word-segmentation.
- do_parse (bool) – do parsing.
- do_role (bool) – do role.
- sentence_delim (str) – the sentence delimiters.