((lp0
S'#!/usr/bin/env python'
p1
aS"strings=['hey','guys','i','am','a','string']"
p2
aS'parameter_list=[[strings]]'
p3
aS'def features_string_char_modular (strings):'
p4
aS'\tfrom modshogun import StringCharFeatures, RAWBYTE'
p5
aS'\tfrom numpy import array'
p6
aS'\t#create string features'
p7
aS'\tf=StringCharFeatures(strings, RAWBYTE)'
p8
aS'\t#and output several stats'
p9
aS'\t#print("max string length", f.get_max_vector_length())'
p10
aS'\t#print("number of strings", f.get_num_vectors())'
p11
aS'\t#print("length of first string", f.get_vector_length(0))'
p12
aS'\t#print("string[5]", \'\'.join(f.get_feature_vector(5)))'
p13
aS'\t#print("strings", f.get_features())'
p14
aS'\t#replace string 0'
p15
aS"\tf.set_feature_vector(array(['t','e','s','t']), 0)"
p16
aS'\t#print("strings", f.get_features())'
p17
aS'\treturn f.get_features(), f'
p18
aS"if __name__=='__main__':"
p19
aS"\tprint('StringCharFeatures')"
p20
aS'\tfeatures_string_char_modular(*parameter_list[0])'
p21
acmodshogun
_sg_reconstructor
p22
(cmodshogun
StringCharFeatures
p23
c__builtin__
object
p24
Ntp25
Rp26
(I01
S'<<_SHOGUN_SERIALIZABLE_ASCII_FILE_V_00_>>\nversion_parameter int32 1\nproperties uint64 0\ncache_size int32 0\npreproc SGSerializable* DynamicObjectArray [\nversion_parameter int32 1\narray Vector<SGSerializable*> 0 ()\nnum_elements int32 0\nresize_granularity int32 128\nuse_sg_malloc bool t\nfree_array bool t\n]\npreprocessed SGSerializable* DynamicArray bool [\nversion_parameter int32 1\narray Vector<bool> 0 ()\nnum_elements int32 0\nresize_granularity int32 128\nuse_sg_malloc bool t\nfree_array bool t\n]\nsubset_stack SGSerializable* SubsetStack [\nversion_parameter int32 1\nactive_subset SGSerializable* null []\nactive_subsets_stack SGSerializable* DynamicObjectArray [\nversion_parameter int32 1\narray Vector<SGSerializable*> 0 ()\nnum_elements int32 0\nresize_granularity int32 128\nuse_sg_malloc bool t\nfree_array bool t\n]\n]\nalphabet SGSerializable* Alphabet [\nversion_parameter int32 1\nalphabet int32 7\nnum_symbols int32 256\nnum_bits int32 8\n]\nfeatures Vector<String<char>> 21 ({21 [{35}{33}{47}{117}{115}{114}{47}{98}{105}{110}{47}{101}{110}{118}{32}{112}{121}{116}{104}{111}{110}]}{44 [{115}{116}{114}{105}{110}{103}{115}{61}{91}{39}{104}{101}{121}{39}{44}{39}{103}{117}{121}{115}{39}{44}{39}{105}{39}{44}{39}{97}{109}{39}{44}{39}{97}{39}{44}{39}{115}{116}{114}{105}{110}{103}{39}{93}]}{26 [{112}{97}{114}{97}{109}{101}{116}{101}{114}{95}{108}{105}{115}{116}{61}{91}{91}{115}{116}{114}{105}{110}{103}{115}{93}{93}]}{43 [{100}{101}{102}{32}{102}{101}{97}{116}{117}{114}{101}{115}{95}{115}{116}{114}{105}{110}{103}{95}{99}{104}{97}{114}{95}{109}{111}{100}{117}{108}{97}{114}{32}{40}{115}{116}{114}{105}{110}{103}{115}{41}{58}]}{50 [{9}{102}{114}{111}{109}{32}{109}{111}{100}{115}{104}{111}{103}{117}{110}{32}{105}{109}{112}{111}{114}{116}{32}{83}{116}{114}{105}{110}{103}{67}{104}{97}{114}{70}{101}{97}{116}{117}{114}{101}{115}{44}{32}{82}{65}{87}{66}{89}{84}{69}]}{24 [{9}{102}{114}{111}{109}{32}{110}{117}{109}{112}{121}{32}{105}{109}{112}{111}{114}{116}{32}{97}{114}{114}{97}{121}]}{24 [{9}{35}{99}{114}{101}{97}{116}{101}{32}{115}{116}{114}{105}{110}{103}{32}{102}{101}{97}{116}{117}{114}{101}{115}]}{39 [{9}{102}{61}{83}{116}{114}{105}{110}{103}{67}{104}{97}{114}{70}{101}{97}{116}{117}{114}{101}{115}{40}{115}{116}{114}{105}{110}{103}{115}{44}{32}{82}{65}{87}{66}{89}{84}{69}{41}]}{26 [{9}{35}{97}{110}{100}{32}{111}{117}{116}{112}{117}{116}{32}{115}{101}{118}{101}{114}{97}{108}{32}{115}{116}{97}{116}{115}]}{55 [{9}{35}{112}{114}{105}{110}{116}{40}{34}{109}{97}{120}{32}{115}{116}{114}{105}{110}{103}{32}{108}{101}{110}{103}{116}{104}{34}{44}{32}{102}{46}{103}{101}{116}{95}{109}{97}{120}{95}{118}{101}{99}{116}{111}{114}{95}{108}{101}{110}{103}{116}{104}{40}{41}{41}]}{49 [{9}{35}{112}{114}{105}{110}{116}{40}{34}{110}{117}{109}{98}{101}{114}{32}{111}{102}{32}{115}{116}{114}{105}{110}{103}{115}{34}{44}{32}{102}{46}{103}{101}{116}{95}{110}{117}{109}{95}{118}{101}{99}{116}{111}{114}{115}{40}{41}{41}]}{57 [{9}{35}{112}{114}{105}{110}{116}{40}{34}{108}{101}{110}{103}{116}{104}{32}{111}{102}{32}{102}{105}{114}{115}{116}{32}{115}{116}{114}{105}{110}{103}{34}{44}{32}{102}{46}{103}{101}{116}{95}{118}{101}{99}{116}{111}{114}{95}{108}{101}{110}{103}{116}{104}{40}{48}{41}{41}]}{54 [{9}{35}{112}{114}{105}{110}{116}{40}{34}{115}{116}{114}{105}{110}{103}{91}{53}{93}{34}{44}{32}{39}{39}{46}{106}{111}{105}{110}{40}{102}{46}{103}{101}{116}{95}{102}{101}{97}{116}{117}{114}{101}{95}{118}{101}{99}{116}{111}{114}{40}{53}{41}{41}{41}]}{36 [{9}{35}{112}{114}{105}{110}{116}{40}{34}{115}{116}{114}{105}{110}{103}{115}{34}{44}{32}{102}{46}{103}{101}{116}{95}{102}{101}{97}{116}{117}{114}{101}{115}{40}{41}{41}]}{18 [{9}{35}{114}{101}{112}{108}{97}{99}{101}{32}{115}{116}{114}{105}{110}{103}{32}{48}]}{50 [{9}{102}{46}{115}{101}{116}{95}{102}{101}{97}{116}{117}{114}{101}{95}{118}{101}{99}{116}{111}{114}{40}{97}{114}{114}{97}{121}{40}{91}{39}{116}{39}{44}{39}{101}{39}{44}{39}{115}{39}{44}{39}{116}{39}{93}{41}{44}{32}{48}{41}]}{36 [{9}{35}{112}{114}{105}{110}{116}{40}{34}{115}{116}{114}{105}{110}{103}{115}{34}{44}{32}{102}{46}{103}{101}{116}{95}{102}{101}{97}{116}{117}{114}{101}{115}{40}{41}{41}]}{27 [{9}{114}{101}{116}{117}{114}{110}{32}{102}{46}{103}{101}{116}{95}{102}{101}{97}{116}{117}{114}{101}{115}{40}{41}{44}{32}{102}]}{24 [{105}{102}{32}{95}{95}{110}{97}{109}{101}{95}{95}{61}{61}{39}{95}{95}{109}{97}{105}{110}{95}{95}{39}{58}]}{28 [{9}{112}{114}{105}{110}{116}{40}{39}{83}{116}{114}{105}{110}{103}{67}{104}{97}{114}{70}{101}{97}{116}{117}{114}{101}{115}{39}{41}]}{49 [{9}{102}{101}{97}{116}{117}{114}{101}{115}{95}{115}{116}{114}{105}{110}{103}{95}{99}{104}{97}{114}{95}{109}{111}{100}{117}{108}{97}{114}{40}{42}{112}{97}{114}{97}{109}{101}{116}{101}{114}{95}{108}{105}{115}{116}{91}{48}{93}{41}]})\nsingle_string Vector<char> 0 ()\nmax_string_length int32 57\nnum_symbols floatmax 256\noriginal_num_symbols floatmax 256\norder int32 0\npreprocess_on_get bool f\nmask_table Vector<char> 0 ()\n'
p27
tp28
btp29
.