ticoAg commited on
Commit
a0f785c
·
verified ·
1 Parent(s): b8c6630

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +29 -0
README.md CHANGED
@@ -30,4 +30,33 @@ dataset_info:
30
  num_examples: 346320
31
  download_size: 66721235
32
  dataset_size: 100641630
 
 
 
 
 
 
33
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  num_examples: 346320
31
  download_size: 66721235
32
  dataset_size: 100641630
33
+ language:
34
+ - zh
35
+ tags:
36
+ - poem
37
+ size_categories:
38
+ - 100K<n<1M
39
  ---
40
+
41
+ # 数据格式定义
42
+ ```python
43
+ from pydantic import BaseModel, Field
44
+
45
+ class PoemValidator(BaseModel):
46
+ title: str = Field(..., description="诗名")
47
+ author: str = Field(..., description="作者")
48
+ dynasty: str = Field(..., description="朝代")
49
+ theme: str = Field(..., description="主题")
50
+ section: str = Field(..., description="节名")
51
+ content: Union[list[dict[str, Union[str, list[str]]]]] = Field(..., description="诗内容")
52
+ appreciation: str = Field(..., description="赏析")
53
+ rhythmic: str = Field(..., description="韵律")
54
+ tags: list[str] = Field(..., description="标签")
55
+ ```
56
+
57
+ # 加载数据集
58
+ ```python
59
+ from datasets import load_dataset
60
+
61
+ ds = load_dataset("ticoAg/cotinus-poem")
62
+ ```