def __init__( self, validation_combinations=(('square', 'red', 'solid'), ('triangle', 'green', 'solid'), ('circle', 'blue', 'solid')), test_combinations=(('rectangle', 'yellow', 'solid'), ('cross', 'magenta', 'solid'), ('ellipse', 'cyan', 'solid')), caption_size=6, vocabulary=('.', 'a', 'an', 'blue', 'circle', 'cross', 'cyan', 'ellipse', 'gray', 'green', 'is', 'magenta', 'pentagon', 'rectangle', 'red', 'semicircle', 'shape', 'square', 'there', 'triangle', 'yellow'), language=None, number_texts=10, ): world_generator = RandomAttributesGenerator( entity_counts=[1], validation_combinations=validation_combinations, test_combinations=test_combinations, max_provoke_collision_rate=0.0, collision_tolerance=0.0, boundary_tolerance=0.0) world_generator.world_size = 128 world_captioner = RegularTypeCaptioner(existing_attribute_rate=0.0) super(OneshapeSimpleTextselect, self).__init__(world_generator=world_generator, world_captioner=world_captioner, caption_size=caption_size, vocabulary=vocabulary, language=language, number_texts=number_texts)
def __init__(self, entity_counts=(2, 3, 4, 5, 6, 7, 8), train_entity_counts=(2, 3, 4, 5, 7), validation_entity_counts=(6, ), test_entity_counts=(8, ), validation_combinations=(('square', 'red', 'solid'), ('triangle', 'green', 'solid'), ('circle', 'blue', 'solid')), test_combinations=(('rectangle', 'yellow', 'solid'), ('cross', 'magenta', 'solid'), ('ellipse', 'cyan', 'solid')), caption_size=8, vocabulary=('.', 'a', 'an', 'blue', 'circle', 'cross', 'cyan', 'ellipse', 'gray', 'green', 'is', 'magenta', 'pentagon', 'rectangle', 'red', 'semicircle', 'shape', 'square', 'there', 'triangle', 'yellow'), language=None, number_texts=10): world_generator = RandomAttributesGenerator( entity_counts=entity_counts, train_entity_counts=train_entity_counts, validation_entity_counts=validation_entity_counts, test_entity_counts=test_entity_counts, validation_combinations=validation_combinations, test_combinations=test_combinations) world_generator.world_size = 128 world_captioner = CaptionerMixer(captioners=( RegularTypeCaptioner(), ExistentialCaptioner(restrictor_captioner=RegularTypeCaptioner( hypernym_rate=1.0, logical_tautology_rate=1.0), body_captioner=AttributeTypeRelationCaptioner( attribute_type_captioner=CaptionerMixer( captioners=( RegularAttributeCaptioner(), RegularTypeCaptioner())))))) super(MultishapeTextselect, self).__init__(world_generator=world_generator, world_captioner=world_captioner, caption_size=caption_size, vocabulary=vocabulary, language=language, number_texts=number_texts)