Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stscoundrel/old-norse-dictionary-go
Old Norse Dictionary for Go. From The Cleasby & Vigfusson Old Norse to English Dictionary.
https://github.com/stscoundrel/old-norse-dictionary-go
cleasby-vigfusson dictionary go golang golang-library medieval-languages medieval-studies norse old-icelandic old-norse
Last synced: 18 days ago
JSON representation
Old Norse Dictionary for Go. From The Cleasby & Vigfusson Old Norse to English Dictionary.
- Host: GitHub
- URL: https://github.com/stscoundrel/old-norse-dictionary-go
- Owner: stscoundrel
- License: mit
- Created: 2022-11-08T14:55:37.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-06T08:18:34.000Z (10 months ago)
- Last Synced: 2024-06-20T10:06:47.963Z (5 months ago)
- Topics: cleasby-vigfusson, dictionary, go, golang, golang-library, medieval-languages, medieval-studies, norse, old-icelandic, old-norse
- Language: Go
- Homepage: https://pkg.go.dev/github.com/stscoundrel/old-norse-dictionary-go
- Size: 4.77 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Old Norse Dictionary
Old Norse to English Dictionary for Golang. The dictionary consists of 35 000+ Old Norse words with English translations.
Based on the classic dictionary by Richard Cleasby and Gudbrand Vigfusson. If you find this one too abbreviated, academic or hard to read, you might want to check out [A Concise Dictionary of Old Icelandic](https://github.com/stscoundrel/old-icelandic-dictionary-go)
### Install
`go get github.com/stscoundrel/old-norse-dictionary-go`
### Usage
The dictionary comes in two variants:
- Default dictionary has HTML markup `` and `` to match look of the original book.
- No-markup version has the same content without any additional formatting tags.```go
package mainimport (
"fmt"dictionary "github.com/stscoundrel/old-norse-dictionary-go"
)func main() {
defaultDictionary, defaltErr := dictionary.GetDictionary()
noMarkupDictionary, noMarkupErr := dictionary.GetNoMarkupDictionary()
// Error handling as you please.
if defaltErr != nil {
fmt.Println(err)
}
// Contains 35 000+ DictionaryEntries.
for _, entry := range defaultDictionary {
fmt.Println(entry.Headword)
}
// Headwords wont differ in dictionaries.
fmt.Println(defaultDictionary[1989].Headword) // át-frekr
fmt.Println(noMarkupDictionary[1989].Headword) // át-frekr
// But definitions markup will differ
fmt.Println(defaultDictionary[1989].Definitions[0]) // adj. greedy, voracious, Hkv. 2. 41.
fmt.Println(noMarkupDictionary[1989].Definitions[0]) // adj. greedy, voracious, Hkv. 2. 41.
}
```The entries are structs of:
```go
type DictionaryEntry struct {
Headword string
Definitions []string
}```
### About Cleasby & Vigfusson Dictionary
"Icelandic-English" dictionary was started by Richard Cleasby and finished by Gudbrand Vigfusson. It was published in 1874, which leads to there being many public domain versions of the book available.