FIX: Fixed verse picker width, fixed search index issues, fixed selection

This commit is contained in:
jason.wall 2017-08-27 19:37:53 -04:00
parent cb0ec0fc12
commit ca2627a7b6
87 changed files with 205 additions and 3021 deletions

View File

@ -19,7 +19,6 @@ DynamicBibleIonic/*.swp
DynamicBibleIonic/.DS_Store
DynamicBibleIonic/Thumbs.db
**.apk
DynamicBibleIonic/platforms/android/assets/www/assets
DynamicBibleIonic/platforms/android/assets/**
DynamicBibleIonic/.idea
DynamicBibleIonic/.tmp
@ -29,9 +28,10 @@ DynamicBibleIonic/bin
DynamicBibleIonic/.vscode
DynamicBibleUtility/.vs
DynamicBibleIonic/platforms/android/release-signing.properties
DynamicBibleIonic/platforms/android/.gradle
DynamicBibleIonic/platforms/android/build
*.zip
DynamicBibleIonic/platforms/android/CordovaLib/build
DynamicBibleIonic/platforms/android/.gradle
DynamicBibleIonic/platforms/android/debug-signing.properties
syntax: regexp
npm-debug.log.*

View File

@ -0,0 +1,18 @@
{
"android": {
"debug": {
"keystore": "walljm.keystore",
"storePassword": "Yahweh02",
"alias": "walljm",
"password" : "Yahweh02",
"keystoreType": ""
},
"release": {
"keystore": "walljm.keystore",
"storePassword": "Yahweh02",
"alias": "walljm",
"password" : "Yahweh02",
"keystoreType": ""
}
}
}

View File

@ -1,50 +1,56 @@
passage .button {
color: #3D5699;
}
.passage-title {
background-color: #c3cce4;
}
passage .passage-text {
padding-bottom: 12px;
}
.passage-text + .passage-text {
border-top: 1px dotted #808080;
padding-top: 12px;
}
@media screen and (min-width: 700px) {
passage .passage-text {
-webkit-column-count: 2; /* Chrome, Safari, Opera */
-moz-column-count: 2; /* Firefox */
column-count: 2;
-webkit-column-gap: 30px; /* Chrome, Safari, Opera */
-moz-column-gap: 30px; /* Firefox */
column-gap: 30px;
-webkit-column-rule-style: dotted; /* Chrome, Safari, Opera */
-moz-column-rule-style: dotted; /* Firefox */
column-rule-style: dotted;
-webkit-column-rule-width: 1px; /* Chrome, Safari, Opera */
-moz-column-rule-width: 1px; /* Firefox */
column-rule-width: 1px;
}
}
@media screen and (min-width: 900px) {
passage .passage-text {
-webkit-column-count: 3; /* Chrome, Safari, Opera */
-moz-column-count: 3; /* Firefox */
column-count: 3;
-webkit-column-gap: 30px; /* Chrome, Safari, Opera */
-moz-column-gap: 30px; /* Firefox */
column-gap: 30px;
-webkit-column-rule-style: dotted; /* Chrome, Safari, Opera */
-moz-column-rule-style: dotted; /* Firefox */
column-rule-style: dotted;
-webkit-column-rule-width: 1px; /* Chrome, Safari, Opera */
-moz-column-rule-width: 1px; /* Firefox */
column-rule-width: 1px;
}
passage {
a {
user-select: text !important;
}
}
passage .button {
color: #3D5699;
}
.passage-title {
background-color: #c3cce4;
}
passage .passage-text {
padding-bottom: 12px;
}
.passage-text + .passage-text {
border-top: 1px dotted #808080;
padding-top: 12px;
}
@media screen and (min-width: 700px) {
passage .passage-text {
-webkit-column-count: 2; /* Chrome, Safari, Opera */
-moz-column-count: 2; /* Firefox */
column-count: 2;
-webkit-column-gap: 30px; /* Chrome, Safari, Opera */
-moz-column-gap: 30px; /* Firefox */
column-gap: 30px;
-webkit-column-rule-style: dotted; /* Chrome, Safari, Opera */
-moz-column-rule-style: dotted; /* Firefox */
column-rule-style: dotted;
-webkit-column-rule-width: 1px; /* Chrome, Safari, Opera */
-moz-column-rule-width: 1px; /* Firefox */
column-rule-width: 1px;
}
}
@media screen and (min-width: 900px) {
passage .passage-text {
-webkit-column-count: 3; /* Chrome, Safari, Opera */
-moz-column-count: 3; /* Firefox */
column-count: 3;
-webkit-column-gap: 30px; /* Chrome, Safari, Opera */
-moz-column-gap: 30px; /* Firefox */
column-gap: 30px;
-webkit-column-rule-style: dotted; /* Chrome, Safari, Opera */
-moz-column-rule-style: dotted; /* Firefox */
column-rule-style: dotted;
-webkit-column-rule-width: 1px; /* Chrome, Safari, Opera */
-moz-column-rule-width: 1px; /* Firefox */
column-rule-width: 1px;
}
}

View File

@ -7,7 +7,7 @@ verse-picker {
background-color: #1c2e4c;
margin: .3em;
text-align: center;
width: 65px;
width: 75px;
}
.backbutton {

View File

@ -1,212 +0,0 @@
/* Character code for `y`. */
const CC_Y = 'y'.charCodeAt(0);
/* Standard suffix manipulations. */
const step2list = {
ational: 'ate',
tional: 'tion',
enci: 'ence',
anci: 'ance',
izer: 'ize',
bli: 'ble',
alli: 'al',
entli: 'ent',
eli: 'e',
ousli: 'ous',
ization: 'ize',
ation: 'ate',
ator: 'ate',
alism: 'al',
iveness: 'ive',
fulness: 'ful',
ousness: 'ous',
aliti: 'al',
iviti: 'ive',
biliti: 'ble',
logi: 'log'
};
const step3list = {
icate: 'ic',
ative: '',
alize: 'al',
iciti: 'ic',
ical: 'ic',
ful: '',
ness: ''
};
/* Consonant-vowel sequences. */
const consonant = '[^aeiou]';
const vowel = '[aeiouy]';
const consonantSequence = '(' + consonant + '[^aeiouy]*)';
const vowelSequence = '(' + vowel + '[aeiou]*)';
const MEASURE_GT_0 = new RegExp(
'^' + consonantSequence + '?' + vowelSequence + consonantSequence
);
const MEASURE_EQ_1 = new RegExp(
'^' + consonantSequence + '?' + vowelSequence + consonantSequence +
vowelSequence + '?$'
);
const MEASURE_GT_1 = new RegExp(
'^' + consonantSequence + '?' +
'(' + vowelSequence + consonantSequence + '){2,}'
);
const VOWEL_IN_STEM = new RegExp(
'^' + consonantSequence + '?' + vowel
);
const CONSONANT_LIKE = new RegExp(
'^' + consonantSequence + vowel + '[^aeiouwxy]$'
);
/* Exception expressions. */
const SUFFIX_LL = /ll$/;
const SUFFIX_E = /^(.+?)e$/;
const SUFFIX_Y = /^(.+?)y$/;
const SUFFIX_ION = /^(.+?(s|t))(ion)$/;
const SUFFIX_ED_OR_ING = /^(.+?)(ed|ing)$/;
const SUFFIX_AT_OR_BL_OR_IZ = /(at|bl|iz)$/;
const SUFFIX_EED = /^(.+?)eed$/;
const SUFFIX_S = /^.+?[^s]s$/;
const SUFFIX_SSES_OR_IES = /^.+?(ss|i)es$/;
const SUFFIX_MULTI_CONSONANT_LIKE = /([^aeiouylsz])\1$/;
const STEP_2 = new RegExp(
'^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|' +
'ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|' +
'biliti|logi)$'
);
const STEP_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
const STEP_4 = new RegExp(
'^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|' +
'iti|ous|ive|ize)$'
);
/* Stem `value`. */
export function stemmer(value)
{
let firstCharacterWasLowerCaseY;
let match;
value = String(value).toLowerCase();
/* Exit early. */
if (value.length < 3)
{
return value;
}
/* Detect initial `y`, make sure it never
* matches. */
if (value.charCodeAt(0) === CC_Y)
{
firstCharacterWasLowerCaseY = true;
value = 'Y' + value.substr(1);
}
/* Step 1a. */
if (SUFFIX_SSES_OR_IES.test(value))
{
/* Remove last two characters. */
value = value.substr(0, value.length - 2);
} else if (SUFFIX_S.test(value))
{
/* Remove last character. */
value = value.substr(0, value.length - 1);
}
/* Step 1b. */
if ((match = SUFFIX_EED.exec(value)))
{
if (MEASURE_GT_0.test(match[1]))
{
/* Remove last character. */
value = value.substr(0, value.length - 1);
}
} else if (
(match = SUFFIX_ED_OR_ING.exec(value)) &&
VOWEL_IN_STEM.test(match[1])
)
{
value = match[1];
if (SUFFIX_AT_OR_BL_OR_IZ.test(value))
{
/* Append `e`. */
value += 'e';
} else if (
SUFFIX_MULTI_CONSONANT_LIKE.test(value)
)
{
/* Remove last character. */
value = value.substr(0, value.length - 1);
} else if (CONSONANT_LIKE.test(value))
{
/* Append `e`. */
value += 'e';
}
}
/* Step 1c. */
if ((match = SUFFIX_Y.exec(value)) && VOWEL_IN_STEM.test(match[1]))
{
/* Remove suffixing `y` and append `i`. */
value = match[1] + 'i';
}
/* Step 2. */
if ((match = STEP_2.exec(value)) && MEASURE_GT_0.test(match[1]))
{
value = match[1] + step2list[match[2]];
}
/* Step 3. */
if ((match = STEP_3.exec(value)) && MEASURE_GT_0.test(match[1]))
{
value = match[1] + step3list[match[2]];
}
/* Step 4. */
if ((match = STEP_4.exec(value)))
{
if (MEASURE_GT_1.test(match[1]))
{
value = match[1];
}
} else if ((match = SUFFIX_ION.exec(value)) && MEASURE_GT_1.test(match[1]))
{
value = match[1];
}
/* Step 5. */
if (
(match = SUFFIX_E.exec(value)) &&
(
MEASURE_GT_1.test(match[1]) ||
(MEASURE_EQ_1.test(match[1]) && !CONSONANT_LIKE.test(match[1]))
)
)
{
value = match[1];
}
if (SUFFIX_LL.test(value) && MEASURE_GT_1.test(value))
{
value = value.substr(0, value.length - 1);
}
/* Turn initial `Y` back to `y`. */
if (firstCharacterWasLowerCaseY)
{
value = 'y' + value.substr(1);
}
return value;
}

View File

@ -6,8 +6,12 @@ import { Http } from '@angular/http';
@Injectable()
export class WordService
{
wordToStem: Map<string> = {};
constructor(private http: Http)
{
this.getStemWordIndex();
}
normalizeQueryString(qry: string): string[]
@ -30,7 +34,7 @@ export class WordService
// Loop through each query term.
for (let q of qs)
{
const stem = stemmer(q);
const stem = this.wordToStem[q];
// For each query term, figure out which xml file it is in, and get it.
// getSearchRefs returns an array of references.
@ -76,6 +80,39 @@ export class WordService
return { word: qry, refs: shared, status: 0, msg: ':)' };
}
/**
* Gets the references a given word is found in.
* Returns a string[].
* @param {string} url - The url of the word index
* @param {string} query - The word to lookup.
*/
private getStemWordIndex()
{
// getSearchRefs takes a url and uses ajax to retrieve the references and returns an array of references.
let r: WordToStem[];
$.ajax({
async: false,
type: 'GET',
url: 'data/index/word_to_stem_idx.json',
dataType: 'json',
success(d: WordToStem[], t, x)
{
r = d;
},
error(request, status, error)
{
console.log(error);
}
});
// find the right word
for (let i of r)
{
this.wordToStem[i.w] = i.s;
}
}
/**
* Gets the references a given word is found in.
@ -294,7 +331,7 @@ export class WordService
words.unshift('zalmonah');
words.unshift('zenan');
words.unshift('ziphim');
words.unshift('zuzim');
words.unshift('zuzim');
return words;
}
@ -400,3 +437,9 @@ type IndexResult = {
r: string[];
w: string;
}
type WordToStem = { w:string, s: string}
interface Map<T>
{
[K: string]: T;
}

View File

@ -1,50 +0,0 @@
// Ionicons Icon Font CSS
// --------------------------
// Ionicons CSS for Ionic's <ion-icon> element
// ionicons-icons.scss has the icons and their unicode characters
$ionicons-font-path: $font-path !default;
@import "ionicons-icons";
@import "ionicons-variables";
@font-face {
font-family: "Ionicons";
src: url("#{$ionicons-font-path}/ionicons.woff2?v=#{$ionicons-version}") format("woff2"),
url("#{$ionicons-font-path}/ionicons.woff?v=#{$ionicons-version}") format("woff"),
url("#{$ionicons-font-path}/ionicons.ttf?v=#{$ionicons-version}") format("truetype");
font-weight: normal;
font-style: normal;
}
ion-icon {
display: inline-block;
font-family: "Ionicons";
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: 1;
text-rendering: auto;
text-transform: none;
speak: none;
@include rtl() {
&[aria-label^="arrow"]::before,
&[flip-rtl]::before {
transform: scaleX(-1);
}
&[unflip-rtl]::before {
transform: scaleX(1);
}
}
&::before {
display: inline-block;
}
}

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 391 KiB

View File

@ -1,34 +0,0 @@
// Noto Sans Font
// Google
// Apache License, version 2.0
// http://www.apache.org/licenses/LICENSE-2.0.html
$noto-sans-font-path: $font-path !default;
@font-face {
font-family: "Noto Sans";
font-style: normal;
font-weight: 300;
src: local("Noto Sans"), local("Noto-Sans-Regular"), url("#{$noto-sans-font-path}/noto-sans-regular.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-regular.ttf") format("truetype");
}
@font-face {
font-family: "Noto Sans";
font-style: normal;
font-weight: 400;
src: local("Noto Sans"), local("Noto-Sans-Regular"), url("#{$noto-sans-font-path}/noto-sans-regular.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-regular.ttf") format("truetype");
}
@font-face {
font-family: "Noto Sans";
font-style: normal;
font-weight: 500;
src: local("Noto Sans Bold"), local("Noto-Sans-Bold"), url("#{$noto-sans-font-path}/noto-sans-bold.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-bold.ttf") format("truetype");
}
@font-face {
font-family: "Noto Sans";
font-style: normal;
font-weight: 700;
src: local("Noto Sans Bold"), local("Noto-Sans-Bold"), url("#{$noto-sans-font-path}/noto-sans-bold.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-bold.ttf") format("truetype");
}

View File

@ -1,34 +0,0 @@
// Roboto Font
// Google
// Apache License, version 2.0
// http://www.apache.org/licenses/LICENSE-2.0.html
$roboto-font-path: $font-path !default;
@font-face {
font-family: "Roboto";
font-style: normal;
font-weight: 300;
src: local("Roboto Light"), local("Roboto-Light"), url("#{$roboto-font-path}/roboto-light.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-light.woff") format("woff"), url("#{$roboto-font-path}/roboto-light.ttf") format("truetype");
}
@font-face {
font-family: "Roboto";
font-style: normal;
font-weight: 400;
src: local("Roboto"), local("Roboto-Regular"), url("#{$roboto-font-path}/roboto-regular.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-regular.woff") format("woff"), url("#{$roboto-font-path}/roboto-regular.ttf") format("truetype");
}
@font-face {
font-family: "Roboto";
font-style: normal;
font-weight: 500;
src: local("Roboto Medium"), local("Roboto-Medium"), url("#{$roboto-font-path}/roboto-medium.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-medium.woff") format("woff"), url("#{$roboto-font-path}/roboto-medium.ttf") format("truetype");
}
@font-face {
font-family: "Roboto";
font-style: normal;
font-weight: 700;
src: local("Roboto Bold"), local("Roboto-Bold"), url("#{$roboto-font-path}/roboto-bold.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-bold.woff") format("woff"), url("#{$roboto-font-path}/roboto-bold.ttf") format("truetype");
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
[{"w":"sheepskin","r":["58:11:37"]},{"w":"sheet","r":["7:14:12","7:14:13","44:10:11","44:11:5"]},{"w":"shehariah","r":["13:8:26"]},{"w":"shekel","r":["1:23:15","1:23:16","1:24:22","2:21:32","2:30:13","2:30:15","2:30:23","2:30:24","2:38:24","2:38:25","2:38:26","2:38:28","2:38:29","3:5:15","3:27:3","3:27:4","3:27:5","3:27:6","3:27:7","3:27:16","3:27:25","4:3:47","4:3:50","4:7:13","4:7:14","4:7:19","4:7:20","4:7:25","4:7:26","4:7:31","4:7:32","4:7:37","4:7:38","4:7:43","4:7:44","4:7:49","4:7:50","4:7:55","4:7:56","4:7:61","4:7:62","4:7:67","4:7:68","4:7:73","4:7:74","4:7:79","4:7:80","4:7:85","4:7:86","4:18:16","4:31:52","5:22:19","5:22:29","6:7:21","7:8:26","7:17:2","7:17:3","7:17:4","7:17:10","9:9:8","9:17:5","9:17:7","10:14:26","10:18:11","10:18:12","10:21:16","10:24:24","11:10:16","11:10:29","12:7:1","12:7:16","12:7:18","12:15:20","13:21:25","14:1:17","14:3:9","14:9:15","14:9:16","16:5:15","16:10:32","24:32:9","26:4:10","26:45:12","30:8:5"]},{"w":"shelah","r":["1:38:5","1:38:11","1:38:14","1:38:26","1:46:12","4:26:20","13:1:18","13:1:24","13:2:3","13:4:21"]},{"w":"shelanit","r":["4:26:20"]},{"w":"shelemiah","r":["13:26:14","15:10:39","15:10:41","16:3:30","16:13:13","24:36:14","24:36:26","24:37:3","24:37:13","24:38:1"]},{"w":"sheleph","r":["1:10:26","13:1:20"]},{"w":"shelesh","r":["13:7:35"]},{"w":"shelomi","r":["4:34:27"]},{"w":"shelomith","r":["3:24:11","13:3:19","13:23:9","13:23:18","13:26:25","13:26:26","13:26:28","14:11:20","15:8:10"]},{"w":"shelomoth","r":["13:24:22"]},{"w":"shelter","r":["18:24:8","19:61:3"]},{"w":"shelumiel","r":["4:1:6","4:2:12","4:7:36","4:7:41","4:10:19"]},{"w":"shem","r":["1:5:32","1:6:10","1:7:13","1:9:18","1:9:23","1:9:26","1:9:27","1:10:1","1:10:21","1:10:22","1:10:31","1:11:10","1:11:11","13:1:4","13:1:17","13:1:24","42:3:36"]},{"w":"shema","r":["6:15:26","13:2:43","13:2:44","13:5:8","13:8:13","16:8:4"]},{"w":"shemaah","r":["13:12:3"]},{"w":"shemaiah","r":["11:12:22","13:3:22","13:4:37","13:5:4","13:9:14","13:9:16","13:15:8","13:15:11","13:24:6","13:26:4","13:26:6","13:26:7","14:11:2","14:12:5","14:12:7","14:12:15","14:17:8","14:29:14","14:31:15","14:35:9","15:8:13","15:8:16","15:10:21","15:10:31","16:3:29","16:6:10","16:10:8","16:11:15","16:12:6","16:12:18","16:12:34","16:12:35","16:12:36","16:12:42","24:26:20","24:29:24","24:29:31","24:29:32","24:36:12"]},{"w":"shemariah","r":["13:12:5","15:10:32","15:10:41"]},{"w":"shemeb","r":["1:14:2"]},{"w":"shemer","r":["11:16:24"]},{"w":"shemesh","r":["6:15:7","6:15:10","6:18:17","6:19:22","6:19:38","6:19:41","6:21:16","7:1:33","9:6:9","9:6:12","9:6:13","9:6:15","9:6:19","9:6:20","11:4:9","12:14:11","12:14:13","13:6:59","14:25:21","14:25:23","14:28:18","24:43:13"]},{"w":"shemida","r":["4:26:32","6:17:2","13:7:19"]},{"w":"shemidait","r":["4:26:32"]},{"w":"sheminith","r":["13:15:21","19:6:1","19:12:1"]},{"w":"shemiramoth","r":["13:15:18","13:15:20","13:16:5","14:17:8"]},{"w":"shemit","r":["9:6:14","9:6:18"]},{"w":"shemuel","r":["4:34:20","13:6:33","13:7:2"]},{"w":"shen","r":["9:7:12"]},{"w":"shenazar","r":["13:3:18"]},{"w":"shenir","r":["5:3:9","22:4:8"]},{"w":"shepham","r":["4:34:10","4:34:11"]},{"w":"shephathiah","r":["13:9:8"]},{"w":"shephatiah","r":["10:3:4","13:3:3","13:12:5","13:27:16","14:21:2","15:2:4","15:2:57","15:8:8","16:7:9","16:7:59","16:11:4","24:38:1"]},{"w":"shepherd","r":["1:46:32","1:46:34","1:47:3","1:49:24","2:2:17","2:2:19","4:27:17","9:17:40","9:25:7","11:22:17","14:18:16","19:23:1","19:80:1","21:12:11","22:1:8","23:13:20","23:31:4","23:38:12","23:40:11","23:44:28","23:56:11","23:63:11","24:6:3","24:23:4","24:25:34","24:25:35","24:25:36","24:31:10","24:33:12","24:43:12","24:49:19","24:50:6","24:50:44","24:51:23","26:34:2","26:34:5","26:34:7","26:34:8","26:34:9","26:34:10","26:34:12","26:34:23","26:37:24","30:1:2","30:3:12","33:5:5","34:3:18","36:2:6","38:10:2","38:10:3","38:11:3","38:11:5","38:11:8","38:11:15","38:11:16","38:11:17","38:13:7","40:9:36","40:25:32","40:26:31","41:6:34","41:14:27","42:2:8","42:2:15","42:2:18","42:2:20","43:10:2","43:10:11","43:10:12","43:10:14","43:10:16","58:13:20","60:2:25","60:5:4"]},{"w":"shephi","r":["13:1:40"]},{"w":"shepho","r":["1:36:23"]},{"w":"shephuphan","r":["13:8:5"]},{"w":"sherah","r":["13:7:24"]},{"w":"sherebiah","r":["15:8:18","15:8:24","16:8:7","16:9:4","16:9:5","16:10:12","16:12:8","16:12:24"]},{"w":"sheresh","r":["13:7:16"]},{"w":"sherez","r":["38:7:2"]},{"w":"sheriff","r":["27:3:2","27:3:3"]},{"w":"sheshach","r":["24:25:26","24:51:41"]},{"w":"sheshai","r":["4:13:22","6:15:14","7:1:10"]},{"w":"sheshan","r":["13:2:31","13:2:34","13:2:35"]},{"w":"sheshbazzar","r":["15:1:8","15:1:11","15:5:14","15:5:16"]},{"w":"sheth","r":["4:24:17","13:1:1"]},{"w":"shethar","r":["15:5:3","15:5:6","15:6:6","15:6:13","17:1:14"]},{"w":"sheva","r":["10:20:25","13:2:49"]}]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
[{"w":"zalmunna","r":["7:8:5","7:8:6","7:8:7","7:8:10","7:8:12","7:8:15","7:8:18","7:8:21","19:83:11"]},{"w":"zamzummim","r":["5:2:20"]},{"w":"zanoah","r":["6:15:34","6:15:56","13:4:18","16:3:13","16:11:30"]},{"w":"zaphnath","r":["1:41:45"]},{"w":"zaphon","r":["6:13:27"]},{"w":"zara","r":["40:1:3"]},{"w":"zarah","r":["1:38:30"]},{"w":"zare","r":["4:21:12"]},{"w":"zareah","r":["16:11:29"]},{"w":"zareathit","r":["13:2:53"]},{"w":"zarephath","r":["11:17:9","11:17:10","31:1:20"]},{"w":"zaretan","r":["6:3:16"]},{"w":"zareth","r":["6:13:19"]},{"w":"zarhit","r":["4:26:13","4:26:20","6:7:17","13:27:11","13:27:13"]},{"w":"zartanah","r":["11:4:12"]},{"w":"zarthan","r":["11:7:46"]},{"w":"zatthu","r":["16:10:14"]},{"w":"zattu","r":["15:2:8","15:10:27","16:7:13"]},{"w":"zavan","r":["13:1:42"]},{"w":"zaza","r":["13:2:33"]},{"w":"zeal","r":["10:21:2","12:10:16","12:19:31","19:69:9","19:119:139","23:9:7","23:37:32","23:59:17","23:63:15","26:5:13","43:2:17","45:10:2","47:7:11","47:9:2","50:3:6","51:4:13"]},{"w":"zealous","r":["4:25:11","4:25:13","44:21:20","44:22:3","46:14:12","48:1:14","48:4:17","48:4:18","56:2:14","66:3:19"]},{"w":"zebadiah","r":["13:8:15","13:8:17","13:12:7","13:26:2","13:27:7","14:17:8","14:19:11","15:8:8","15:10:20"]},{"w":"zebah","r":["7:8:5","7:8:6","7:8:7","7:8:10","7:8:12","7:8:15","7:8:18","7:8:21","19:83:11"]},{"w":"zebaim","r":["15:2:57","16:7:59"]},{"w":"zebede","r":["40:4:21","40:10:2","40:20:20","40:26:37","40:27:56","41:1:19","41:1:20","41:3:17","41:10:35","42:5:10","43:21:2"]},{"w":"zebina","r":["15:10:43"]},{"w":"zeboiim","r":["1:14:2","1:14:8"]},{"w":"zeboim","r":["1:10:19","5:29:23","9:13:18","16:11:34","28:11:8"]},{"w":"zebub","r":["12:1:2","12:1:3","12:1:6","12:1:16"]},{"w":"zebudah","r":["12:23:36"]},{"w":"zebul","r":["7:9:28","7:9:30","7:9:36","7:9:38","7:9:41"]},{"w":"zebulonit","r":["7:12:11","7:12:12"]},{"w":"zebulun","r":["1:30:20","1:35:23","1:46:14","1:49:13","2:1:3","4:1:9","4:1:30","4:1:31","4:2:7","4:7:24","4:10:16","4:13:10","4:26:26","4:34:25","5:27:13","5:33:18","6:19:10","6:19:16","6:19:27","6:19:34","6:21:7","6:21:34","7:1:30","7:4:6","7:4:10","7:5:14","7:5:18","7:6:35","7:12:12","13:2:1","13:6:63","13:6:77","13:12:33","13:12:40","13:27:19","14:30:10","14:30:11","14:30:18","19:68:27","23:9:1","26:48:26","26:48:27","26:48:33","40:4:13","40:4:15","66:7:8"]},{"w":"zebulunit","r":["4:26:27"]},{"w":"zechariah","r":["13:5:7","13:9:21","13:9:37","13:15:18","13:15:20","13:15:24","13:16:5","13:24:25","13:26:2","13:26:11","13:26:14","13:27:21","14:17:7","14:20:14","14:21:2","14:24:20","14:26:5","14:29:1","14:29:13","14:34:12","14:35:8","15:5:1","15:6:14","15:8:3","15:8:11","15:8:16","15:10:26","16:8:4","16:11:4","16:11:5","16:11:12","16:12:16","16:12:35","16:12:41","23:8:2","38:1:1","38:1:7","38:7:1","38:7:8","40:23:35"]},{"w":"zedad","r":["4:34:8","26:47:15"]},{"w":"zedek","r":["6:10:1","6:10:3"]},{"w":"zedekiah","r":["11:22:11","11:22:24","12:24:17","12:24:18","12:24:20","12:25:2","12:25:7","13:3:15","13:3:16","14:18:10","14:18:23","14:36:10","14:36:11","24:1:3","24:21:1","24:21:3","24:21:7","24:24:8","24:27:3","24:27:12","24:28:1","24:29:3","24:29:21","24:29:22","24:32:1","24:32:3","24:32:4","24:32:5","24:34:2","24:34:4","24:34:6","24:34:8","24:34:21","24:36:12","24:37:1","24:37:3","24:37:17","24:37:18","24:37:21","24:38:5","24:38:14","24:38:15","24:38:16","24:38:17","24:38:19","24:38:24","24:39:1","24:39:2","24:39:4","24:39:5","24:39:6","24:39:7","24:44:30","24:49:34","24:51:59","24:52:1","24:52:3","24:52:5","24:52:8","24:52:10","24:52:11"]},{"w":"zeeb","r":["7:7:25","7:8:3","19:83:11"]},{"w":"zelah","r":["6:18:28","10:21:14"]},{"w":"zelek","r":["10:23:37","13:11:39"]},{"w":"zelophehad","r":["4:26:33","4:27:1","4:27:7","4:36:2","4:36:6","4:36:10","4:36:11","6:17:3","13:7:15"]},{"w":"zelot","r":["42:6:15","44:1:13"]},{"w":"zelzah","r":["9:10:2"]},{"w":"zemaraim","r":["6:18:22","14:13:4"]},{"w":"zemarit","r":["1:10:18","13:1:16"]},{"w":"zemira","r":["13:7:8"]},{"w":"zena","r":["56:3:13"]},{"w":"zenan","r":["6:15:37"]}]

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
[{"w":"ziphion","r":["1:46:16"]},{"w":"ziphit","r":["9:23:19","9:26:1"]},{"w":"ziphron","r":["4:34:9"]},{"w":"zippor","r":["4:22:2","4:22:4","4:22:10","4:22:16","4:23:18","6:24:9","7:11:25"]},{"w":"zipporah","r":["2:2:21","2:4:25","2:18:2"]},{"w":"zithri","r":["2:6:22"]},{"w":"ziz","r":["14:20:16"]},{"w":"ziza","r":["13:4:37","14:11:20"]},{"w":"zizah","r":["13:23:11"]},{"w":"zoan","r":["4:13:22","19:78:12","19:78:43","23:19:11","23:19:13","23:30:4","26:30:14"]},{"w":"zoar","r":["1:13:10","1:14:2","1:14:8","1:19:22","1:19:23","1:19:30","5:34:3","23:15:5","24:48:34"]},{"w":"zoba","r":["10:10:6","10:10:8"]},{"w":"zobah","r":["9:14:47","10:8:3","10:8:5","10:8:12","10:23:36","11:11:23","11:11:24","13:18:3","13:18:5","13:18:9","13:19:6","14:8:3","19:60:1"]},{"w":"zobebah","r":["13:4:8"]},{"w":"zohar","r":["1:23:8","1:25:9","1:46:10","2:6:15"]},{"w":"zoheleth","r":["11:1:9"]},{"w":"zoheth","r":["13:4:20"]},{"w":"zophah","r":["13:7:35","13:7:36"]},{"w":"zophai","r":["13:6:26"]},{"w":"zophar","r":["18:2:11","18:11:1","18:20:1","18:42:9"]},{"w":"zophim","r":["4:23:14","9:1:1"]},{"w":"zorah","r":["6:19:41","7:13:2","7:13:25","7:16:31","7:18:2","7:18:8","7:18:11","14:11:10"]},{"w":"zorathit","r":["13:4:2"]},{"w":"zoreah","r":["6:15:33"]},{"w":"zorit","r":["13:2:54"]},{"w":"zorobabel","r":["40:1:12","40:1:13","42:3:27"]},{"w":"zuar","r":["4:1:8","4:2:5","4:7:18","4:7:23","4:10:15"]},{"w":"zuph","r":["9:1:1","9:9:5","13:6:35"]},{"w":"zur","r":["4:25:15","4:31:8","6:13:21","6:15:58","13:2:45","13:8:30","13:9:36","14:11:7","16:3:16"]},{"w":"zuriel","r":["4:3:35"]},{"w":"zurishaddai","r":["4:1:6","4:2:12","4:7:36","4:7:41","4:10:19"]},{"w":"zuzim","r":["1:14:5"]}]

View File

@ -17,8 +17,10 @@ namespace DynamicBibleUtility
{
public partial class frmMain : Form
{
private readonly List<string> _words = new List<string>();
private readonly HashSet<string> _stems = new HashSet<string>();
private readonly HashSet<string> _words = new HashSet<string>();
private readonly Index _idx = new Index();
private readonly List<WordToStem> _wsIdx = new List<WordToStem>();
public frmMain()
{
@ -45,11 +47,19 @@ namespace DynamicBibleUtility
#region Index
private class WordToStem
{
public string w = "";
public string s = "";
}
private void AddWordToIndex(string s, string bk, string ch, string vs)
{
s = s.Trim().ToLower().TrimEnd(_trims).TrimStart(_trims).Replace("'", "");
if (s != "" && !_exclusions.Contains(s))
{
var original = s;
var st = new EnglishStemmer();
st.SetCurrent(s);
if (st.Stem())
@ -57,10 +67,16 @@ namespace DynamicBibleUtility
s = st.GetCurrent();
}
// add the word to the index
if (!_words.Contains(s))
if (!_words.Contains(original))
{
_words.Add(s);
_wsIdx.Add(new WordToStem { s = s, w = original });
_words.Add(original);
}
// add the word to the index
if (!_stems.Contains(s))
{
_stems.Add(s);
var i = new IndexItem { w = s };
i.r.Add(bk + ":" + ch + ":" + vs);
_idx.Add(i);
@ -79,7 +95,7 @@ namespace DynamicBibleUtility
private void CreateIndex_Click(object sender, EventArgs e)
{
_idx.Clear();
_words.Clear();
_stems.Clear();
txtStatus.Text = "";
var _thread = new Thread(CreateIndex);
@ -178,15 +194,18 @@ namespace DynamicBibleUtility
}
}
}
UpdateStatus("Book: " + bk.bnumber + ", Word Count: " + _words.Count + "\r\n");
UpdateStatus("Book: " + bk.bnumber + ", Word Count: " + _stems.Count + "\r\n");
}
File.WriteAllLines("word_list", _words);
File.WriteAllLines("word_list", _stems);
var fbd = new FolderBrowserDialog();
if (fbd.ShowDialog() == DialogResult.OK)
{
_idx.Sort(CompareIndexByWord);
_wsIdx.Sort((x, y) => x.w.CompareTo(y.w));
File.WriteAllText(fbd.SelectedPath + @"\word_to_stem_idx.json", JSON.Serialize(_wsIdx));
var tmp = new Index();
int i;
for (i = 0; i < _idx.Count; i++)