-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Design and define the logic for calculating the GL quote #167
Comments
NotesBelow find the USFM and JSON for the English UST for the example reference (1PE 1:1). The process is roughly as follows:
{
content: "I am Peter",
occurrence: "1"
} Here is the USFM from 1PE 1:1.
Here is the corresponding JSON: {
"1": {
"1": {
"verseObjects": [
{
"type": "text",
"text": "{"
},
{
"tag": "zaln",
"type": "milestone",
"strong": "G40740",
"lemma": "πέτρος",
"morph": "Gr,N,,,,,NMS,",
"occurrence": "1",
"occurrences": "1",
"content": "Πέτρος",
"children": [
{
"text": "I",
"tag": "w",
"type": "word",
"occurrence": "1",
"occurrences": "3"
},
{
"type": "text",
"text": " "
},
{
"text": "am",
"tag": "w",
"type": "word",
"occurrence": "1",
"occurrences": "3"
},
{
"type": "text",
"text": "} "
},
{
"text": "Peter",
"tag": "w",
"type": "word",
"occurrence": "1",
"occurrences": "1"
}
],
"endTag": "zaln-e\\*" |
In case it is useful, here is a little node.js script to convert USFM to JSON: import usfmjs from 'usfm-js';
import { readFile, writeFile } from 'fs';
let testinput = '1pe_usfm.txt';
let jsoninput;
let chapters;
readFile(testinput, (err, data) => {
if (err) throw err;
let s = ""+data;
jsoninput = usfmjs.toJSON(s);
chapters = jsoninput.chapters;
writeFile(testinput+".json",JSON.stringify(chapters, undefined, 4),
function(err) {
if (err) {
return console.log(err);
}
}
);
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sketched out the essentials for the quote package (the single word use case only):
Where values are mentioned, they come from the TN for 1PE 1:1, id=g6b4.
This use case is for a single original word, not phrases or ellipses.
Prerequisites
Notable Conditions
Inputs
Returns
An object with the following properties:
The text was updated successfully, but these errors were encountered: