1.0.1 • Published 4 years ago

ordbok-json v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Orðbók JSON

JSON backup of the Orðbók Old Norse dictionary dataset. In case the original source becomes unavailable.

Can also be used as data source in itself, if you're happy with using filesystem.

Install

yarn add ordbok-json

Or just copy json files from /json folder in source.

Update

To get latest dataset from online source, run in project:

yarn create-json

Use JSON files programmatically

Repo is shipped with files & getters for them.

const { getEnglish, getOldNorse } = require('ordbok-json')

const englishWords  = getEnglish()
const oldNorseWords = getOldNorse()

// Get words starting with letter U
const startsWithU = oldNorseWords.filter(entry => entry.word.charAt(0) === 'u' )

// Get words associated with Old East Norse branch.
const oenWords = oldNorseWords.filter(entry => entry.branch === 'Old East Norse' )

// Get adjectives.
const adjectives = oldNorseWords.filter(entry => entry.type === 'Adjective' )

console.log(startsWithU)
console.log(oenWords)
console.log(adjectives)

Sources

Scraped from word list compiled by Vikings of Bjornstad. The sources for the compiled list come from: