scripture-guide 1.0.34 → 1.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/scriptdetect.js +3 -2
- package/data/scriptlang.js +4 -2
- package/data/scriptregex.js +2 -2
- package/package.json +1 -1
- package/test/data/en.txt +2 -0
- package/test/data/ko.txt +6 -1
package/data/scriptdetect.js
CHANGED
|
@@ -32,7 +32,7 @@ const findMatches = (content,books,lang_extra) => {
|
|
|
32
32
|
|
|
33
33
|
const preBookMatch = lang_extra.book || `(First|I|1|1st|Second|II|2|2nd|Third|III|3|3rd|Fourth|IV|4|4th)*\\s*(books* of)*\\s*`;
|
|
34
34
|
const matchingBooks = findMatchingBooks(content,books);
|
|
35
|
-
const postBookMatch = lang_extra.chapter || "([0-9
|
|
35
|
+
const postBookMatch = lang_extra.chapter || "([0-9:.;,~ —–-])*[0-9]+";
|
|
36
36
|
const matchesWithReferences = matchingBooks.map(bookMatch=>{
|
|
37
37
|
const patternString = preBookMatch + bookMatch + postBookMatch;
|
|
38
38
|
const pattern = (new RegExp(patternString,"ig"));
|
|
@@ -47,7 +47,8 @@ const findMatches = (content,books,lang_extra) => {
|
|
|
47
47
|
// Also remove duplicates that may have been created by the postBookMatch
|
|
48
48
|
return matchesWithReferences.map(string=>{
|
|
49
49
|
const pattern = (new RegExp(string,"ig"));
|
|
50
|
-
const
|
|
50
|
+
const tail = lang_extra.tail || /[^0-9]+$/;
|
|
51
|
+
const matches = content.match(pattern)?.map(i=>i.trim().replace(tail,""));
|
|
51
52
|
return matches;
|
|
52
53
|
}).flat()
|
|
53
54
|
.reduce((prev,current)=>{
|
package/data/scriptlang.js
CHANGED
|
@@ -4,6 +4,7 @@ module.exports = {
|
|
|
4
4
|
pre_rules: [
|
|
5
5
|
//handle 1장 2절-3절
|
|
6
6
|
//turn 30 장 10 절 into 30장 10절
|
|
7
|
+
["부터", "-"],
|
|
7
8
|
["(\\d+)\\s*장\\s*(\\d+)(?:~|-)(\\d+)\\s*절*", "$1:$2-$3"],
|
|
8
9
|
["(비교|또는*|그리고)", ";"],
|
|
9
10
|
//handle 1장 2절
|
|
@@ -31,9 +32,10 @@ module.exports = {
|
|
|
31
32
|
],
|
|
32
33
|
matchRules:{
|
|
33
34
|
book: "(제[0-9]+)*",
|
|
34
|
-
chapter:"([0-9
|
|
35
|
+
chapter:"([장절0-9:;,~\\s—–-]|부터)*[0-9장절]+",
|
|
35
36
|
verse:"절",
|
|
36
|
-
joiners: ["^[;, ]*(또는*|그리고|비교)*$",
|
|
37
|
+
joiners: ["^[;, ]*(또는*|그리고|비교)*$"],
|
|
38
|
+
tail: "[장절0-9]+"
|
|
37
39
|
},
|
|
38
40
|
},
|
|
39
41
|
de:{
|
package/data/scriptregex.js
CHANGED
|
@@ -181,7 +181,6 @@ module.exports = {
|
|
|
181
181
|
["jst(,| of )", "JST "],
|
|
182
182
|
["jst([a-z])", "JST $1"],
|
|
183
183
|
[",\\s*((?:\\d+\\s)*[a-z])", "; $1"],
|
|
184
|
-
["\\b\\s*cf\\.*\\s*\\b", "; "],
|
|
185
184
|
["\\bv*ve*r*s*e*s*\\s*([0-9])", ":$1"],
|
|
186
185
|
["(, *)*\\bverses*\\s*([0-9])", ":$1"],
|
|
187
186
|
["\\s*:", ":"],
|
|
@@ -194,7 +193,8 @@ module.exports = {
|
|
|
194
193
|
["o([nf])", "o$1"],
|
|
195
194
|
["([;,])", "$1 "],
|
|
196
195
|
["(the )*book of", ""],
|
|
197
|
-
[",\\s*([0-9]+)\\s*:", "; $1:"]
|
|
196
|
+
[",\\s*([0-9]+)\\s*:", "; $1:"],
|
|
197
|
+
["\\b\\s*cf[:.]*\\s*\\b", " "]
|
|
198
198
|
],
|
|
199
199
|
|
|
200
200
|
"post_rules":[
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scripture-guide",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"description": "A utility for biblical and scripture reference parsing that enables structured queries based on strings of traditional scripture references (e.g. John 3:16). ",
|
|
5
5
|
"main": "scriptures-compiled.js",
|
|
6
6
|
"scripts": {
|
package/test/data/en.txt
CHANGED
|
@@ -4,3 +4,5 @@ Thank you for sharing your word thoughts, Lyndon. It’s fascinating to explore
|
|
|
4
4
|
It talks about the consequences of the fall of Adam and Eve. Before the fall, if they had not partaken of the forbidden fruit, they would have remained in a state of innocence and ignorance, without experiencing the joy and blessings that come from knowing good and evil (II Nephi 2:23). However, Heavenly Father, in His wisdom, allowed Adam to fall so that mankind could be created and experience the fullness of joy (2 Nephi 2:25). This passage is connected to other scriptures such as Genesis 3:16 and Moses 5:11, which further explain the consequences of the fall. In Genesis 3:16, Eve is told that because of the fall, she will experience sorrow in childbirth, indicating that the ability to have children is a result of the fall. In Moses 5:11, Eve expresses her gratitude for the fall, recognizing that without it, she and Adam would not have had children or known the joy of redemption. Understanding this passage helps us comprehend the purpose of life and the role of the fall in enabling us to experience joy and progression.
|
|
5
5
|
See John3:16 and, but not First John 1:9 for the same concept of the fall and the atonement.
|
|
6
6
|
The fruit mentioned in 1 Nephi 8:9-12 represents something desirable and joyous. It is described as being sweet and white, surpassing any other fruit in its goodness and purity. In the book of Genesis, there is mention of the tree of life and the tree of the knowledge of good and evil (Genesis 2:9, 3:6). These trees represent different choices and paths that humans can take. The fruit in Lehi’s dream could be seen as a representation of the blessings and joy that come from choosing the path of righteousness and partaking of the goodness of God. In the book of Revelation, there are references to the tree of life as well (Revelation 2:7, 22:2). This tree is associated with eternal life and the blessings of God. So, the fruit in Lehi’s dream may also symbolize the blessings of eternal life and joy that come from following the teachings of Jesus Christ.
|
|
7
|
+
In accordance with David’s last words at 2 Sam 23.3 (cf. Mos 23.8; 29.16). The Davidic reference may have been included as a conciliatory gesture to his descendants among the Mulekites. The reading in P (“thereby”) implies that keeping the commandments leads to rejoicing and love.
|
|
8
|
+
*As Jacob’s priestly lineage comes to an end, the transferal of the plates to Benjamin means that both the Large and Small Plates of Nephi are in the possession of the Nephite kings; cf. WoM 1.10. Amaleki’s reference to spiritual gifts and his assertion about the sources of good and evil will be repeated at Moro 7.12, 16–17; 10.13–16; cf. Alma 5.40. The order of gifts listed generally reflects 1 Cor 12.10.
|
package/test/data/ko.txt
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
1836년, 커틀랜드 성전에 나타난 선지자 모세는 이스라엘 민족의 집합을 인도하도록 그 권능과 권세를 조셉 스미스에게 주었다.(교리와 성약 110:11 참조) 그때 이후로 항상 선지자들은 이스라엘 민족을 집합하기 위한 열쇠를 소유했고, 집합은 교회 사업에서 중요한 부분이 되어 왔다. 성약의 백성은 이제 그들이 회복된 복음을 받아들이고 아브라함과 이삭과 야곱의 하나님을 섬김으로써 집합되고 있다.(신명기 30:1~5 참조)
|
|
2
|
-
이스라엘 백성은 먼저 영적으로 집합되며, 그런 다음에는 실제로 집합될 것이다. 그들은 예수 그리스도 후기 성도 교회에 가입하고 성스러운 성약을 맺고 지킬 때 영적으로 집합된다. 이 영적인 집합은 선지자 조셉 스미스 시대 때부터 시작되었으며, 오늘날 세계 도처에서 계속되고 있다. 교회로 개종한 사람들은 혈통으로, 또는 입양된 이스라엘 민족이다. 그들은 아브라함과 야곱의 가계에 속한다.(아브라함서 2:9~11; 비교 갈라디아서 3:26~29)
|
|
2
|
+
이스라엘 백성은 먼저 영적으로 집합되며, 그런 다음에는 실제로 집합될 것이다. 그들은 예수 그리스도 후기 성도 교회에 가입하고 성스러운 성약을 맺고 지킬 때 영적으로 집합된다. 이 영적인 집합은 선지자 조셉 스미스 시대 때부터 시작되었으며, 오늘날 세계 도처에서 계속되고 있다. 교회로 개종한 사람들은 혈통으로, 또는 입양된 이스라엘 민족이다. 그들은 아브라함과 야곱의 가계에 속한다.(아브라함서 2:9~11; 비교 갈라디아서 3:26~29)
|
|
3
|
+
이 문구는 니파이전서 1장 19장 ~20절에서 나타나는 중요한 구절입니다. 여기에서 리하이는 유대인들이 거부하는 성경의 예언과 참된 말씀을 증거하고 있습니다. 이 증거는 오심과 구속에 대한 진리를 명확하게 보여줍니다. 이 문구와 관련하여 몇 가지 경전 구절을 함께 살펴볼 수 있습니다. 예를 들어, 니파이전서 2장 13절에서는 선지자들이 예루살렘의 멸망을 예언하고 있으며, 예루살렘의 시민들이 이를 거부하였습니다. 이는 리하이가 경고하는 내용과 유사한 상황입니다. 또한 이 경전 구절과 관련하여 에스겔 5장 6절에서는 예루살렘의 죄악과 하나님의 규례를 거역함으로써 멸망이 초래되었다는 것을 알 수 있습니다. 이러한 구절들을 통해 우리는 하나님의 경고와 증거를 거부하고 악을 행하는 행위가 어떻게 결과를 초래할 수 있는지 배울 수 있습니다. 이는 우리에게 의미 있는 교훈을 제공합니다. 우리는 하나님의 말씀을 경청하고 그에 대한 믿음을 갖는 것이 중요하며, 악을 피하는 선택을 할 때 하나님의 인도와 축복을 경험할 수 있습니다. 그러므로, 이 구절은 오심과 구속에 대한 증거를 제시하면서도 우리에게 하나님의 경고를 듣고 따르는 중요성을 상기시키는 역할을 합니다. 이를 통해 우리는 하나님의 인도하심과 구원의 능력을 경험할 수 있게 됩니다. (참고 경전 구절: 니파이전서 2장 13절, 에스겔 5장 6절)
|
|
4
|
+
이것은 내가 원하는 답변이 아니야. 내가 원하는 답변은 이더서 6장 25절부터 8장 3절까지 왕국을 통치한 왕들을 순서대로 나열한 것이야. 모른다면 모른다고 답변해줘
|
|
5
|
+
코호어는 노아의 아들로서, 이더서 7장 19절에서 언급되는 인물입니다. 이 문구에서는 코호어가 노아의 왕국을 건설하였으며, 슐 왕을 이기지 못하고 슐 왕의 통치 하에 있는 백성들이 번영하고 강대해졌다고 언급됩니다. 이는 야렛인들의 역사에서 코호어와 슐의 통치의 중요한 사건이었습니다. 이더서 7장 19절은 야렛인들의 왕국과 그들의 지배자들 간의 관계와 세력 다툼을 다루고 있습니다. 이를 통해 야렛인들의 역사에서 권력과 반란, 그리고 번영과 강대함에 대한 이야기를 볼 수 있습니다. 이 문구는 야렛인들의 역사와 그들의 왕국 건설에 관한 중요한 사건을 언급하고 있으며, 이를 통해 우리는 권력과 그에 따른 결과에 대해 생각해 볼 수 있습니다.
|
|
6
|
+
시드기야는 유다 왕국의 마지막 왕입니다. 이 경전 구절에서는 시드기야의 재임 기간 동안 많은 선지자들이 나와서 예루살렘의 멸망을 경고했다는 것을 볼 수 있습니다. 이는 하나님의 경고와 예언으로써, 백성들에게 회개하고 바뀌어야 함을 알리는 것이었습니다. 이와 관련하여 니파이후서 1장 4절에서는 예루살렘이 멸망하게 될 것이라고 예언한 선지자들의 경고가 언급되었습니다. 이는 예루살렘의 멸망을 예언한 예레미야 선지자와도 연결됩니다 (힐라맨서 8장 20절). 이러한 경고와 예언들은 백성들에게 하나님의 은혜를 받으려면 회개하고 순종해야 한다는 중요한 가르침을 전합니다. 이를 통해 우리는 예루살렘의 멸망을 경계하는 이야기에서 하나님의 은혜와 진리를 찾아볼 수 있습니다.
|
|
7
|
+
죄송합니다. 간단히 말씀드리겠습니다. 시드기야는 유다 왕국의 마지막 왕이었어요. 이 구절에서는 시드기야의 재임 기간 동안 많은 선지자들이 나와서 예루살렘의 멸망을 경고했어요. 이는 하나님께서 백성들에게 회개하고 바뀌어야 한다는 메시지를 전하기 위한 것이었습니다. 니파이후서 1장 4절에서는 예루살렘이 멸망할 것이라고 예언한 선지자들의 경고가 언급되어요. 이는 예레미야 선지자와도 관련이 있어요 (힐라맨서 8장 20절). 이러한 경고와 예언들은 백성들에게 하나님의 은혜를 받기 위해서는 회개하고 순종해야 한다는 중요한 가르침을 전해줍니다. 이 이야기를 통해 우리는 하나님의 은혜와 진리를 배울 수 있어요.
|