dictionary

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Overview

Package dictionary defines arrays of 256 words used for KidWords encoding.

Index

Constants

This section is empty.

Variables

View Source
var EnglishFourLetterNouns = Dictionary{}/* 256 elements not displayed */

Functions

This section is empty.

Types

type Dictionary

type Dictionary [256]string

Dictionary holds 256 words, each corresponding to a byte value.

func Load

func Load(r io.Reader) (d Dictionary, err error)

Load captures the first 256 words of a dictionary from an io.Reader. Lines starting with `//` are ignored.

func LoadFile

func LoadFile(p string) (d Dictionary, err error)

func (*Dictionary) Reverse

func (d *Dictionary) Reverse() map[string]byte

func (*Dictionary) Validate

func (d *Dictionary) Validate() error

Validate iterates through every value to check for uniqueness and extra white space characters.

Jump to

Keyboard shortcuts

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