'return size of a split, either number of sentences or number of images'

def getSplitSize(self, split, ofwhat='sentences'):

    if (ofwhat == 'sentences'):
        return sum((len(img['sentences']) for img in self.split[split]))
    else:
        return len(self.split[split])
