Add. Task introduction

pull/2/head
benjas 5 years ago
parent df426db9f0
commit 87cf212f4f

@ -1,5 +1,7 @@
### 第三章——基于BERT的中文情感分析实战
#### 任务介绍
对中文进行分类demo分成0/1/2
![1610163467782](assets/1610163467782.png)
@ -11,3 +13,29 @@
![1610164248560](assets/1610164248560.png)
> vocab.txt里把常用的中文基本覆盖了
#### 读取处理自己的数据集
~~~python
class DataProcessor(object):
"""Base class for data converters for sequence classification data sets."""
def get_train_examples(self, data_dir):
"""Gets a collection of `InputExample`s for the train set."""
raise NotImplementedError()
def get_dev_examples(self, data_dir):
"""Gets a collection of `InputExample`s for the dev set."""
raise NotImplementedError()
def get_test_examples(self, data_dir):
"""Gets a collection of `InputExample`s for prediction."""
raise NotImplementedError()
def get_labels(self):
"""Gets the list of labels for this data set."""
raise NotImplementedError()
~~~

Loading…
Cancel
Save