1<?php
2
3
4/**
5 * Matches bible verse references
6 * No allowance for multiple verse references with only one book name!
7 */
8class SI_EntryVerse extends SI_Entry {
9
10    public $order   = 20;
11    public $type    = 'verse';
12    public $section = 2;
13
14    // first is for Dokuwiki syntax parser matching, second for internal lexing
15    public $regex = '(?:[123]\h?)?(?:[A-Z][a-zA-Z]+|Song of Solomon)\.?\h?1?[0-9]?[0-9]:\d{1,3}(?:[,-]\h?\d{1,3})*';
16    private $_regex = '`([123]\h?)?([A-Z][a-zA-Z]+|Song of Solomon)\.?\h?(1?[0-9]?[0-9]):(\d{1,3}([,-]\h?\d{1,3})*)`';
17
18
19    function __construct() {
20        // array of possible abbreviations (space separated)
21        $this->abbrs = file(DOKU_PLUGIN . 'subjectindex/plugins/bible_abbr.txt', FILE_IGNORE_NEW_LINES | FILE_TEXT);
22        // array of proper book names
23        $this->books = file(DOKU_PLUGIN . 'subjectindex/plugins/bible_books.txt', FILE_IGNORE_NEW_LINES | FILE_TEXT);
24        $this->verses = file(DOKU_PLUGIN . 'subjectindex/plugins/bible_verses.txt', FILE_IGNORE_NEW_LINES);
25        $this->book_index = $this->_book_index();
26    }
27
28
29    function match($text) {
30        $this->items = array();
31        $matches = array();
32        $matched = false;
33        $hits = preg_match_all($this->_regex, $text, $matches, PREG_SET_ORDER);
34        if ($hits > 0) {
35            foreach ($matches as $match) {
36                $num = trim($match[1]);
37                $name = trim($match[2]);
38                $abbr = $num . strtolower($name);
39                $book = (empty($num)) ? $name : $num . ' ' . $name;
40                $chp = $match[3];
41                $verse = $match[4];
42                // abbreviation match test
43                $hit = (preg_grep('/(^|\s)' . $abbr . '($|\s)/', $this->abbrs));
44                // try for a full book name match also if abbr fails
45                if (empty($hit)) {
46                    $hit = preg_grep('/(^|\s)' . $book . '($|\s)/', $this->books);
47                }
48                if ( ! empty($hit)) {
49                    $num = key($hit);   // line number in abbr list, used to keep books in correct order
50                    $book = $this->books[$num];
51                    $item = &$this->items[];
52
53                    $item['display'] = $book . ' ' . $chp . ':' . $verse;
54                    // add an ordinal to keep the book names in correct order
55                    $item['entry'] = $num . '.' . $book . '/' . $book . ' ' . $chp . ':/' . $verse;
56                    $item['section'] = $this->section;
57                    $item['type'] = $this->type;
58                    $item['star'] = false;  // always ignored!
59                    $item['title'] = $this->_get_verse($book, $chp, $verse);
60                    $matched = true;
61                }
62            }
63            return $matched;
64        }
65        return false;
66    }
67
68    /**
69     * Returns a bible verse
70     * @param string $book
71     * @param string $chapter
72     * @param string $verse
73     * @return string
74     */
75    private function _get_verse($book, $chapter, $verse) {
76        $result = '';
77        $book = strtolower($book);
78        $chapter = (int) $chapter;
79        $verse = (int) $verse;
80        if (isset($this->book_index[$book]) && isset($this->book_index[$book][$chapter])) {
81            $result = $this->verses[$this->book_index[$book][$chapter] + $verse];
82        }
83        return $result;
84    }
85
86
87    private function _book_index() {
88        $book_index = array();
89        $book_index['genesis'][1] = 0;
90        $book_index['genesis'][2] = 31;
91        $book_index['genesis'][3] = 56;
92        $book_index['genesis'][4] = 80;
93        $book_index['genesis'][5] = 106;
94        $book_index['genesis'][6] = 138;
95        $book_index['genesis'][7] = 160;
96        $book_index['genesis'][8] = 184;
97        $book_index['genesis'][9] = 206;
98        $book_index['genesis'][10] = 235;
99        $book_index['genesis'][11] = 267;
100        $book_index['genesis'][12] = 299;
101        $book_index['genesis'][13] = 319;
102        $book_index['genesis'][14] = 337;
103        $book_index['genesis'][15] = 361;
104        $book_index['genesis'][16] = 382;
105        $book_index['genesis'][17] = 398;
106        $book_index['genesis'][18] = 425;
107        $book_index['genesis'][19] = 458;
108        $book_index['genesis'][20] = 496;
109        $book_index['genesis'][21] = 514;
110        $book_index['genesis'][22] = 548;
111        $book_index['genesis'][23] = 572;
112        $book_index['genesis'][24] = 592;
113        $book_index['genesis'][25] = 659;
114        $book_index['genesis'][26] = 693;
115        $book_index['genesis'][27] = 728;
116        $book_index['genesis'][28] = 774;
117        $book_index['genesis'][29] = 796;
118        $book_index['genesis'][30] = 831;
119        $book_index['genesis'][31] = 874;
120        $book_index['genesis'][32] = 929;
121        $book_index['genesis'][33] = 961;
122        $book_index['genesis'][34] = 981;
123        $book_index['genesis'][35] = 1012;
124        $book_index['genesis'][36] = 1041;
125        $book_index['genesis'][37] = 1084;
126        $book_index['genesis'][38] = 1120;
127        $book_index['genesis'][39] = 1150;
128        $book_index['genesis'][40] = 1173;
129        $book_index['genesis'][41] = 1196;
130        $book_index['genesis'][42] = 1253;
131        $book_index['genesis'][43] = 1291;
132        $book_index['genesis'][44] = 1325;
133        $book_index['genesis'][45] = 1359;
134        $book_index['genesis'][46] = 1387;
135        $book_index['genesis'][47] = 1421;
136        $book_index['genesis'][48] = 1452;
137        $book_index['genesis'][49] = 1474;
138        $book_index['genesis'][50] = 1507;
139        $book_index['exodus'][1] = 1533;
140        $book_index['exodus'][2] = 1555;
141        $book_index['exodus'][3] = 1580;
142        $book_index['exodus'][4] = 1602;
143        $book_index['exodus'][5] = 1633;
144        $book_index['exodus'][6] = 1656;
145        $book_index['exodus'][7] = 1686;
146        $book_index['exodus'][8] = 1711;
147        $book_index['exodus'][9] = 1743;
148        $book_index['exodus'][10] = 1778;
149        $book_index['exodus'][11] = 1807;
150        $book_index['exodus'][12] = 1817;
151        $book_index['exodus'][13] = 1868;
152        $book_index['exodus'][14] = 1890;
153        $book_index['exodus'][15] = 1921;
154        $book_index['exodus'][16] = 1948;
155        $book_index['exodus'][17] = 1984;
156        $book_index['exodus'][18] = 2000;
157        $book_index['exodus'][19] = 2027;
158        $book_index['exodus'][20] = 2052;
159        $book_index['exodus'][21] = 2078;
160        $book_index['exodus'][22] = 2114;
161        $book_index['exodus'][23] = 2145;
162        $book_index['exodus'][24] = 2178;
163        $book_index['exodus'][25] = 2196;
164        $book_index['exodus'][26] = 2236;
165        $book_index['exodus'][27] = 2273;
166        $book_index['exodus'][28] = 2294;
167        $book_index['exodus'][29] = 2337;
168        $book_index['exodus'][30] = 2383;
169        $book_index['exodus'][31] = 2421;
170        $book_index['exodus'][32] = 2439;
171        $book_index['exodus'][33] = 2474;
172        $book_index['exodus'][34] = 2497;
173        $book_index['exodus'][35] = 2532;
174        $book_index['exodus'][36] = 2567;
175        $book_index['exodus'][37] = 2605;
176        $book_index['exodus'][38] = 2634;
177        $book_index['exodus'][39] = 2665;
178        $book_index['exodus'][40] = 2708;
179        $book_index['leviticus'][1] = 2746;
180        $book_index['leviticus'][2] = 2763;
181        $book_index['leviticus'][3] = 2779;
182        $book_index['leviticus'][4] = 2796;
183        $book_index['leviticus'][5] = 2831;
184        $book_index['leviticus'][6] = 2850;
185        $book_index['leviticus'][7] = 2880;
186        $book_index['leviticus'][8] = 2918;
187        $book_index['leviticus'][9] = 2954;
188        $book_index['leviticus'][10] = 2978;
189        $book_index['leviticus'][11] = 2998;
190        $book_index['leviticus'][12] = 3045;
191        $book_index['leviticus'][13] = 3053;
192        $book_index['leviticus'][14] = 3112;
193        $book_index['leviticus'][15] = 3169;
194        $book_index['leviticus'][16] = 3202;
195        $book_index['leviticus'][17] = 3236;
196        $book_index['leviticus'][18] = 3252;
197        $book_index['leviticus'][19] = 3282;
198        $book_index['leviticus'][20] = 3319;
199        $book_index['leviticus'][21] = 3346;
200        $book_index['leviticus'][22] = 3370;
201        $book_index['leviticus'][23] = 3403;
202        $book_index['leviticus'][24] = 3447;
203        $book_index['leviticus'][25] = 3470;
204        $book_index['leviticus'][26] = 3525;
205        $book_index['leviticus'][27] = 3571;
206        $book_index['numbers'][1] = 3605;
207        $book_index['numbers'][2] = 3659;
208        $book_index['numbers'][3] = 3693;
209        $book_index['numbers'][4] = 3744;
210        $book_index['numbers'][5] = 3793;
211        $book_index['numbers'][6] = 3824;
212        $book_index['numbers'][7] = 3851;
213        $book_index['numbers'][8] = 3940;
214        $book_index['numbers'][9] = 3966;
215        $book_index['numbers'][10] = 3989;
216        $book_index['numbers'][11] = 4025;
217        $book_index['numbers'][12] = 4060;
218        $book_index['numbers'][13] = 4076;
219        $book_index['numbers'][14] = 4109;
220        $book_index['numbers'][15] = 4154;
221        $book_index['numbers'][16] = 4195;
222        $book_index['numbers'][17] = 4245;
223        $book_index['numbers'][18] = 4258;
224        $book_index['numbers'][19] = 4290;
225        $book_index['numbers'][20] = 4312;
226        $book_index['numbers'][21] = 4341;
227        $book_index['numbers'][22] = 4376;
228        $book_index['numbers'][23] = 4417;
229        $book_index['numbers'][24] = 4447;
230        $book_index['numbers'][25] = 4472;
231        $book_index['numbers'][26] = 4490;
232        $book_index['numbers'][27] = 4555;
233        $book_index['numbers'][28] = 4578;
234        $book_index['numbers'][29] = 4609;
235        $book_index['numbers'][30] = 4649;
236        $book_index['numbers'][31] = 4665;
237        $book_index['numbers'][32] = 4719;
238        $book_index['numbers'][33] = 4761;
239        $book_index['numbers'][34] = 4817;
240        $book_index['numbers'][35] = 4846;
241        $book_index['numbers'][36] = 4880;
242        $book_index['deuteronomy'][1] = 4893;
243        $book_index['deuteronomy'][2] = 4939;
244        $book_index['deuteronomy'][3] = 4976;
245        $book_index['deuteronomy'][4] = 5005;
246        $book_index['deuteronomy'][5] = 5054;
247        $book_index['deuteronomy'][6] = 5087;
248        $book_index['deuteronomy'][7] = 5112;
249        $book_index['deuteronomy'][8] = 5138;
250        $book_index['deuteronomy'][9] = 5158;
251        $book_index['deuteronomy'][10] = 5187;
252        $book_index['deuteronomy'][11] = 5209;
253        $book_index['deuteronomy'][12] = 5241;
254        $book_index['deuteronomy'][13] = 5273;
255        $book_index['deuteronomy'][14] = 5291;
256        $book_index['deuteronomy'][15] = 5320;
257        $book_index['deuteronomy'][16] = 5343;
258        $book_index['deuteronomy'][17] = 5365;
259        $book_index['deuteronomy'][18] = 5385;
260        $book_index['deuteronomy'][19] = 5407;
261        $book_index['deuteronomy'][20] = 5428;
262        $book_index['deuteronomy'][21] = 5448;
263        $book_index['deuteronomy'][22] = 5471;
264        $book_index['deuteronomy'][23] = 5501;
265        $book_index['deuteronomy'][24] = 5526;
266        $book_index['deuteronomy'][25] = 5548;
267        $book_index['deuteronomy'][26] = 5567;
268        $book_index['deuteronomy'][27] = 5586;
269        $book_index['deuteronomy'][28] = 5612;
270        $book_index['deuteronomy'][29] = 5680;
271        $book_index['deuteronomy'][30] = 5709;
272        $book_index['deuteronomy'][31] = 5729;
273        $book_index['deuteronomy'][32] = 5759;
274        $book_index['deuteronomy'][33] = 5811;
275        $book_index['deuteronomy'][34] = 5840;
276        $book_index['joshua'][1] = 5852;
277        $book_index['joshua'][2] = 5870;
278        $book_index['joshua'][3] = 5894;
279        $book_index['joshua'][4] = 5911;
280        $book_index['joshua'][5] = 5935;
281        $book_index['joshua'][6] = 5950;
282        $book_index['joshua'][7] = 5977;
283        $book_index['joshua'][8] = 6003;
284        $book_index['joshua'][9] = 6038;
285        $book_index['joshua'][10] = 6065;
286        $book_index['joshua'][11] = 6108;
287        $book_index['joshua'][12] = 6131;
288        $book_index['joshua'][13] = 6155;
289        $book_index['joshua'][14] = 6188;
290        $book_index['joshua'][15] = 6203;
291        $book_index['joshua'][16] = 6266;
292        $book_index['joshua'][17] = 6276;
293        $book_index['joshua'][18] = 6294;
294        $book_index['joshua'][19] = 6322;
295        $book_index['joshua'][20] = 6373;
296        $book_index['joshua'][21] = 6382;
297        $book_index['joshua'][22] = 6427;
298        $book_index['joshua'][23] = 6461;
299        $book_index['joshua'][24] = 6477;
300        $book_index['judges'][1] = 6510;
301        $book_index['judges'][2] = 6546;
302        $book_index['judges'][3] = 6569;
303        $book_index['judges'][4] = 6600;
304        $book_index['judges'][5] = 6624;
305        $book_index['judges'][6] = 6655;
306        $book_index['judges'][7] = 6695;
307        $book_index['judges'][8] = 6720;
308        $book_index['judges'][9] = 6755;
309        $book_index['judges'][10] = 6812;
310        $book_index['judges'][11] = 6830;
311        $book_index['judges'][12] = 6870;
312        $book_index['judges'][13] = 6885;
313        $book_index['judges'][14] = 6910;
314        $book_index['judges'][15] = 6930;
315        $book_index['judges'][16] = 6950;
316        $book_index['judges'][17] = 6981;
317        $book_index['judges'][18] = 6994;
318        $book_index['judges'][19] = 7025;
319        $book_index['judges'][20] = 7055;
320        $book_index['judges'][21] = 7103;
321        $book_index['ruth'][1] = 7128;
322        $book_index['ruth'][2] = 7150;
323        $book_index['ruth'][3] = 7173;
324        $book_index['ruth'][4] = 7191;
325        $book_index['1 samuel'][1] = 7213;
326        $book_index['1 samuel'][2] = 7241;
327        $book_index['1 samuel'][3] = 7277;
328        $book_index['1 samuel'][4] = 7298;
329        $book_index['1 samuel'][5] = 7320;
330        $book_index['1 samuel'][6] = 7332;
331        $book_index['1 samuel'][7] = 7353;
332        $book_index['1 samuel'][8] = 7370;
333        $book_index['1 samuel'][9] = 7392;
334        $book_index['1 samuel'][10] = 7419;
335        $book_index['1 samuel'][11] = 7446;
336        $book_index['1 samuel'][12] = 7461;
337        $book_index['1 samuel'][13] = 7486;
338        $book_index['1 samuel'][14] = 7509;
339        $book_index['1 samuel'][15] = 7561;
340        $book_index['1 samuel'][16] = 7596;
341        $book_index['1 samuel'][17] = 7619;
342        $book_index['1 samuel'][18] = 7677;
343        $book_index['1 samuel'][19] = 7707;
344        $book_index['1 samuel'][20] = 7731;
345        $book_index['1 samuel'][21] = 7773;
346        $book_index['1 samuel'][22] = 7788;
347        $book_index['1 samuel'][23] = 7811;
348        $book_index['1 samuel'][24] = 7840;
349        $book_index['1 samuel'][25] = 7862;
350        $book_index['1 samuel'][26] = 7906;
351        $book_index['1 samuel'][27] = 7931;
352        $book_index['1 samuel'][28] = 7943;
353        $book_index['1 samuel'][29] = 7968;
354        $book_index['1 samuel'][30] = 7979;
355        $book_index['1 samuel'][31] = 8010;
356        $book_index['2 samuel'][1] = 8023;
357        $book_index['2 samuel'][2] = 8050;
358        $book_index['2 samuel'][3] = 8082;
359        $book_index['2 samuel'][4] = 8121;
360        $book_index['2 samuel'][5] = 8133;
361        $book_index['2 samuel'][6] = 8158;
362        $book_index['2 samuel'][7] = 8181;
363        $book_index['2 samuel'][8] = 8210;
364        $book_index['2 samuel'][9] = 8228;
365        $book_index['2 samuel'][10] = 8241;
366        $book_index['2 samuel'][11] = 8260;
367        $book_index['2 samuel'][12] = 8287;
368        $book_index['2 samuel'][13] = 8318;
369        $book_index['2 samuel'][14] = 8357;
370        $book_index['2 samuel'][15] = 8390;
371        $book_index['2 samuel'][16] = 8427;
372        $book_index['2 samuel'][17] = 8450;
373        $book_index['2 samuel'][18] = 8479;
374        $book_index['2 samuel'][19] = 8512;
375        $book_index['2 samuel'][20] = 8555;
376        $book_index['2 samuel'][21] = 8581;
377        $book_index['2 samuel'][22] = 8603;
378        $book_index['2 samuel'][23] = 8654;
379        $book_index['2 samuel'][24] = 8693;
380        $book_index['1 kings'][1] = 8718;
381        $book_index['1 kings'][2] = 8771;
382        $book_index['1 kings'][3] = 8817;
383        $book_index['1 kings'][4] = 8845;
384        $book_index['1 kings'][5] = 8879;
385        $book_index['1 kings'][6] = 8897;
386        $book_index['1 kings'][7] = 8935;
387        $book_index['1 kings'][8] = 8986;
388        $book_index['1 kings'][9] = 9052;
389        $book_index['1 kings'][10] = 9080;
390        $book_index['1 kings'][11] = 9109;
391        $book_index['1 kings'][12] = 9152;
392        $book_index['1 kings'][13] = 9185;
393        $book_index['1 kings'][14] = 9219;
394        $book_index['1 kings'][15] = 9250;
395        $book_index['1 kings'][16] = 9284;
396        $book_index['1 kings'][17] = 9318;
397        $book_index['1 kings'][18] = 9342;
398        $book_index['1 kings'][19] = 9388;
399        $book_index['1 kings'][20] = 9409;
400        $book_index['1 kings'][21] = 9452;
401        $book_index['1 kings'][22] = 9481;
402        $book_index['2 kings'][1] = 9534;
403        $book_index['2 kings'][2] = 9552;
404        $book_index['2 kings'][3] = 9577;
405        $book_index['2 kings'][4] = 9604;
406        $book_index['2 kings'][5] = 9648;
407        $book_index['2 kings'][6] = 9675;
408        $book_index['2 kings'][7] = 9708;
409        $book_index['2 kings'][8] = 9728;
410        $book_index['2 kings'][9] = 9757;
411        $book_index['2 kings'][10] = 9794;
412        $book_index['2 kings'][11] = 9830;
413        $book_index['2 kings'][12] = 9851;
414        $book_index['2 kings'][13] = 9872;
415        $book_index['2 kings'][14] = 9897;
416        $book_index['2 kings'][15] = 9926;
417        $book_index['2 kings'][16] = 9964;
418        $book_index['2 kings'][17] = 9984;
419        $book_index['2 kings'][18] = 10025;
420        $book_index['2 kings'][19] = 10062;
421        $book_index['2 kings'][20] = 10099;
422        $book_index['2 kings'][21] = 10120;
423        $book_index['2 kings'][22] = 10146;
424        $book_index['2 kings'][23] = 10166;
425        $book_index['2 kings'][24] = 10203;
426        $book_index['2 kings'][25] = 10223;
427        $book_index['1 chronicles'][1] = 10253;
428        $book_index['1 chronicles'][2] = 10307;
429        $book_index['1 chronicles'][3] = 10362;
430        $book_index['1 chronicles'][4] = 10386;
431        $book_index['1 chronicles'][5] = 10429;
432        $book_index['1 chronicles'][6] = 10455;
433        $book_index['1 chronicles'][7] = 10536;
434        $book_index['1 chronicles'][8] = 10576;
435        $book_index['1 chronicles'][9] = 10616;
436        $book_index['1 chronicles'][10] = 10660;
437        $book_index['1 chronicles'][11] = 10674;
438        $book_index['1 chronicles'][12] = 10721;
439        $book_index['1 chronicles'][13] = 10761;
440        $book_index['1 chronicles'][14] = 10775;
441        $book_index['1 chronicles'][15] = 10792;
442        $book_index['1 chronicles'][16] = 10821;
443        $book_index['1 chronicles'][17] = 10864;
444        $book_index['1 chronicles'][18] = 10891;
445        $book_index['1 chronicles'][19] = 10908;
446        $book_index['1 chronicles'][20] = 10927;
447        $book_index['1 chronicles'][21] = 10935;
448        $book_index['1 chronicles'][22] = 10965;
449        $book_index['1 chronicles'][23] = 10984;
450        $book_index['1 chronicles'][24] = 11016;
451        $book_index['1 chronicles'][25] = 11047;
452        $book_index['1 chronicles'][26] = 11078;
453        $book_index['1 chronicles'][27] = 11110;
454        $book_index['1 chronicles'][28] = 11144;
455        $book_index['1 chronicles'][29] = 11165;
456        $book_index['2 chronicles'][1] = 11195;
457        $book_index['2 chronicles'][2] = 11212;
458        $book_index['2 chronicles'][3] = 11230;
459        $book_index['2 chronicles'][4] = 11247;
460        $book_index['2 chronicles'][5] = 11269;
461        $book_index['2 chronicles'][6] = 11283;
462        $book_index['2 chronicles'][7] = 11325;
463        $book_index['2 chronicles'][8] = 11347;
464        $book_index['2 chronicles'][9] = 11365;
465        $book_index['2 chronicles'][10] = 11396;
466        $book_index['2 chronicles'][11] = 11415;
467        $book_index['2 chronicles'][12] = 11438;
468        $book_index['2 chronicles'][13] = 11454;
469        $book_index['2 chronicles'][14] = 11476;
470        $book_index['2 chronicles'][15] = 11491;
471        $book_index['2 chronicles'][16] = 11510;
472        $book_index['2 chronicles'][17] = 11524;
473        $book_index['2 chronicles'][18] = 11543;
474        $book_index['2 chronicles'][19] = 11577;
475        $book_index['2 chronicles'][20] = 11588;
476        $book_index['2 chronicles'][21] = 11625;
477        $book_index['2 chronicles'][22] = 11645;
478        $book_index['2 chronicles'][23] = 11657;
479        $book_index['2 chronicles'][24] = 11678;
480        $book_index['2 chronicles'][25] = 11705;
481        $book_index['2 chronicles'][26] = 11733;
482        $book_index['2 chronicles'][27] = 11756;
483        $book_index['2 chronicles'][28] = 11765;
484        $book_index['2 chronicles'][29] = 11792;
485        $book_index['2 chronicles'][30] = 11828;
486        $book_index['2 chronicles'][31] = 11855;
487        $book_index['2 chronicles'][32] = 11876;
488        $book_index['2 chronicles'][33] = 11909;
489        $book_index['2 chronicles'][34] = 11934;
490        $book_index['2 chronicles'][35] = 11967;
491        $book_index['2 chronicles'][36] = 11994;
492        $book_index['ezra'][1] = 12017;
493        $book_index['ezra'][2] = 12028;
494        $book_index['ezra'][3] = 12098;
495        $book_index['ezra'][4] = 12111;
496        $book_index['ezra'][5] = 12135;
497        $book_index['ezra'][6] = 12152;
498        $book_index['ezra'][7] = 12174;
499        $book_index['ezra'][8] = 12202;
500        $book_index['ezra'][9] = 12238;
501        $book_index['ezra'][10] = 12253;
502        $book_index['nehemiah'][1] = 12297;
503        $book_index['nehemiah'][2] = 12308;
504        $book_index['nehemiah'][3] = 12328;
505        $book_index['nehemiah'][4] = 12360;
506        $book_index['nehemiah'][5] = 12383;
507        $book_index['nehemiah'][6] = 12402;
508        $book_index['nehemiah'][7] = 12421;
509        $book_index['nehemiah'][8] = 12494;
510        $book_index['nehemiah'][9] = 12512;
511        $book_index['nehemiah'][10] = 12550;
512        $book_index['nehemiah'][11] = 12589;
513        $book_index['nehemiah'][12] = 12625;
514        $book_index['nehemiah'][13] = 12672;
515        $book_index['esther'][1] = 12703;
516        $book_index['esther'][2] = 12725;
517        $book_index['esther'][3] = 12748;
518        $book_index['esther'][4] = 12763;
519        $book_index['esther'][5] = 12780;
520        $book_index['esther'][6] = 12794;
521        $book_index['esther'][7] = 12808;
522        $book_index['esther'][8] = 12818;
523        $book_index['esther'][9] = 12835;
524        $book_index['esther'][10] = 12867;
525        $book_index['job'][1] = 12870;
526        $book_index['job'][2] = 12892;
527        $book_index['job'][3] = 12905;
528        $book_index['job'][4] = 12931;
529        $book_index['job'][5] = 12952;
530        $book_index['job'][6] = 12979;
531        $book_index['job'][7] = 13009;
532        $book_index['job'][8] = 13030;
533        $book_index['job'][9] = 13052;
534        $book_index['job'][10] = 13087;
535        $book_index['job'][11] = 13109;
536        $book_index['job'][12] = 13129;
537        $book_index['job'][13] = 13154;
538        $book_index['job'][14] = 13182;
539        $book_index['job'][15] = 13204;
540        $book_index['job'][16] = 13239;
541        $book_index['job'][17] = 13261;
542        $book_index['job'][18] = 13277;
543        $book_index['job'][19] = 13298;
544        $book_index['job'][20] = 13327;
545        $book_index['job'][21] = 13356;
546        $book_index['job'][22] = 13390;
547        $book_index['job'][23] = 13420;
548        $book_index['job'][24] = 13437;
549        $book_index['job'][25] = 13462;
550        $book_index['job'][26] = 13468;
551        $book_index['job'][27] = 13482;
552        $book_index['job'][28] = 13505;
553        $book_index['job'][29] = 13533;
554        $book_index['job'][30] = 13558;
555        $book_index['job'][31] = 13589;
556        $book_index['job'][32] = 13629;
557        $book_index['job'][33] = 13651;
558        $book_index['job'][34] = 13684;
559        $book_index['job'][35] = 13721;
560        $book_index['job'][36] = 13737;
561        $book_index['job'][37] = 13770;
562        $book_index['job'][38] = 13794;
563        $book_index['job'][39] = 13835;
564        $book_index['job'][40] = 13865;
565        $book_index['job'][41] = 13889;
566        $book_index['job'][42] = 13923;
567        $book_index['psalms'][1] = 13940;
568        $book_index['psalms'][2] = 13946;
569        $book_index['psalms'][3] = 13958;
570        $book_index['psalms'][4] = 13966;
571        $book_index['psalms'][5] = 13974;
572        $book_index['psalms'][6] = 13986;
573        $book_index['psalms'][7] = 13996;
574        $book_index['psalms'][8] = 14013;
575        $book_index['psalms'][9] = 14022;
576        $book_index['psalms'][10] = 14042;
577        $book_index['psalms'][11] = 14060;
578        $book_index['psalms'][12] = 14067;
579        $book_index['psalms'][13] = 14075;
580        $book_index['psalms'][14] = 14081;
581        $book_index['psalms'][15] = 14088;
582        $book_index['psalms'][16] = 14093;
583        $book_index['psalms'][17] = 14104;
584        $book_index['psalms'][18] = 14119;
585        $book_index['psalms'][19] = 14169;
586        $book_index['psalms'][20] = 14183;
587        $book_index['psalms'][21] = 14192;
588        $book_index['psalms'][22] = 14205;
589        $book_index['psalms'][23] = 14236;
590        $book_index['psalms'][24] = 14242;
591        $book_index['psalms'][25] = 14252;
592        $book_index['psalms'][26] = 14274;
593        $book_index['psalms'][27] = 14286;
594        $book_index['psalms'][28] = 14300;
595        $book_index['psalms'][29] = 14309;
596        $book_index['psalms'][30] = 14320;
597        $book_index['psalms'][31] = 14332;
598        $book_index['psalms'][32] = 14356;
599        $book_index['psalms'][33] = 14367;
600        $book_index['psalms'][34] = 14389;
601        $book_index['psalms'][35] = 14411;
602        $book_index['psalms'][36] = 14439;
603        $book_index['psalms'][37] = 14451;
604        $book_index['psalms'][38] = 14491;
605        $book_index['psalms'][39] = 14513;
606        $book_index['psalms'][40] = 14526;
607        $book_index['psalms'][41] = 14543;
608        $book_index['psalms'][42] = 14556;
609        $book_index['psalms'][43] = 14567;
610        $book_index['psalms'][44] = 14572;
611        $book_index['psalms'][45] = 14598;
612        $book_index['psalms'][46] = 14615;
613        $book_index['psalms'][47] = 14626;
614        $book_index['psalms'][48] = 14635;
615        $book_index['psalms'][49] = 14649;
616        $book_index['psalms'][50] = 14669;
617        $book_index['psalms'][51] = 14692;
618        $book_index['psalms'][52] = 14711;
619        $book_index['psalms'][53] = 14720;
620        $book_index['psalms'][54] = 14726;
621        $book_index['psalms'][55] = 14733;
622        $book_index['psalms'][56] = 14756;
623        $book_index['psalms'][57] = 14769;
624        $book_index['psalms'][58] = 14780;
625        $book_index['psalms'][59] = 14791;
626        $book_index['psalms'][60] = 14808;
627        $book_index['psalms'][61] = 14820;
628        $book_index['psalms'][62] = 14828;
629        $book_index['psalms'][63] = 14840;
630        $book_index['psalms'][64] = 14851;
631        $book_index['psalms'][65] = 14861;
632        $book_index['psalms'][66] = 14874;
633        $book_index['psalms'][67] = 14894;
634        $book_index['psalms'][68] = 14901;
635        $book_index['psalms'][69] = 14936;
636        $book_index['psalms'][70] = 14972;
637        $book_index['psalms'][71] = 14977;
638        $book_index['psalms'][72] = 15001;
639        $book_index['psalms'][73] = 15021;
640        $book_index['psalms'][74] = 15049;
641        $book_index['psalms'][75] = 15072;
642        $book_index['psalms'][76] = 15082;
643        $book_index['psalms'][77] = 15094;
644        $book_index['psalms'][78] = 15114;
645        $book_index['psalms'][79] = 15186;
646        $book_index['psalms'][80] = 15199;
647        $book_index['psalms'][81] = 15218;
648        $book_index['psalms'][82] = 15234;
649        $book_index['psalms'][83] = 15242;
650        $book_index['psalms'][84] = 15260;
651        $book_index['psalms'][85] = 15272;
652        $book_index['psalms'][86] = 15285;
653        $book_index['psalms'][87] = 15302;
654        $book_index['psalms'][88] = 15309;
655        $book_index['psalms'][89] = 15327;
656        $book_index['psalms'][90] = 15379;
657        $book_index['psalms'][91] = 15396;
658        $book_index['psalms'][92] = 15412;
659        $book_index['psalms'][93] = 15427;
660        $book_index['psalms'][94] = 15432;
661        $book_index['psalms'][95] = 15455;
662        $book_index['psalms'][96] = 15466;
663        $book_index['psalms'][97] = 15479;
664        $book_index['psalms'][98] = 15491;
665        $book_index['psalms'][99] = 15500;
666        $book_index['psalms'][100] = 15509;
667        $book_index['psalms'][101] = 15514;
668        $book_index['psalms'][102] = 15522;
669        $book_index['psalms'][103] = 15550;
670        $book_index['psalms'][104] = 15572;
671        $book_index['psalms'][105] = 15607;
672        $book_index['psalms'][106] = 15652;
673        $book_index['psalms'][107] = 15700;
674        $book_index['psalms'][108] = 15743;
675        $book_index['psalms'][109] = 15756;
676        $book_index['psalms'][110] = 15787;
677        $book_index['psalms'][111] = 15794;
678        $book_index['psalms'][112] = 15804;
679        $book_index['psalms'][113] = 15814;
680        $book_index['psalms'][114] = 15823;
681        $book_index['psalms'][115] = 15831;
682        $book_index['psalms'][116] = 15849;
683        $book_index['psalms'][117] = 15868;
684        $book_index['psalms'][118] = 15870;
685        $book_index['psalms'][119] = 15899;
686        $book_index['psalms'][120] = 16075;
687        $book_index['psalms'][121] = 16082;
688        $book_index['psalms'][122] = 16090;
689        $book_index['psalms'][123] = 16099;
690        $book_index['psalms'][124] = 16103;
691        $book_index['psalms'][125] = 16111;
692        $book_index['psalms'][126] = 16116;
693        $book_index['psalms'][127] = 16122;
694        $book_index['psalms'][128] = 16127;
695        $book_index['psalms'][129] = 16133;
696        $book_index['psalms'][130] = 16141;
697        $book_index['psalms'][131] = 16149;
698        $book_index['psalms'][132] = 16152;
699        $book_index['psalms'][133] = 16170;
700        $book_index['psalms'][134] = 16173;
701        $book_index['psalms'][135] = 16176;
702        $book_index['psalms'][136] = 16197;
703        $book_index['psalms'][137] = 16223;
704        $book_index['psalms'][138] = 16232;
705        $book_index['psalms'][139] = 16240;
706        $book_index['psalms'][140] = 16264;
707        $book_index['psalms'][141] = 16277;
708        $book_index['psalms'][142] = 16287;
709        $book_index['psalms'][143] = 16294;
710        $book_index['psalms'][144] = 16306;
711        $book_index['psalms'][145] = 16321;
712        $book_index['psalms'][146] = 16342;
713        $book_index['psalms'][147] = 16352;
714        $book_index['psalms'][148] = 16372;
715        $book_index['psalms'][149] = 16386;
716        $book_index['psalms'][150] = 16395;
717        $book_index['proverbs'][1] = 16401;
718        $book_index['proverbs'][2] = 16434;
719        $book_index['proverbs'][3] = 16456;
720        $book_index['proverbs'][4] = 16491;
721        $book_index['proverbs'][5] = 16518;
722        $book_index['proverbs'][6] = 16541;
723        $book_index['proverbs'][7] = 16576;
724        $book_index['proverbs'][8] = 16603;
725        $book_index['proverbs'][9] = 16639;
726        $book_index['proverbs'][10] = 16657;
727        $book_index['proverbs'][11] = 16689;
728        $book_index['proverbs'][12] = 16720;
729        $book_index['proverbs'][13] = 16748;
730        $book_index['proverbs'][14] = 16773;
731        $book_index['proverbs'][15] = 16808;
732        $book_index['proverbs'][16] = 16841;
733        $book_index['proverbs'][17] = 16874;
734        $book_index['proverbs'][18] = 16902;
735        $book_index['proverbs'][19] = 16926;
736        $book_index['proverbs'][20] = 16955;
737        $book_index['proverbs'][21] = 16985;
738        $book_index['proverbs'][22] = 17016;
739        $book_index['proverbs'][23] = 17045;
740        $book_index['proverbs'][24] = 17080;
741        $book_index['proverbs'][25] = 17114;
742        $book_index['proverbs'][26] = 17142;
743        $book_index['proverbs'][27] = 17170;
744        $book_index['proverbs'][28] = 17197;
745        $book_index['proverbs'][29] = 17225;
746        $book_index['proverbs'][30] = 17252;
747        $book_index['proverbs'][31] = 17285;
748        $book_index['ecclesiastes'][1] = 17316;
749        $book_index['ecclesiastes'][2] = 17334;
750        $book_index['ecclesiastes'][3] = 17360;
751        $book_index['ecclesiastes'][4] = 17382;
752        $book_index['ecclesiastes'][5] = 17398;
753        $book_index['ecclesiastes'][6] = 17418;
754        $book_index['ecclesiastes'][7] = 17430;
755        $book_index['ecclesiastes'][8] = 17459;
756        $book_index['ecclesiastes'][9] = 17476;
757        $book_index['ecclesiastes'][10] = 17494;
758        $book_index['ecclesiastes'][11] = 17514;
759        $book_index['ecclesiastes'][12] = 17524;
760        $book_index['song of solomon'][1] = 17538;
761        $book_index['song of solomon'][2] = 17555;
762        $book_index['song of solomon'][3] = 17572;
763        $book_index['song of solomon'][4] = 17583;
764        $book_index['song of solomon'][5] = 17599;
765        $book_index['song of solomon'][6] = 17615;
766        $book_index['song of solomon'][7] = 17628;
767        $book_index['song of solomon'][8] = 17641;
768        $book_index['isaiah'][1] = 17655;
769        $book_index['isaiah'][2] = 17686;
770        $book_index['isaiah'][3] = 17708;
771        $book_index['isaiah'][4] = 17734;
772        $book_index['isaiah'][5] = 17740;
773        $book_index['isaiah'][6] = 17770;
774        $book_index['isaiah'][7] = 17783;
775        $book_index['isaiah'][8] = 17808;
776        $book_index['isaiah'][9] = 17830;
777        $book_index['isaiah'][10] = 17851;
778        $book_index['isaiah'][11] = 17885;
779        $book_index['isaiah'][12] = 17901;
780        $book_index['isaiah'][13] = 17907;
781        $book_index['isaiah'][14] = 17929;
782        $book_index['isaiah'][15] = 17961;
783        $book_index['isaiah'][16] = 17970;
784        $book_index['isaiah'][17] = 17984;
785        $book_index['isaiah'][18] = 17998;
786        $book_index['isaiah'][19] = 18005;
787        $book_index['isaiah'][20] = 18030;
788        $book_index['isaiah'][21] = 18036;
789        $book_index['isaiah'][22] = 18053;
790        $book_index['isaiah'][23] = 18078;
791        $book_index['isaiah'][24] = 18096;
792        $book_index['isaiah'][25] = 18119;
793        $book_index['isaiah'][26] = 18131;
794        $book_index['isaiah'][27] = 18152;
795        $book_index['isaiah'][28] = 18165;
796        $book_index['isaiah'][29] = 18194;
797        $book_index['isaiah'][30] = 18218;
798        $book_index['isaiah'][31] = 18251;
799        $book_index['isaiah'][32] = 18260;
800        $book_index['isaiah'][33] = 18280;
801        $book_index['isaiah'][34] = 18304;
802        $book_index['isaiah'][35] = 18321;
803        $book_index['isaiah'][36] = 18331;
804        $book_index['isaiah'][37] = 18353;
805        $book_index['isaiah'][38] = 18391;
806        $book_index['isaiah'][39] = 18413;
807        $book_index['isaiah'][40] = 18421;
808        $book_index['isaiah'][41] = 18452;
809        $book_index['isaiah'][42] = 18481;
810        $book_index['isaiah'][43] = 18506;
811        $book_index['isaiah'][44] = 18534;
812        $book_index['isaiah'][45] = 18562;
813        $book_index['isaiah'][46] = 18587;
814        $book_index['isaiah'][47] = 18600;
815        $book_index['isaiah'][48] = 18615;
816        $book_index['isaiah'][49] = 18637;
817        $book_index['isaiah'][50] = 18663;
818        $book_index['isaiah'][51] = 18674;
819        $book_index['isaiah'][52] = 18697;
820        $book_index['isaiah'][53] = 18712;
821        $book_index['isaiah'][54] = 18724;
822        $book_index['isaiah'][55] = 18741;
823        $book_index['isaiah'][56] = 18754;
824        $book_index['isaiah'][57] = 18766;
825        $book_index['isaiah'][58] = 18787;
826        $book_index['isaiah'][59] = 18801;
827        $book_index['isaiah'][60] = 18822;
828        $book_index['isaiah'][61] = 18844;
829        $book_index['isaiah'][62] = 18855;
830        $book_index['isaiah'][63] = 18867;
831        $book_index['isaiah'][64] = 18886;
832        $book_index['isaiah'][65] = 18898;
833        $book_index['isaiah'][66] = 18923;
834        $book_index['jeremiah'][1] = 18947;
835        $book_index['jeremiah'][2] = 18966;
836        $book_index['jeremiah'][3] = 19003;
837        $book_index['jeremiah'][4] = 19028;
838        $book_index['jeremiah'][5] = 19059;
839        $book_index['jeremiah'][6] = 19090;
840        $book_index['jeremiah'][7] = 19120;
841        $book_index['jeremiah'][8] = 19154;
842        $book_index['jeremiah'][9] = 19176;
843        $book_index['jeremiah'][10] = 19202;
844        $book_index['jeremiah'][11] = 19227;
845        $book_index['jeremiah'][12] = 19250;
846        $book_index['jeremiah'][13] = 19267;
847        $book_index['jeremiah'][14] = 19294;
848        $book_index['jeremiah'][15] = 19316;
849        $book_index['jeremiah'][16] = 19337;
850        $book_index['jeremiah'][17] = 19358;
851        $book_index['jeremiah'][18] = 19385;
852        $book_index['jeremiah'][19] = 19408;
853        $book_index['jeremiah'][20] = 19423;
854        $book_index['jeremiah'][21] = 19441;
855        $book_index['jeremiah'][22] = 19455;
856        $book_index['jeremiah'][23] = 19485;
857        $book_index['jeremiah'][24] = 19525;
858        $book_index['jeremiah'][25] = 19535;
859        $book_index['jeremiah'][26] = 19573;
860        $book_index['jeremiah'][27] = 19597;
861        $book_index['jeremiah'][28] = 19619;
862        $book_index['jeremiah'][29] = 19636;
863        $book_index['jeremiah'][30] = 19668;
864        $book_index['jeremiah'][31] = 19692;
865        $book_index['jeremiah'][32] = 19732;
866        $book_index['jeremiah'][33] = 19776;
867        $book_index['jeremiah'][34] = 19802;
868        $book_index['jeremiah'][35] = 19824;
869        $book_index['jeremiah'][36] = 19843;
870        $book_index['jeremiah'][37] = 19875;
871        $book_index['jeremiah'][38] = 19896;
872        $book_index['jeremiah'][39] = 19924;
873        $book_index['jeremiah'][40] = 19942;
874        $book_index['jeremiah'][41] = 19958;
875        $book_index['jeremiah'][42] = 19976;
876        $book_index['jeremiah'][43] = 19998;
877        $book_index['jeremiah'][44] = 20011;
878        $book_index['jeremiah'][45] = 20041;
879        $book_index['jeremiah'][46] = 20046;
880        $book_index['jeremiah'][47] = 20074;
881        $book_index['jeremiah'][48] = 20081;
882        $book_index['jeremiah'][49] = 20128;
883        $book_index['jeremiah'][50] = 20167;
884        $book_index['jeremiah'][51] = 20213;
885        $book_index['jeremiah'][52] = 20277;
886        $book_index['lamentations'][1] = 20311;
887        $book_index['lamentations'][2] = 20333;
888        $book_index['lamentations'][3] = 20355;
889        $book_index['lamentations'][4] = 20421;
890        $book_index['lamentations'][5] = 20443;
891        $book_index['ezekiel'][1] = 20465;
892        $book_index['ezekiel'][2] = 20493;
893        $book_index['ezekiel'][3] = 20503;
894        $book_index['ezekiel'][4] = 20530;
895        $book_index['ezekiel'][5] = 20547;
896        $book_index['ezekiel'][6] = 20564;
897        $book_index['ezekiel'][7] = 20578;
898        $book_index['ezekiel'][8] = 20605;
899        $book_index['ezekiel'][9] = 20623;
900        $book_index['ezekiel'][10] = 20634;
901        $book_index['ezekiel'][11] = 20656;
902        $book_index['ezekiel'][12] = 20681;
903        $book_index['ezekiel'][13] = 20709;
904        $book_index['ezekiel'][14] = 20732;
905        $book_index['ezekiel'][15] = 20755;
906        $book_index['ezekiel'][16] = 20763;
907        $book_index['ezekiel'][17] = 20826;
908        $book_index['ezekiel'][18] = 20850;
909        $book_index['ezekiel'][19] = 20882;
910        $book_index['ezekiel'][20] = 20896;
911        $book_index['ezekiel'][21] = 20945;
912        $book_index['ezekiel'][22] = 20977;
913        $book_index['ezekiel'][23] = 21008;
914        $book_index['ezekiel'][24] = 21057;
915        $book_index['ezekiel'][25] = 21084;
916        $book_index['ezekiel'][26] = 21101;
917        $book_index['ezekiel'][27] = 21122;
918        $book_index['ezekiel'][28] = 21158;
919        $book_index['ezekiel'][29] = 21184;
920        $book_index['ezekiel'][30] = 21205;
921        $book_index['ezekiel'][31] = 21231;
922        $book_index['ezekiel'][32] = 21249;
923        $book_index['ezekiel'][33] = 21281;
924        $book_index['ezekiel'][34] = 21314;
925        $book_index['ezekiel'][35] = 21345;
926        $book_index['ezekiel'][36] = 21360;
927        $book_index['ezekiel'][37] = 21398;
928        $book_index['ezekiel'][38] = 21426;
929        $book_index['ezekiel'][39] = 21449;
930        $book_index['ezekiel'][40] = 21478;
931        $book_index['ezekiel'][41] = 21527;
932        $book_index['ezekiel'][42] = 21553;
933        $book_index['ezekiel'][43] = 21573;
934        $book_index['ezekiel'][44] = 21600;
935        $book_index['ezekiel'][45] = 21631;
936        $book_index['ezekiel'][46] = 21656;
937        $book_index['ezekiel'][47] = 21680;
938        $book_index['ezekiel'][48] = 21703;
939        $book_index['daniel'][1] = 21738;
940        $book_index['daniel'][2] = 21759;
941        $book_index['daniel'][3] = 21808;
942        $book_index['daniel'][4] = 21838;
943        $book_index['daniel'][5] = 21875;
944        $book_index['daniel'][6] = 21906;
945        $book_index['daniel'][7] = 21934;
946        $book_index['daniel'][8] = 21962;
947        $book_index['daniel'][9] = 21989;
948        $book_index['daniel'][10] = 22016;
949        $book_index['daniel'][11] = 22037;
950        $book_index['daniel'][12] = 22082;
951        $book_index['hosea'][1] = 22095;
952        $book_index['hosea'][2] = 22106;
953        $book_index['hosea'][3] = 22129;
954        $book_index['hosea'][4] = 22134;
955        $book_index['hosea'][5] = 22153;
956        $book_index['hosea'][6] = 22168;
957        $book_index['hosea'][7] = 22179;
958        $book_index['hosea'][8] = 22195;
959        $book_index['hosea'][9] = 22209;
960        $book_index['hosea'][10] = 22226;
961        $book_index['hosea'][11] = 22241;
962        $book_index['hosea'][12] = 22253;
963        $book_index['hosea'][13] = 22267;
964        $book_index['hosea'][14] = 22283;
965        $book_index['joel'][1] = 22292;
966        $book_index['joel'][2] = 22312;
967        $book_index['joel'][3] = 22344;
968        $book_index['amos'][1] = 22365;
969        $book_index['amos'][2] = 22380;
970        $book_index['amos'][3] = 22396;
971        $book_index['amos'][4] = 22411;
972        $book_index['amos'][5] = 22424;
973        $book_index['amos'][6] = 22451;
974        $book_index['amos'][7] = 22465;
975        $book_index['amos'][8] = 22482;
976        $book_index['amos'][9] = 22496;
977        $book_index['obadiah'][1] = 22511;
978        $book_index['jonah'][1] = 22532;
979        $book_index['jonah'][2] = 22549;
980        $book_index['jonah'][3] = 22559;
981        $book_index['jonah'][4] = 22569;
982        $book_index['micah'][1] = 22580;
983        $book_index['micah'][2] = 22596;
984        $book_index['micah'][3] = 22609;
985        $book_index['micah'][4] = 22621;
986        $book_index['micah'][5] = 22634;
987        $book_index['micah'][6] = 22649;
988        $book_index['micah'][7] = 22665;
989        $book_index['nahum'][1] = 22685;
990        $book_index['nahum'][2] = 22700;
991        $book_index['nahum'][3] = 22713;
992        $book_index['habakkuk'][1] = 22732;
993        $book_index['habakkuk'][2] = 22749;
994        $book_index['habakkuk'][3] = 22769;
995        $book_index['zephaniah'][1] = 22788;
996        $book_index['zephaniah'][2] = 22806;
997        $book_index['zephaniah'][3] = 22821;
998        $book_index['haggai'][1] = 22841;
999        $book_index['haggai'][2] = 22856;
1000        $book_index['zechariah'][1] = 22879;
1001        $book_index['zechariah'][2] = 22900;
1002        $book_index['zechariah'][3] = 22913;
1003        $book_index['zechariah'][4] = 22923;
1004        $book_index['zechariah'][5] = 22937;
1005        $book_index['zechariah'][6] = 22948;
1006        $book_index['zechariah'][7] = 22963;
1007        $book_index['zechariah'][8] = 22977;
1008        $book_index['zechariah'][9] = 23000;
1009        $book_index['zechariah'][10] = 23017;
1010        $book_index['zechariah'][11] = 23029;
1011        $book_index['zechariah'][12] = 23046;
1012        $book_index['zechariah'][13] = 23060;
1013        $book_index['zechariah'][14] = 23069;
1014        $book_index['malachi'][1] = 23090;
1015        $book_index['malachi'][2] = 23104;
1016        $book_index['malachi'][3] = 23121;
1017        $book_index['malachi'][4] = 23139;
1018        $book_index['matthew'][1] = 23145;
1019        $book_index['matthew'][2] = 23170;
1020        $book_index['matthew'][3] = 23193;
1021        $book_index['matthew'][4] = 23210;
1022        $book_index['matthew'][5] = 23235;
1023        $book_index['matthew'][6] = 23283;
1024        $book_index['matthew'][7] = 23317;
1025        $book_index['matthew'][8] = 23346;
1026        $book_index['matthew'][9] = 23380;
1027        $book_index['matthew'][10] = 23418;
1028        $book_index['matthew'][11] = 23460;
1029        $book_index['matthew'][12] = 23490;
1030        $book_index['matthew'][13] = 23540;
1031        $book_index['matthew'][14] = 23598;
1032        $book_index['matthew'][15] = 23634;
1033        $book_index['matthew'][16] = 23673;
1034        $book_index['matthew'][17] = 23701;
1035        $book_index['matthew'][18] = 23728;
1036        $book_index['matthew'][19] = 23763;
1037        $book_index['matthew'][20] = 23793;
1038        $book_index['matthew'][21] = 23827;
1039        $book_index['matthew'][22] = 23873;
1040        $book_index['matthew'][23] = 23919;
1041        $book_index['matthew'][24] = 23958;
1042        $book_index['matthew'][25] = 24009;
1043        $book_index['matthew'][26] = 24055;
1044        $book_index['matthew'][27] = 24130;
1045        $book_index['matthew'][28] = 24196;
1046        $book_index['mark'][1] = 24216;
1047        $book_index['mark'][2] = 24261;
1048        $book_index['mark'][3] = 24289;
1049        $book_index['mark'][4] = 24324;
1050        $book_index['mark'][5] = 24365;
1051        $book_index['mark'][6] = 24408;
1052        $book_index['mark'][7] = 24464;
1053        $book_index['mark'][8] = 24501;
1054        $book_index['mark'][9] = 24539;
1055        $book_index['mark'][10] = 24589;
1056        $book_index['mark'][11] = 24641;
1057        $book_index['mark'][12] = 24674;
1058        $book_index['mark'][13] = 24718;
1059        $book_index['mark'][14] = 24755;
1060        $book_index['mark'][15] = 24827;
1061        $book_index['mark'][16] = 24874;
1062        $book_index['luke'][1] = 24894;
1063        $book_index['luke'][2] = 24974;
1064        $book_index['luke'][3] = 25026;
1065        $book_index['luke'][4] = 25064;
1066        $book_index['luke'][5] = 25108;
1067        $book_index['luke'][6] = 25147;
1068        $book_index['luke'][7] = 25196;
1069        $book_index['luke'][8] = 25246;
1070        $book_index['luke'][9] = 25302;
1071        $book_index['luke'][10] = 25364;
1072        $book_index['luke'][11] = 25406;
1073        $book_index['luke'][12] = 25460;
1074        $book_index['luke'][13] = 25519;
1075        $book_index['luke'][14] = 25554;
1076        $book_index['luke'][15] = 25589;
1077        $book_index['luke'][16] = 25621;
1078        $book_index['luke'][17] = 25652;
1079        $book_index['luke'][18] = 25689;
1080        $book_index['luke'][19] = 25732;
1081        $book_index['luke'][20] = 25780;
1082        $book_index['luke'][21] = 25827;
1083        $book_index['luke'][22] = 25865;
1084        $book_index['luke'][23] = 25936;
1085        $book_index['luke'][24] = 25992;
1086        $book_index['john'][1] = 26045;
1087        $book_index['john'][2] = 26096;
1088        $book_index['john'][3] = 26121;
1089        $book_index['john'][4] = 26157;
1090        $book_index['john'][5] = 26211;
1091        $book_index['john'][6] = 26258;
1092        $book_index['john'][7] = 26329;
1093        $book_index['john'][8] = 26382;
1094        $book_index['john'][9] = 26441;
1095        $book_index['john'][10] = 26482;
1096        $book_index['john'][11] = 26524;
1097        $book_index['john'][12] = 26581;
1098        $book_index['john'][13] = 26631;
1099        $book_index['john'][14] = 26669;
1100        $book_index['john'][15] = 26700;
1101        $book_index['john'][16] = 26727;
1102        $book_index['john'][17] = 26760;
1103        $book_index['john'][18] = 26786;
1104        $book_index['john'][19] = 26826;
1105        $book_index['john'][20] = 26868;
1106        $book_index['john'][21] = 26899;
1107        $book_index['acts'][1] = 26924;
1108        $book_index['acts'][2] = 26950;
1109        $book_index['acts'][3] = 26997;
1110        $book_index['acts'][4] = 27023;
1111        $book_index['acts'][5] = 27060;
1112        $book_index['acts'][6] = 27102;
1113        $book_index['acts'][7] = 27117;
1114        $book_index['acts'][8] = 27177;
1115        $book_index['acts'][9] = 27217;
1116        $book_index['acts'][10] = 27260;
1117        $book_index['acts'][11] = 27308;
1118        $book_index['acts'][12] = 27338;
1119        $book_index['acts'][13] = 27363;
1120        $book_index['acts'][14] = 27415;
1121        $book_index['acts'][15] = 27443;
1122        $book_index['acts'][16] = 27484;
1123        $book_index['acts'][17] = 27524;
1124        $book_index['acts'][18] = 27558;
1125        $book_index['acts'][19] = 27586;
1126        $book_index['acts'][20] = 27627;
1127        $book_index['acts'][21] = 27665;
1128        $book_index['acts'][22] = 27705;
1129        $book_index['acts'][23] = 27735;
1130        $book_index['acts'][24] = 27770;
1131        $book_index['acts'][25] = 27797;
1132        $book_index['acts'][26] = 27824;
1133        $book_index['acts'][27] = 27856;
1134        $book_index['acts'][28] = 27900;
1135        $book_index['romans'][1] = 27931;
1136        $book_index['romans'][2] = 27963;
1137        $book_index['romans'][3] = 27992;
1138        $book_index['romans'][4] = 28023;
1139        $book_index['romans'][5] = 28048;
1140        $book_index['romans'][6] = 28069;
1141        $book_index['romans'][7] = 28092;
1142        $book_index['romans'][8] = 28117;
1143        $book_index['romans'][9] = 28156;
1144        $book_index['romans'][10] = 28189;
1145        $book_index['romans'][11] = 28210;
1146        $book_index['romans'][12] = 28246;
1147        $book_index['romans'][13] = 28267;
1148        $book_index['romans'][14] = 28281;
1149        $book_index['romans'][15] = 28304;
1150        $book_index['romans'][16] = 28337;
1151        $book_index['1 corinthians'][1] = 28364;
1152        $book_index['1 corinthians'][2] = 28395;
1153        $book_index['1 corinthians'][3] = 28411;
1154        $book_index['1 corinthians'][4] = 28434;
1155        $book_index['1 corinthians'][5] = 28455;
1156        $book_index['1 corinthians'][6] = 28468;
1157        $book_index['1 corinthians'][7] = 28488;
1158        $book_index['1 corinthians'][8] = 28528;
1159        $book_index['1 corinthians'][9] = 28541;
1160        $book_index['1 corinthians'][10] = 28568;
1161        $book_index['1 corinthians'][11] = 28601;
1162        $book_index['1 corinthians'][12] = 28635;
1163        $book_index['1 corinthians'][13] = 28666;
1164        $book_index['1 corinthians'][14] = 28679;
1165        $book_index['1 corinthians'][15] = 28719;
1166        $book_index['1 corinthians'][16] = 28777;
1167        $book_index['2 corinthians'][1] = 28801;
1168        $book_index['2 corinthians'][2] = 28825;
1169        $book_index['2 corinthians'][3] = 28842;
1170        $book_index['2 corinthians'][4] = 28860;
1171        $book_index['2 corinthians'][5] = 28878;
1172        $book_index['2 corinthians'][6] = 28899;
1173        $book_index['2 corinthians'][7] = 28917;
1174        $book_index['2 corinthians'][8] = 28933;
1175        $book_index['2 corinthians'][9] = 28957;
1176        $book_index['2 corinthians'][10] = 28972;
1177        $book_index['2 corinthians'][11] = 28990;
1178        $book_index['2 corinthians'][12] = 29023;
1179        $book_index['2 corinthians'][13] = 29044;
1180        $book_index['galatians'][1] = 29058;
1181        $book_index['galatians'][2] = 29082;
1182        $book_index['galatians'][3] = 29103;
1183        $book_index['galatians'][4] = 29132;
1184        $book_index['galatians'][5] = 29163;
1185        $book_index['galatians'][6] = 29189;
1186        $book_index['ephesians'][1] = 29207;
1187        $book_index['ephesians'][2] = 29230;
1188        $book_index['ephesians'][3] = 29252;
1189        $book_index['ephesians'][4] = 29273;
1190        $book_index['ephesians'][5] = 29305;
1191        $book_index['ephesians'][6] = 29338;
1192        $book_index['philippians'][1] = 29362;
1193        $book_index['philippians'][2] = 29392;
1194        $book_index['philippians'][3] = 29422;
1195        $book_index['philippians'][4] = 29443;
1196        $book_index['colossians'][1] = 29466;
1197        $book_index['colossians'][2] = 29495;
1198        $book_index['colossians'][3] = 29518;
1199        $book_index['colossians'][4] = 29543;
1200        $book_index['1 thessalonians'][1] = 29561;
1201        $book_index['1 thessalonians'][2] = 29571;
1202        $book_index['1 thessalonians'][3] = 29591;
1203        $book_index['1 thessalonians'][4] = 29604;
1204        $book_index['1 thessalonians'][5] = 29622;
1205        $book_index['2 thessalonians'][1] = 29650;
1206        $book_index['2 thessalonians'][2] = 29662;
1207        $book_index['2 thessalonians'][3] = 29679;
1208        $book_index['1 timothy'][1] = 29697;
1209        $book_index['1 timothy'][2] = 29717;
1210        $book_index['1 timothy'][3] = 29732;
1211        $book_index['1 timothy'][4] = 29748;
1212        $book_index['1 timothy'][5] = 29764;
1213        $book_index['1 timothy'][6] = 29789;
1214        $book_index['2 timothy'][1] = 29810;
1215        $book_index['2 timothy'][2] = 29828;
1216        $book_index['2 timothy'][3] = 29854;
1217        $book_index['2 timothy'][4] = 29871;
1218        $book_index['titus'][1] = 29893;
1219        $book_index['titus'][2] = 29909;
1220        $book_index['titus'][3] = 29924;
1221        $book_index['philemon'][1] = 29939;
1222        $book_index['hebrews'][1] = 29964;
1223        $book_index['hebrews'][2] = 29978;
1224        $book_index['hebrews'][3] = 29996;
1225        $book_index['hebrews'][4] = 30015;
1226        $book_index['hebrews'][5] = 30031;
1227        $book_index['hebrews'][6] = 30045;
1228        $book_index['hebrews'][7] = 30065;
1229        $book_index['hebrews'][8] = 30093;
1230        $book_index['hebrews'][9] = 30106;
1231        $book_index['hebrews'][10] = 30134;
1232        $book_index['hebrews'][11] = 30173;
1233        $book_index['hebrews'][12] = 30213;
1234        $book_index['hebrews'][13] = 30242;
1235        $book_index['james'][1] = 30267;
1236        $book_index['james'][2] = 30294;
1237        $book_index['james'][3] = 30320;
1238        $book_index['james'][4] = 30338;
1239        $book_index['james'][5] = 30355;
1240        $book_index['1 peter'][1] = 30375;
1241        $book_index['1 peter'][2] = 30400;
1242        $book_index['1 peter'][3] = 30425;
1243        $book_index['1 peter'][4] = 30447;
1244        $book_index['1 peter'][5] = 30466;
1245        $book_index['2 peter'][1] = 30480;
1246        $book_index['2 peter'][2] = 30501;
1247        $book_index['2 peter'][3] = 30523;
1248        $book_index['1 john'][1] = 30541;
1249        $book_index['1 john'][2] = 30551;
1250        $book_index['1 john'][3] = 30580;
1251        $book_index['1 john'][4] = 30604;
1252        $book_index['1 john'][5] = 30625;
1253        $book_index['2 john'][1] = 30646;
1254        $book_index['3 john'][1] = 30659;
1255        $book_index['jude'][1] = 30673;
1256        $book_index['revelation'][1] = 30698;
1257        $book_index['revelation'][2] = 30718;
1258        $book_index['revelation'][3] = 30747;
1259        $book_index['revelation'][4] = 30769;
1260        $book_index['revelation'][5] = 30780;
1261        $book_index['revelation'][6] = 30794;
1262        $book_index['revelation'][7] = 30811;
1263        $book_index['revelation'][8] = 30828;
1264        $book_index['revelation'][9] = 30841;
1265        $book_index['revelation'][10] = 30862;
1266        $book_index['revelation'][11] = 30873;
1267        $book_index['revelation'][12] = 30892;
1268        $book_index['revelation'][13] = 30909;
1269        $book_index['revelation'][14] = 30927;
1270        $book_index['revelation'][15] = 30947;
1271        $book_index['revelation'][16] = 30955;
1272        $book_index['revelation'][17] = 30976;
1273        $book_index['revelation'][18] = 30994;
1274        $book_index['revelation'][19] = 31018;
1275        $book_index['revelation'][20] = 31039;
1276        $book_index['revelation'][21] = 31054;
1277        $book_index['revelation'][22] = 31081;
1278        return $book_index;
1279    }
1280}