1
$\begingroup$

I have a json array file that i need to create a smaller sample of for testing purposes. A sample of the file looks like:

sample_json = {
  "targets": [
    {
      "start": 40,
      "end": 73,
      "item": "trust:team_member",
      "lookup": "the cathedral"
    },
    {
      "start": 40,
      "end": 74,
      "item": "contact",
      "lookup": "some text"
    }
  ]},{
    "targets": [
    {
      "start": 40,
      "end": 73,
      "item": "trust:team_member",
      "lookup": "the cats"
    },
    {
      "start": 40,
      "end": 74,
      "item": "music",
      "lookup": "some other music note"
    }
  ]  
    ,
  "Options": {
    "Tags": {
      "test:image": [
        "test 1",
        "test 3",
        "test 4",
      ],
        "test:text": [
        "test 1",
        "test 3",
        "test 4",

      ]
    }
  }
}

I need to carry out Multi-label stratification based on

sample_json['options']['Tags']

I haven't done this before so would appreciate any help or guidance?

$\endgroup$