class_docstr: 处理 **Weibo** 的 **BER** 的数据，处理之后 :class:`~fastNLP.core.DataSet` 中的内容如下：
  
  .. csv-table::
     :header: "raw_chars", "chars", "target", "seq_len"
  
     "['老', '百', '姓']", "[4, 3, 3]", "[38, 39, 40]", 3
     "['心']", "[0]", "[41]", 1
     "[...]", "[...]", "[...]", .
  
  ``raw_chars`` 列为 :class:`List` [ :class:`str` ], 是未转换的原始数据； ``chars`` 列为 :class:`List` [ :class:`int` ]，
  是转换为 index 的输入数据； ``target`` 列是 :class:`List` [ :class:`int` ] ，是转换为 index 的 target。返回的 :class:`~fastNLP.core.DataSet` 
  中被设置为 input 有 ``chars`` , ``target``, ``seq_len``；target 有 ``target`` 。
  
  :param encoding_type: ``target`` 列使用什么类型的 encoding 方式，支持 ``['bioes', 'bio']`` 两种。
  :param bigrams: 是否增加一列 ``bigrams`` 。 ``bigrams`` 会对原文进行如下转化： ``['复', '旦', '大', '学', ...]->["复旦", "旦大", ...]`` 。如果
      设置为 ``True`` ，返回的 :class:`~fastNLP.core.DataSet` 将有一列名为 ``bigrams`` ，且已经转换为了 index 并设置为 input，对应的词表可以通过
      ``data_bundle.get_vocab('bigrams')`` 获取。
  :param trigrams: 是否增加一列 ``trigrams`` 。 ``trigrams`` 会对原文进行如下转化 ``['复', '旦', '大', '学', ...]->["复旦大", "旦大学", ...]`` 。
      如果设置为 ``True`` ，返回的 :class:`~fastNLP.core.DataSet` 将有一列名为 ``trigrams`` ，且已经转换为了 index 并设置为 input，对应的词表可以通过
      ``data_bundle.get_vocab('trigrams')`` 获取。
  :param num_proc: 处理数据时使用的进程数目。
class_docstr_tok: ["\u5904\u7406","*","*","Weibo","*","*","\u7684","*","*","BER","*","*","\u7684\u6570\u636e\uff0c\u5904\u7406\u4e4b\u540e",":","class",":","`","~fastNLP.core.DataSet","`","\u4e2d\u7684\u5185\u5bb9\u5982\u4e0b\uff1a","..","csv-table",":",":",":","header",":","``","raw_chars","''",",","``","chars","''",",","``","target","''",",","``","seq_len","''","``","[","'","\u8001","'",",","'","\u767e","'",",","'","\u59d3","'","]","''",",","``","[","4",",","3",",","3","]","''",",","``","[","38",",","39",",","40","]","''",",","3","``","[","'","\u5fc3","'","]","''",",","``","[","0","]","''",",","``","[","41","]","''",",","1","``","[","...","]","''",",","``","[","...","]","''",",","``","[","...","]","''",",",".","``","raw_chars","``","\u5217\u4e3a",":","class",":","`","List","`","[",":","class",":","`","str","`","]",",","\u662f\u672a\u8f6c\u6362\u7684\u539f\u59cb\u6570\u636e\uff1b","``","chars","``","\u5217\u4e3a",":","class",":","`","List","`","[",":","class",":","`","int","`","]","\uff0c","\u662f\u8f6c\u6362\u4e3a","index","\u7684\u8f93\u5165\u6570\u636e\uff1b","``","target","``","\u5217\u662f",":","class",":","`","List","`","[",":","class",":","`","int","`","]","\uff0c\u662f\u8f6c\u6362\u4e3a","index","\u7684","target\u3002\u8fd4\u56de\u7684",":","class",":","`","~fastNLP.core.DataSet","`","\u4e2d\u88ab\u8bbe\u7f6e\u4e3a","input","\u6709","``","chars","``",",","``","target","``",",","``","seq_len","``","\uff1btarget","\u6709","``","target","``","\u3002",":","param","encoding_type",":","``","target","``","\u5217\u4f7f\u7528\u4ec0\u4e48\u7c7b\u578b\u7684","encoding","\u65b9\u5f0f\uff0c\u652f\u6301","``","[","'bioes","'",",","'bio","'","]","``","\u4e24\u79cd\u3002",":","param","bigrams",":","\u662f\u5426\u589e\u52a0\u4e00\u5217","``","bigrams","``","\u3002","``","bigrams","``","\u4f1a\u5bf9\u539f\u6587\u8fdb\u884c\u5982\u4e0b\u8f6c\u5316\uff1a","``","[","'","\u590d","'",",","'","\u65e6","'",",","'","\u5927","'",",","'","\u5b66","'",",","...","]","-",">","[","``","\u590d\u65e6","''",",","``","\u65e6\u5927","''",",","...","]","``","\u3002\u5982\u679c","\u8bbe\u7f6e\u4e3a","``","True","``","\uff0c\u8fd4\u56de\u7684",":","class",":","`","~fastNLP.core.DataSet","`","\u5c06\u6709\u4e00\u5217\u540d\u4e3a","``","bigrams","``","\uff0c\u4e14\u5df2\u7ecf\u8f6c\u6362\u4e3a\u4e86","index","\u5e76\u8bbe\u7f6e\u4e3a","input\uff0c\u5bf9\u5e94\u7684\u8bcd\u8868\u53ef\u4ee5\u901a\u8fc7","``","data_bundle.get_vocab","(","'bigrams","'",")","``","\u83b7\u53d6\u3002",":","param","trigrams",":","\u662f\u5426\u589e\u52a0\u4e00\u5217","``","trigrams","``","\u3002","``","trigrams","``","\u4f1a\u5bf9\u539f\u6587\u8fdb\u884c\u5982\u4e0b\u8f6c\u5316","``","[","'","\u590d","'",",","'","\u65e6","'",",","'","\u5927","'",",","'","\u5b66","'",",","...","]","-",">","[","``","\u590d\u65e6\u5927","''",",","``","\u65e6\u5927\u5b66","''",",","...","]","``","\u3002","\u5982\u679c\u8bbe\u7f6e\u4e3a","``","True","``","\uff0c\u8fd4\u56de\u7684",":","class",":","`","~fastNLP.core.DataSet","`","\u5c06\u6709\u4e00\u5217\u540d\u4e3a","``","trigrams","``","\uff0c\u4e14\u5df2\u7ecf\u8f6c\u6362\u4e3a\u4e86","index","\u5e76\u8bbe\u7f6e\u4e3a","input\uff0c\u5bf9\u5e94\u7684\u8bcd\u8868\u53ef\u4ee5\u901a\u8fc7","``","data_bundle.get_vocab","(","'trigrams","'",")","``","\u83b7\u53d6\u3002",":","param","num_proc",":","\u5904\u7406\u6570\u636e\u65f6\u4f7f\u7528\u7684\u8fdb\u7a0b\u6570\u76ee\u3002"]
docstr: 传入文件路径，生成处理好的 :class:`~fastNLP.io.DataBundle` 对象。``paths`` 支持的路径形式可以参考 :meth:`fastNLP.io.Loader.load`
  
  :param paths:
  :return:
docstr_tok: ["\u4f20\u5165\u6587\u4ef6\u8def\u5f84\uff0c\u751f\u6210\u5904\u7406\u597d\u7684",":","class",":","`","~fastNLP.io.DataBundle","`","\u5bf9\u8c61\u3002","``","paths","``","\u652f\u6301\u7684\u8def\u5f84\u5f62\u5f0f\u53ef\u4ee5\u53c2\u8003",":","meth",":","`","fastNLP.io.Loader.load","`",":","param","paths",":",":","return",":"]
code: def process_from_file(self, paths=None) -> DataBundle:
      r"""
      传入文件路径，生成处理好的 :class:`~fastNLP.io.DataBundle` 对象。``paths`` 支持的路径形式可以参考 :meth:`fastNLP.io.Loader.load`
  
      :param paths:
      :return:
      """
      data_bundle = WeiboNERLoader().load(paths)
      return self.process(data_bundle)
  
imports: from .pipe import Pipe
  from .utils import _add_chars_field
  from .utils import _indexize, _add_words_field
  from .utils import iob2, iob2bioes
  from fastNLP.io.data_bundle import DataBundle
  from ..loader.conll import Conll2003NERLoader, OntoNotesNERLoader
  from ..loader.conll import PeopleDailyNERLoader, WeiboNERLoader, MsraNERLoader, ConllLoader
  from ...core.vocabulary import Vocabulary
label_desc: Use image node_id 1 for calling the WeiboNERPipe obj's underlying member method code with example usage: obj.process_from_file(paths) and returns: self