mrzjy commited on
Commit
7d870a4
1 Parent(s): 3b45046

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -1
README.md CHANGED
@@ -14,7 +14,7 @@ size_categories:
14
 
15
  # Anime Manga Characters Dataset
16
 
17
- This dataset is a metafile containing information about anime and manga characters sourced from various fandom wikis. Each entry represents a character along with its associated metadata. The dataset has been deduplicated based on the `url` field to avoid redundancy, although a single character may still have multiple associated URLs.
18
 
19
  ## Potential Applications
20
 
@@ -23,6 +23,37 @@ This dataset is a metafile containing information about anime and manga characte
23
  - **Image Captioning**: Pair images of characters with textual metadata for image captioning tasks.
24
  - **Text-to-Image Generation**: Generate detailed images of characters based on descriptive metadata.
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  ## Acknowledgments
27
 
28
  This dataset owes its existence to the passionate contributions of anime and manga fans worldwide who curate and maintain the fandom wikis.
 
14
 
15
  # Anime Manga Characters Dataset
16
 
17
+ This dataset is a metafile containing information about 247,034 anime and manga characters sourced from various fandom wikis. Each entry represents a character along with its associated metadata. The dataset has been deduplicated based on the `url` field to avoid redundancy, although a single character may still have multiple associated URLs.
18
 
19
  ## Potential Applications
20
 
 
23
  - **Image Captioning**: Pair images of characters with textual metadata for image captioning tasks.
24
  - **Text-to-Image Generation**: Generate detailed images of characters based on descriptive metadata.
25
 
26
+ ## Dataset Construction
27
+
28
+ The dataset includes the following meta fields:
29
+
30
+ - **`title`**: The name of the character, corresponding to the title of the fandom wiki page.
31
+ - **`site_name`**: The title of the anime or manga, representing the source site name of the fandom wiki.
32
+ - **`url`**: The URL of the character's wiki page.
33
+ - **`description`**: A brief summary of the character's wiki page (truncated, not the full content).
34
+ - **`image`**: The URL of a representative image associated with the character.
35
+
36
+ The pseudo code for getting metadata from each fandom wiki html:
37
+
38
+ ```python
39
+ def get_metadata(self, html):
40
+ soup = BeautifulSoup(html, 'lxml')
41
+ metadata = {"title": "", "site_name": "", "url": "", "description": "", "image": ""}
42
+ if meta := soup.find("meta", {"property": "og:site_name"}):
43
+ metadata["site_name"] = meta["content"]
44
+ if meta := soup.find("meta", {"property": "og:title"}):
45
+ metadata["title"] = meta["content"]
46
+ if meta := soup.find("meta", {"property": "og:url"}):
47
+ metadata["url"] = meta["content"]
48
+ if meta := soup.find("meta", {"property": "og:description"}):
49
+ metadata["description"] = meta["content"]
50
+ if meta := soup.find("meta", {"property": "og:image"}):
51
+ metadata["image"] = meta["content"]
52
+ return metadata
53
+ ```
54
+
55
+ The dataset has been deduplicated based on the `url` field to avoid redundancy.
56
+
57
  ## Acknowledgments
58
 
59
  This dataset owes its existence to the passionate contributions of anime and manga fans worldwide who curate and maintain the fandom wikis.