Skip to content
This repository has been archived by the owner on May 12, 2023. It is now read-only.

Commit

Permalink
Readme: add usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
stscoundrel committed Jul 25, 2022
1 parent 130c931 commit 6ee7b1e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,33 @@ Related projects:
`yarn add viking-language-dictionary-abbreviations`


##### Usage

Find abbreviations from text content:

```javascript
import { findAbbreviations } from 'viking-language-dictionary-abbreviations'

// Example content from dictionary, from definition of 'alla'
const content = 'str m acc pl, f acc sg; wk m acc/dat/gen sg, f acc sg, n all sg of allr';

// Returns map of abbreviations to meanings.
const result = findAbbreviations(content);

console.log(result);
// acc => accusative
// dat => dative
// f => feminine
// gen => genitive
// m => masculine
// n => neuter
// pl => plural
// sg => singular
// str => strong (adj or verb)
// wk => weak (adjective or verb)

```


### About "Viking Language"

Expand Down

0 comments on commit 6ee7b1e

Please sign in to comment.