|
8 | 8 | * are met: |
9 | 9 | * |
10 | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | | - * notice, this list of conditions and the following disclaimer. |
| 11 | + * notice, this list of conditions and the following disclaimer. |
12 | 12 | * |
13 | 13 | * 2. Redistributions in binary form must reproduce the above copyright |
14 | 14 | * notice, this list of conditions and the following disclaimer in |
15 | 15 | * the documentation and/or other materials provided with the |
16 | 16 | * distribution. |
17 | 17 | * |
18 | | - * This work was supported in part by funding from the Defense Advanced |
19 | | - * Research Projects Agency and the National Science Foundation of the |
| 18 | + * This work was supported in part by funding from the Defense Advanced |
| 19 | + * Research Projects Agency and the National Science Foundation of the |
20 | 20 | * United States of America, and the CMU Sphinx Speech Consortium. |
21 | 21 | * |
22 | | - * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND |
23 | | - * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 22 | + * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND |
| 23 | + * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
24 | 24 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
25 | 25 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY |
26 | 26 | * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
27 | | - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
28 | | - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
29 | | - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
30 | | - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
31 | | - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 27 | + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 28 | + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 29 | + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 30 | + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 31 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
32 | 32 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
33 | 33 | * |
34 | 34 | * ==================================================================== |
@@ -59,9 +59,9 @@ static uint32 |
59 | 59 | base_size(uint32 entries, uint32 max_vocab, uint8 remaining_bits) |
60 | 60 | { |
61 | 61 | uint8 total_bits = bitarr_required_bits(max_vocab) + remaining_bits; |
62 | | - /* Extra entry for next pointer at the end. |
| 62 | + /* Extra entry for next pointer at the end. |
63 | 63 | * +7 then / 8 to round up bits and convert to bytes |
64 | | - * +sizeof(uint64) so that ReadInt57 etc don't go segfault. |
| 64 | + * +sizeof(uint64) so that ReadInt57 etc don't go segfault. |
65 | 65 | * Note that this waste is O(order), not O(number of ngrams).*/ |
66 | 66 | return ((1 + entries) * total_bits + 7) / 8 + sizeof(uint64); |
67 | 67 | } |
@@ -192,7 +192,7 @@ lm_trie_fix_counts(ngram_raw_t ** raw_ngrams, uint32 * counts, |
192 | 192 | memcpy(fixed_counts, counts, order * sizeof(*fixed_counts)); |
193 | 193 | for (i = 2; i <= order; i++) { |
194 | 194 | ngram_raw_t *tmp_ngram; |
195 | | - |
| 195 | + |
196 | 196 | if (counts[i - 1] <= 0) |
197 | 197 | continue; |
198 | 198 |
|
@@ -270,7 +270,7 @@ recursive_insert(lm_trie_t * trie, ngram_raw_t ** raw_ngrams, |
270 | 270 | (uint32 *) ckd_calloc(order - 1, sizeof(*raw_ngrams_ptr)); |
271 | 271 | for (i = 2; i <= order; ++i) { |
272 | 272 | ngram_raw_t *tmp_ngram; |
273 | | - |
| 273 | + |
274 | 274 | if (counts[i - 1] <= 0) |
275 | 275 | continue; |
276 | 276 |
|
@@ -517,7 +517,7 @@ lm_trie_build(lm_trie_t * trie, ngram_raw_t ** raw_ngrams, uint32 * counts, uint |
517 | 517 |
|
518 | 518 | lm_trie_fix_counts(raw_ngrams, counts, out_counts, order); |
519 | 519 | lm_trie_alloc_ngram(trie, out_counts, order); |
520 | | - |
| 520 | + |
521 | 521 | if (order > 1) |
522 | 522 | E_INFO("Training quantizer\n"); |
523 | 523 | for (i = 2; i < order; i++) { |
|
0 commit comments