Tolkien Stress Analyser
A website and package to determine the stressed syllable of a word in one of Tolkien’s languages.
Website usage
Open the website and enter your text into the text box.
Optionally, change the language with the radio buttons, if you know what language your text is in.
Package usage
Install the tolkien-stress package from NPM.
Two functions are available for import (as an ECMAScript module):
import { analyseWord, analyseText } from 'tolkien-stress';
const { syllableBreaks, stressedSyllable } = analyseWord('Boromir', 'Sindarin');
console.log(syllableBreaks);
console.log(stressedSyllable);
const segments = analyseText('Gil-galad', 'Sindarin');
console.log(segments[0]);
console.log(segments[1]);
console.log(segments[2]);
Resources
- The Lord of the Rings, Appendix E
- To determine whether a word is Quenya or Sindarin (for the tests and the explanation section):
License
This software is published under the ISC license,
which you may find in the LICENSE file that accompanies this repository.
By contributing to this software,
you agree to publish your contribution under that license.