I am creating my first dataset using Hugging Face, and I have a problem because I have a dataset with a field that contains document structure in a tree-like fashion. To illustrate that, I have created this artificial dataset sample:
{
"id": 2,
"created": "2012-10-09",
"hierarchy": {
"title": "Hugging Face Datasets Manual",
"content": [
{
"title": "Get started",
"content": [
{"title": "🤗 Datasets", "content": (123, "e.g. some tuple")},
{"title": "Quickstart", "content": (123, "e.g. some tuple")},
{"title": "Installation", "content": (123, "e.g. some tuple")}
]
},
{
"title": "Tutorials", "content": (123, "e.g. some tuple")
},
...
]
}
}
My question is, how can I define a tree structure in the loading script _info method? Ideally, I would like to represent the tree with my own class. Should I define my own FeatureType somehow?