def batch(self):
    from utils.processing.sample_tweets import SampleGenerator
    parser = ArgParseDefault(description='Generate new batch for labelling. As a result a new csv will be created in `data/2_sampled/batch_{batch_id}/`')
    parser.add_argument('-N', '--num_tweets', type=int, default=None, help='The number of tweets to be generated in new batch')
    parser.add_argument('-b', '--batch', type=int, default=None, help='The batch id to be generated, default: Automatically find next batch')
    parser.add_argument('--ignore-previous', dest='ignore_previous', action='store_true', default=False, help='Also sample tweets from old batches which were not annotated')
    parser.add_argument('--stats-only', dest='stats_only', action='store_true', default=False, help='Show stats only')
    args = parser.parse_args(sys.argv[2:])
    s = SampleGenerator()
    if args.stats_only:
        s.stats(ignore_previous=args.ignore_previous)
    else:
        s.generate_batch(num_tweets=args.num_tweets, batch_id=args.batch, ignore_previous=args.ignore_previous)
def batch(self):
    from utils.processing.sample_tweets import SampleGenerator
    parser = ArgParseDefault(description='Generate new batch for labelling. As a result a new csv will be created in `data/2_sampled/batch_{batch_id}/`')
    parser.add_argument('-N', '--num_tweets', type=int, default=None, help='The number of tweets to be generated in new batch')
    parser.add_argument('-b', '--batch', type=int, default=None, help='The batch id to be generated, default: Automatically find next batch')
    parser.add_argument('--ignore-previous', dest='ignore_previous', action='store_true', default=False, help='Also sample tweets from old batches which were not annotated')
    parser.add_argument('--stats-only', dest='stats_only', action='store_true', default=False, help='Show stats only')
    args = parser.parse_args(sys.argv[2:])
    s = SampleGenerator()
    if args.stats_only:
        s.stats(ignore_previous=args.ignore_previous)
    else:
        s.generate_batch(num_tweets=args.num_tweets, batch_id=args.batch, ignore_previous=args.ignore_previous)