sedrajs
v1.2.9
Published
Scripts to convert SEDRA 3 text database to JavaScript
Downloads
13
Maintainers
Readme
Sedrajs - A JavaScript representation of SEDRA 3 database
Sedrajs project uses Node.js scripts to convert Sedra 3 text file database to a JavaScript representation. CAL ASCII transliteration is used for Aramaic words and roots.
Installation
In order to use this library, Node.js should be installed. Then run:
npm install sedrajs --save
Sedrajs JS database files are not available for distribution, by design.
Only the un-modified Sedra 3 database files and the conversion scripts are
packaged. You have to run the conversion scripts, by running the command above.
That will convert Sedra 3 text database and place it in your node_modules
folder as:
sedrajs.esm.js
- An ES6 module, suitable for use with module bundlers likerollup
orwebpack
.sedrajs.js
- A general UMD bundle, suitable for use in any environment (Web browser, Node.js, etc.)sedra
folder -roots.js
,lexemes.js
,words.js
,english.js
etymology.js
andubs.js
separated ES6 modules.
The conversion scripts are stored in build/convert
directory as:
convert.js
- Un-minified cjs node script.convert.min.js
- Minified cjs node scriptconvert.mjs
- ES6 mjs node script - can be run with Node.js 8 and higher
The conversion script package could also be downloaded directly from: https://registry.npmjs.org/sedrajs/-/sedrajs-1.2.9.tgz
More information
License
Conversion scripts are covered by MIT license. But the SEDRA 3 database use is restricted according to the terms mentioned below:
For additional information on the structure of the Database, see
G. Kiraz, `Automatic Concordance Generation of Syriac Texts',
in VI Symposium Syriacum 1992, ed. R. Lavenant, Orientalia
Christiana Analecta 247, Rome, 1994.
You are allowed to use SEDRA III for personal and academic
purposes provided that:
1. You do NOT redistribute any altered versions of the files.
2. You do NOT redistribute any files for any kind of profit.
3. You acknowledge in any publication whose results make use of
SEDRA III, by any means, using a formula similar to the
following:
"This work makes use of the Syriac Electronic Data
Retrieval Archive (SEDRA) by George A. Kiraz, distributed
by the Syriac Computing Institute."
You should also cite the paper mentioned above.
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 or
Development
npm install
npm run build
Sedra.js API Reference
For the structure of Root
, Lexeme
, Word
, English
and Etymology
types
see Sedra Model
sedrajs.roots : Array.<Root>
Array of Root objects created from Sedra 3 root records
Kind: static constant of sedrajs
sedrajs.lexemes : Array.<Lexeme>
Array of Lexeme objects created from Sedra 3 lexeme records
Kind: static constant of sedrajs
sedrajs.words : Array.<Word>
Array of Word objects created from Sedra 3 word records
Kind: static constant of sedrajs
sedrajs.english : Array.<English>
Array of English objects created from Sedra 3 english records
Kind: static constant of sedrajs
sedrajs.etymology : Array.<Etymology>
Array of Etymology objects created from Sedra 3 etymology records
Kind: static constant of sedrajs
sedrajs.ubs : Object
A hierarchical object with books as first level keys, with chapters objects under each book, then verse objects under each chapter and word id arrays as leaves, referencing the actual content for each book.
Kind: static constant of sedrajs
Conversion script API
- convert
- .convertDb ⇒ Promise
- .readDb(db, converter) ⇒ Promise.<(string|object)>
- .writeDb(filePath, content) ⇒ Promise
- .converter ⇒ string | object
convert.convertDb ⇒ Promise
Read all of Sedra 3 text database and convert it to JavaScript
Kind: static constant of convert
Returns: Promise - Promise for JavaScript database
convert.readDb(db, converter) ⇒ Promise.<(string|object)>
Read Sedra db file asynchronously and returns converted content promise
Kind: static method of convert
Returns: Promise.<(string|object)> - Converted content promise
| Param | Type | Description | | --- | --- | --- | | db | string | Sedra text database file name | | converter | converter | Content converter |
convert.writeDb(filePath, content) ⇒ Promise
Write content asynchronously and return promise
Kind: static method of convert
Returns: Promise - File write promise
| Param | Type | Description | | --- | --- | --- | | filePath | string | File path to write to | | content | converter | File content to save |
convert.converter ⇒ string | object
Sedra db content converter: callback to transform content read from disk.
Kind: static typedef of convert
Returns: string | object - Converted content
| Param | Type | Description | | --- | --- | --- | | content | string | Sedra db text file content |