word_segmentation#

class SegJiebaTask(task, model, user_dict=None, **kwargs)[source]#

Bases: Task

Word Segmentation task for the raw text. :param task: The name of task. :type task: string :param model: The model name in the task. :type model: string :param user_dict: The user-defined dictionary, default to None. :type user_dict: string :param kwargs: Additional keyword arguments passed along to the specific task. :type kwargs: dict, optional

class SegLACTask(task, model, **kwargs)[source]#

Bases: LacTask

Segement the sentences to the words using LAC mode. :param task: The name of task. :type task: string :param model: The model name in the task. :type model: string :param kwargs: Additional keyword arguments passed along to the specific task. :type kwargs: dict, optional

class SegWordTagTask(model, task, **kwargs)[source]#

Bases: NERWordTagTask

Segement the sentences to the words using WordTag model. :param task: The name of task. :type task: string :param model: The model name in the task. :type model: string :param kwargs: Additional keyword arguments passed along to the specific task. :type kwargs: dict, optional