sedra-parse

1.1.8 • Public • Published

sedra-parse

npm version npm module downloads Build Status License: MIT Dependency Status Coverage Status Gitter

Parse Sedra 3 text database records and return their JavaScript representation

Installation

In order to use this library, Node.js should be installed. Then run:

npm install sedra-parse --save

Following bundles are available:

  • sedra-parse.js - UMD ES5 version for use in browser, node, etc.
  • sedra-parse.min.js - minified version of sedra-parse.js
  • sedra-parse.esm.js - ES6 module version, suitable for bundling with other libraries and applications

The package could also be downloaded directly from: https://registry.npmjs.org/sedra-parse/-/sedra-parse-1.1.8.tgz

More information

Peshitta App

Beth Mardutho

CAL

License

MIT

Contributing

The final goal for this work is to learn the Word of God as recorded by Peshitta. You are welcomed to improve this implementation or provide feedback. Please feel free to Fork, create a Pull Request or submit Issues.

To read quick updates about Peshitta app or post questions or feedback, follow @peshittap at @peshittapor Gitter

Development

npm install
npm run build

API Reference

sedraParse.getRoots(content) ⇒ string

Build roots javascript from root records e.g. 0:2,"AB","ab |A",0

Kind: static method of sedraParse
Returns: string - JavaScript root representation

Param Type Description
content string Sedra root records

sedraParse.getLexemes(content) ⇒ string

Build lexemes javascript from lexeme records e.g. 1:2,0:2,"ABA",41960448,16

Kind: static method of sedraParse
Returns: string - Lexeme javascript records

Param Type Description
content string Lexeme text records

sedraParse.getWords(content) ⇒ string

Build word JavaScript from word records e.g. 2:31070,1:2055,"DMSBRNOTA","D'aMSaB'RoNuOT,oA",6915072,128

Kind: static method of sedraParse
Returns: string - Word JavaScript records

Param Type Description
content string Word text records

sedraParse.getEnglish(content) ⇒ string

Build english javascript from english records e.g. 3:165,1:97,"cause","without","","",0,0

Kind: static method of sedraParse
Returns: string - English JavaScript content

Param Type Description
content string English text content

sedraParse.getEtymology(content) ⇒ object

Build etymology JavaScript from etymology records e.g. 4:10,1:75,"eu\310",5

Kind: static method of sedraParse
Returns: object - Etymology JavaScript records + reference

Param Type Description
content string Etymology text file records

sedraParse.getUbs(content) ⇒ object

Build Ubs JavaScript from ubs records e.g. 0:8,520100108,33554599,36 and index to reference map. To get verse only index -> reference, filter out entries where verse is 0.

Kind: static method of sedraParse
Returns: object - { ubs, reference } JavaScript

Param Type Description
content string Ubs text database records

sedraParse~rootRegex : RegExp

Regex to remove ids from root rows and extract relevant information

Kind: inner constant of sedraParse

sedraParse~lexemeRegex : RegExp

Regex to remove ids from lexeme records and extract relevant information

Kind: inner constant of sedraParse

sedraParse~wordRegex : RegExp

Regex to remove ids from word records and extract wanted information

Kind: inner constant of sedraParse

sedraParse~noYRegex : RegExp

Regex to find vocalized words with i vowels without supporting y

Kind: inner constant of sedraParse

sedraParse~noWRegex : RegExp

Regex to find vocalized words with u vowels without supporting w

Kind: inner constant of sedraParse

sedraParse~parseWords ⇒ object

Remove id from word file as id will be given by the position in the array. Word file has 432 gaps with largest ones being 45 (see sedrajs unit tests).

Kind: inner constant of sedraParse
Returns: object - hash of parsed word records and no Y/W words

Param Type Description
content string Input word records

sedraParse~englishRegex : RegExp

Regex to remove ids from english records and extract relevant information only

Kind: inner constant of sedraParse

sedraParse~etymologyRegex : RegExp

Regex to remove ids from etymology records and extract useful info only

Kind: inner constant of sedraParse

sedraParse~parseEtymology ⇒ object

Remove id from etymology records as id will be given by the array position. Etymology file has 3 gaps but difference is 1 only (see sedrajs unit tests).

Kind: inner constant of sedraParse
Returns: object - Parsed etymology content + reference

Param Type Description
content string Input etymology text records

sedraParse~ubsRegex : RegExp

Regex to remove ids from Ubs records and extract parsed information book - Left 2 digits represent the book (52=Matt, 53=Mark, 54=Luke, etc.) chapter - Next 2 digits = chapter verse - Next 3 digits = verse index - Next 2 digits = word wordId - the two most significant bits are always 02 which represents the database file number

Kind: inner constant of sedraParse

sedraParse~buildUbs ⇒ Object

Build parsed Usb object from the ubsRegex match

Kind: inner constant of sedraParse
Returns: Object - object created from match result

Param Type Description
match Object regex match result

sedraParse~parseUbs ⇒ Object

Remove id from Ubs records as it is not being used and it is also messed up - it overflows and becomes negative a number of times. To get verse only index -> reference, filter out entries with verse as 0.

Kind: inner constant of sedraParse
Returns: Object - Parsed JavaScript Ubs/reference records

Param Type Description
content string Input Ubs text records

Package Sidebar

Install

npm i sedra-parse

Weekly Downloads

1

Version

1.1.8

License

MIT

Last publish

Collaborators

  • peshitta