dictionary

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2022 License: MIT Imports: 2 Imported by: 0

README

Old Swedish Dictionary

Old Swedish Dictionary for Golang. The dictionary consists of 40 000+ Old Swedish words with Swedish translations.

Based on K.F. Söderwall's Medieval Swedish Dictionary

Install

go get github.com/stscoundrel/old-swedish-dictionary-go

Usage

The library exposes one function for getting the whole dictionary dataset.

package main

import (
    "fmt"

    dictionary "github.com/stscoundrel/old-swedish-dictionary-go"
)

func main() {
  result, err := dictionary.GetDictionary()

  if err != nil {
    fmt.Println(err)
  }
  
  // Contains 41 000+ DictionaryEntries.
  for _, entry := range result {
    fmt.Println(entry.Headword)
  }
}

The entries are structs of:

type DictionaryEntry struct {
  Headword          string
  PartOfSpeech      []string
  GrammaticalAspect string
  Information       string
  Definitions       []string
  AlternativeForms  []string
}

About "Dictionary of Old Swedish"

"Ordbok Öfver svenska medeltids-språket" dictionary was published in late 1884—1918 by K.F. Söderwall. Additional supplement to it was published in 1953—1973.

Old Swedish developed from Old East Norse, the eastern dialect of Old Norse, at the end of the Viking Age. Early Old Swedish was spoken from about 1225 until about 1375, and Late Old Swedish was spoken from about 1375 until about 1526.

The original material is licenced under Creative Commons International (CC BY 4.0), made available by University of Gothenburg. The source code for this library is under MIT licence.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DictionaryEntry

type DictionaryEntry struct {
	Headword          string   `json:"a"`
	PartOfSpeech      []string `json:"b"`
	GrammaticalAspect string   `json:"c"`
	Information       string   `json:"d"`
	Definitions       []string `json:"e"`
	AlternativeForms  []string `json:"f"`
}

func GetDictionary

func GetDictionary() ([]DictionaryEntry, error)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL