npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sedra-model

v1.2.0

Published

Sedra models and related utility functions

Downloads

17

Readme

sedra-model

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

Sedra models and related utility functions

Installation

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

npm install sedra-model --save

Following bundles are available:

  • sedra-model.js - UMD ES5 version for use in browser, node, etc.
  • sedra-model.min.js - minified version of sedra-model.js
  • sedra-model.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-model/-/sedra-model-1.2.0.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

sedraModel.wordType : Array.<string>

Word Type enumeration

Kind: static constant of sedraModel

sedraModel.vowel : Array.<string>

Vowel enumeration

Kind: static constant of sedraModel

sedraModel.wordNumber : Array.<string>

Word Number enumeration

Kind: static constant of sedraModel

sedraModel.wordGender : Array.<string>

Word Gender enumeration

Kind: static constant of sedraModel

sedraModel.wordForm : Array.<string>

Word Form enumeration

Kind: static constant of sedraModel

sedraModel.lexemeGrammaticalCategory : Array.<string>

Lexeme Grammatical Category enumeration

Kind: static constant of sedraModel

sedraModel.lexemeFirstSuffix : Array.<string>

Lexeme First Suffix enumeration

Kind: static constant of sedraModel

sedraModel.lexemeSecondSuffix : Array.<string>

Second Second Suffix enumeration

Kind: static constant of sedraModel

sedraModel.lexemeThirdSuffix : Array.<string>

Lexeme Third Suffix enumeration

Kind: static constant of sedraModel

sedraModel.lexemePrefix : Array.<string>

Lexeme Prefix enumeration

Kind: static constant of sedraModel

sedraModel.lexemeRadicalType : Array.<string>

Lexeme Radical Type enumeration

Kind: static constant of sedraModel

sedraModel.lexemeForm : Array.<string>

Lexeme Form enumeration

Kind: static constant of sedraModel

sedraModel.wordSuffixGender : Array.<string>

Word Suffix Gender enumeration

Kind: static constant of sedraModel

sedraModel.wordSuffixPerson : Array.<string>

Word Suffix Person enumeration

Kind: static constant of sedraModel

sedraModel.wordSuffixNumber : Array.<string>

Word Suffix Number enumeration

Kind: static constant of sedraModel

sedraModel.wordSuffixType : Array.<string>

Word Suffix Type enumeration

Kind: static constant of sedraModel

sedraModel.wordPerson : Array.<string>

Word Person enumeration

Kind: static constant of sedraModel

sedraModel.wordState : Array.<string>

Word State enumeration

Kind: static constant of sedraModel

sedraModel.wordTense : Array.<string>

Word Tense enumeration

Kind: static constant of sedraModel

sedraModel.textPosition : Array.<string>

Text position enumeration

Kind: static constant of sedraModel

sedraModel.fontType : Array.<string>

Font type enumeration

Kind: static constant of sedraModel

sedraModel.verbType : Array.<string>

Verb type enumeration

Kind: static constant of sedraModel

sedraModel.etymologyLanguage : Array.<string>

Etymology Language enumeration

Kind: static constant of sedraModel

sedraModel.books : Array.<string>

Peshitta books

Kind: static constant of sedraModel

sedraModel.peshittaBooks : Array.<Book>

Peshitta books sorted according to Eastern Peshitta ordering

Kind: static constant of sedraModel

sedraModel.bookGroups : Object

Eastern New Testament Peshitta book groups

Kind: static constant of sedraModel

sedraModel.makeRoot(root, sort, attributes) ⇒ Root

Root records, e.g. 0:2,"AB","ab |A",0 Id is the position in the containing array so it is not stored

Kind: static method of sedraModel
Returns: Root - Sedra Root row

| Param | Type | Description | | --- | --- | --- | | root | string | e.g. "AB" | | sort | string | e.g. "ab |A" | | attributes | number | 16-bit map |

sedraModel.makeRootAttribute(seyame, rootType) ⇒ RootAttribute

Build Root Attribute object

Kind: static method of sedraModel
Returns: RootAttribute - Root Attribute object

| Param | Type | Description | | --- | --- | --- | | seyame | boolean | true if root has seyame | | rootType | string | word type enumeration |

sedraModel.getRootAttribute(attributes) ⇒ RootAttribute

Get Root Attribute object from root attribute bit map

Kind: static method of sedraModel
Returns: RootAttribute - Root Attribute object

| Param | Type | Description | | --- | --- | --- | | attributes | number | 16-bit map |

sedraModel.getRoot(id, root) ⇒ FlatRoot

Return flatten root object with parsed attribute values

Kind: static method of sedraModel
Returns: FlatRoot - the flatten root model

| Param | Type | Description | | --- | --- | --- | | id | number | the id of current root object | | root | Root | root raw object |

sedraModel.makeLexeme(rootId, lexeme, morphologicalType, attributes) ⇒ Lexeme

Lexeme records, e.g. 1:2,0:2,"ABA",41960448,16 Id is the position in the array so it is not stored

Kind: static method of sedraModel
Returns: Lexeme - Sedra Lexeme row

| Param | Type | Description | | --- | --- | --- | | rootId | number | Root Address, e.g. 2 | | lexeme | string | e.g. "ABA" | | morphologicalType | number | 32-bit map | | attributes | number | 16-bit map |

sedraModel.makeLexemeAttribute(seyame, wordType, grammaticalCategory, listing) ⇒ LexemeAttribute

Build Lexeme Attribute object

Kind: static method of sedraModel
Returns: LexemeAttribute - Lexeme Attribute object

| Param | Type | Description | | --- | --- | --- | | seyame | boolean | true if lexeme has seyame | | wordType | string | word type enumeration | | grammaticalCategory | string | grammatical category enumeration | | listing | boolean | not clear yet what this is used for |

sedraModel.getLexemeAttribute(attributes) ⇒ LexemeAttribute

Get Lexeme Attribute object from lexeme attribute bit map

Kind: static method of sedraModel
Returns: LexemeAttribute - Lexeme Attribute object

| Param | Type | Description | | --- | --- | --- | | attributes | number | 16-bit map |

sedraModel.makeLexemeMorphologicalType(firstSuffix, secondSuffix, thirdSuffix, prefix, firstVowel, secondVowel, thirdVowel, fourthVowel, vowelCount, radicalType, form) ⇒ LexemeMorphologicalType

Build Lexeme Morphological Type object

Kind: static method of sedraModel
Returns: LexemeMorphologicalType - Lexeme Morphological Type object

| Param | Type | Description | | --- | --- | --- | | firstSuffix | string | First suffix enumeration | | secondSuffix | string | Second suffix enumeration | | thirdSuffix | string | Third suffix enumeration | | prefix | string | M, T, ? enumeration | | firstVowel | string | First Vowel | | secondVowel | string | Second Vowel | | thirdVowel | string | Third Vowel | | fourthVowel | string | Forth Vowel | | vowelCount | number | Total no of vowels in lexeme | | radicalType | string | Radical type enumeration | | form | string | Word form enumeration |

sedraModel.getLexemeMorphologicalType(morphologicalType) ⇒ LexemeMorphologicalType

Get Lexeme Morphological Type object from lexeme bit map

Kind: static method of sedraModel
Returns: LexemeMorphologicalType - Lexeme Morphological Type object

| Param | Type | Description | | --- | --- | --- | | morphologicalType | number | Morphological Type 32-bit map |

sedraModel.getLexeme(id, lexeme, roots) ⇒ FlatLexeme

Return flatten lexeme object with parsed attribute and morphological values

Kind: static method of sedraModel
Returns: FlatLexeme - the flatten lexeme model

| Param | Type | Description | | --- | --- | --- | | id | number | the id of current lexeme object | | lexeme | Lexeme | lexeme raw object | | roots | Array.<Root> | root list |

sedraModel.makeWord(lexemeId, word, vocalised, morphologicalType, attributes) ⇒ Word

Word records, e.g. 2:8,1:2,"ABHOH;","AaB,oHaOH_;",7405716,129 Id is the position in the array so it is not stored

Kind: static method of sedraModel
Returns: Word - Sedra Word row

| Param | Type | Description | | --- | --- | --- | | lexemeId | number | Lexeme Address, e.g. 2 | | word | string | Word, e.g. "ABHOH;" | | vocalised | string | Vocalised Word, e.g. "AaB,oHaOH_;" | | morphologicalType | number | 32-bit map | | attributes | number | 16-bit map |

sedraModel.makeWordAttribute(seyame, listing, enclitic, lexeme) ⇒ WordAttribute

Build Word Attribute object

Kind: static method of sedraModel
Returns: WordAttribute - Word Attribute object

| Param | Type | Description | | --- | --- | --- | | seyame | boolean | true if word has seyame | | listing | number | Undocumented | | enclitic | boolean | true if word has enclitics | | lexeme | boolean | true if current word is lexeme |

sedraModel.getWordAttribute(attributes) ⇒ WordAttribute

Get Word Attribute object from word attribute bit map

Kind: static method of sedraModel
Returns: WordAttribute - Word Attribute object

| Param | Type | Description | | --- | --- | --- | | attributes | number | 16-bit map |

sedraModel.makeWordMorphologicalType(suffixGender, suffixPerson, suffixNumber, suffixType, prefixCode, gender, person, number, state, tense, form) ⇒ WordMorphologicalType

Build Word Morphological Type object

Kind: static method of sedraModel
Returns: WordMorphologicalType - Word Morphological Type object

| Param | Type | Description | | --- | --- | --- | | suffixGender | string | Word Suffix Gender enumeration | | suffixPerson | string | Word Suffix Person enumeration | | suffixNumber | string | Word Suffix Number enumeration | | suffixType | string | Word Suffix Type enumeration | | prefixCode | number | Word Prefix Code | | gender | string | Word Gender enumeration | | person | string | Word Person enumeration | | number | string | Word Number enumeration | | state | string | Word State enumeration | | tense | string | Word Tense enumeration | | form | string | Word Form enumeration |

sedraModel.getWordMorphologicalType(attributes) ⇒ WordMorphologicalType

Get Word Morphological Type object from word bit map

Kind: static method of sedraModel
Returns: WordMorphologicalType - Word Morphological Type object

| Param | Type | Description | | --- | --- | --- | | attributes | number | Morphological Type 32-bit map |

sedraModel.getWord(id, lexeme, lexemes) ⇒ FlatWord

Return flatten word object with parsed attribute and morphological values

Kind: static method of sedraModel
Returns: FlatWord - the flatten word model

| Param | Type | Description | | --- | --- | --- | | id | number | the id of current word object | | lexeme | Word | word raw object | | lexemes | Array.<Lexeme> | lexeme list |

sedraModel.makeEnglish(lexemeId, word, before, after, comment, attributes, flag) ⇒ English

English meaning, e.g. 3:165,1:97,"cause","without","","",0,0 Id is the position in the database array so it is not stored

Kind: static method of sedraModel
Returns: English - Sedra English row

| Param | Type | Description | | --- | --- | --- | | lexemeId | number | Lexeme address, e.g. 97 | | word | string | Meaning, e.g. "cause" | | before | string | String before meaning, e.g. "without" (i.e. without cause) | | after | number | String after meaning, e.g. "" | | comment | number | Comment, e.g. "" | | attributes | number | 16-bit map | | flag | number | 1 bit flag |

sedraModel.makeEnglishAttribute(commentPosition, commentFont, stringBeforeFont, stringAfterFont, verb, number, gender, form) ⇒ EnglishAttribute

Build English Attribute object

Kind: static method of sedraModel
Returns: EnglishAttribute - English Attribute object

| Param | Type | Description | | --- | --- | --- | | commentPosition | string | Comment before or after word meaning | | commentFont | string | Normal or Italic | | stringBeforeFont | string | Normal or Italic string before text font | | stringAfterFont | string | Normal or Italic string after text font | | verb | string | None, Transitive or Intransitive | | number | string | Word Number enumeration | | gender | string | Word Gender enumeration | | form | string | Word Form enumeration |

sedraModel.getEnglishAttribute(attributes) ⇒ EnglishAttribute

Get English Attribute object from english attribute bit map

Kind: static method of sedraModel
Returns: EnglishAttribute - English Attribute object

| Param | Type | Description | | --- | --- | --- | | attributes | number | 16-bit map |

sedraModel.getEnglish(id, english, lexemes) ⇒ FlatEnglish

Return flatten english object with parsed attribute values

Kind: static method of sedraModel
Returns: FlatEnglish - the flatten english model

| Param | Type | Description | | --- | --- | --- | | id | number | the id of current english object | | english | English | english raw object | | lexemes | Array.<Lexeme> | lexeme list |

sedraModel.makeEtymology(lexemeId, word, attributes) ⇒ Etymology

Etymology records, e.g. 4:1,1:1,"a\255h\256r",5 Id is the position in the array so it is not stored

Kind: static method of sedraModel
Returns: Etymology - Sedra Etymology row

| Param | Type | Description | | --- | --- | --- | | lexemeId | number | Lexeme address, e.g. 1 | | word | string | Word Origin, e.g. "a\255h\256r" | | attributes | number | 16-bit map |

sedraModel.makeEtymologyAttribute(language, type) ⇒ EtymologyAttribute

Build Etymology Attribute object

Kind: static method of sedraModel
Returns: EtymologyAttribute - Etymology Attribute object

| Param | Type | Description | | --- | --- | --- | | language | string | the source language | | type | string | word type enumeration |

sedraModel.getEtymologyAttribute(attributes) ⇒ EtymologyAttribute

Get Etymology Attribute object from etymology attribute bit map

Kind: static method of sedraModel
Returns: EtymologyAttribute - Etymology Attribute object

| Param | Type | Description | | --- | --- | --- | | attributes | number | 16-bit map |

sedraModel.getEtymology(id, etymology, lexemes) ⇒ FlatEtymology

Return flatten etymology object with parsed attribute values

Kind: static method of sedraModel
Returns: FlatEtymology - the flatten etymology model

| Param | Type | Description | | --- | --- | --- | | id | number | the id of current etymology object | | etymology | Etymology | etymology raw object | | lexemes | Array.<Lexeme> | lexeme list |

sedraModel.makeBook(id, peshittaId, name, vocalised, english, stats) ⇒ Book

Build a Book object

Kind: static method of sedraModel
Returns: Book - Book object

| Param | Type | Description | | --- | --- | --- | | id | number | Book Id | | peshittaId | number | Book Eastern Peshitta Id | | name | string | Book Aramaic name | | vocalised | string | Book vocalised Aramaic name | | english | Array.<string> | Book English names: full name followed by abbreviations | | stats | object | Book statistics { chapters, verses, words } |

sedraModel.sorter(a, b) ⇒ number

Callback to sort books by Eastern Peshitta ordering

Kind: static method of sedraModel
Returns: number - sort order

| Param | Type | Description | | --- | --- | --- | | a | Book | a book | | b | Book | another book |

sedraModel.getBook(id) ⇒ Book

Get book record with the given id from books array

Kind: static method of sedraModel
Returns: Book - Book object from books array

| Param | Type | Description | | --- | --- | --- | | id | number | Book id |

sedraModel.getBooksByEnglish() ⇒ Object

Kind: static method of sedraModel
Returns: Object - English name to Book hash

sedraModel.getBookByEnglish(name) ⇒ Book

Kind: static method of sedraModel
Returns: Book - Book object from books array

| Param | Type | Description | | --- | --- | --- | | name | string | book English full or short name |

sedraModel.getBookEnglishNames() ⇒ Array

Kind: static method of sedraModel
Returns: Array - sorted list of book English names

sedraModel.getNamedReferences() ⇒ Array

Kind: static method of sedraModel
Returns: Array - list of named references

sedraModel.makeBookGroup(id, name, bookSet) ⇒ BookGroup

Build a BookGroup object - a grouping of Peshitta books

Kind: static method of sedraModel
Returns: BookGroup - A Book Group object

| Param | Type | Description | | --- | --- | --- | | id | number | string | Book Group assigned Id | | name | string | Book Group name | | bookSet | Array.<Book> | Book subset from books array |

sedraModel.getVerseByIndex(index, ubs) ⇒ object

Get a verse by its index inside the whole of NT Peshitta

Kind: static method of sedraModel
Returns: object - a hash with verse content, verse, chapter and book number

| Param | Type | Description | | --- | --- | --- | | index | number | verse index overall NT Peshitta | | ubs | object | NT Peshitta object hash |

sedraModel.getIndexByVerseWoChapter(reference, ubs) ⇒ number

Get an index by verse reference, leaving out chapter reference indexes

Kind: static method of sedraModel
Returns: number - index

| Param | Type | Description | | --- | --- | --- | | reference | object | {book:number, chapter:number, verse:number} reference | | ubs | object | NT Peshitta object hash |

sedraModel.getIndexByVerse(reference, ubs) ⇒ number

Get an index by verse reference with chapter references included

Kind: static method of sedraModel
Returns: number - index

| Param | Type | Description | | --- | --- | --- | | reference | object | {book:number, chapter:number, verse:number} reference | | ubs | object | NT Peshitta object hash |