@@ -102,7 +102,7 @@ def zipf_distribution(nbr_symbols, alpha):
102102 Usually for modelling natural text distribution is in
103103 the range [1.1-1.6].
104104
105- Return :
105+ Returns :
106106 distr_map: list of float, Zipf's distribution over nbr_symbols.
107107
108108 """
@@ -118,7 +118,7 @@ def zipf_random_sample(distr_map, sample_len):
118118 distr_map: list of float, Zipf's distribution over nbr_symbols.
119119 sample_len: integer, length of sequence to generate.
120120
121- Return :
121+ Returns :
122122 sample: list of integer, Zipf's random sample over nbr_symbols.
123123
124124 """
@@ -131,8 +131,8 @@ def zipf_random_sample(distr_map, sample_len):
131131 return [t + 1 if t > 0 else t + 2 for t in np .searchsorted (distr_map , u )]
132132
133133
134- def reverse_generator_nlplike (nbr_symbols , max_length , nbr_cases , \
135- scale_std_dev = 100 , alpha = 1.5 ):
134+ def reverse_generator_nlplike (nbr_symbols , max_length , nbr_cases ,
135+ scale_std_dev = 100 , alpha = 1.5 ):
136136 """Generator for the reversing nlp-like task on sequences of symbols.
137137
138138 The length of the sequence is drawn from a Gaussian(Normal) distribution
@@ -141,6 +141,7 @@ def reverse_generator_nlplike(nbr_symbols, max_length, nbr_cases, \
141141 nbr_cases sequences have been produced.
142142
143143 Args:
144+ nbr_symbols: integer, number of symbols.
144145 max_length: integer, maximum length of sequences to generate.
145146 nbr_cases: the number of cases to generate.
146147 scale_std_dev: float, Normal distribution's standard deviation scale factor
0 commit comments