dict

package
v0.0.0-...-926e371 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package dict handles parsing and using dictionary files.

The dictionary file format, as explained in a comment in Dave Coffin's Python translator, is as follows:

Each line of a dictionary consists of an English word, a space, a Shavian translation, and no comments. Special notations are:

^word ���	word is a prefix
$word ���	word is a suffix
Word ���	always use a namer dot
word_ ���	never use a namer dot
word_VB ���	shave this way when tagged as a verb
word. ���	shave this way when no suffix is present
word .���	word takes no prefixes
word ���.	word takes no suffixes
word ���:	suffixes do not alter the root,
               	e.g. "ð�‘‘ð�‘¾" or "ð�‘•ð�‘¾" palatizing to "ð�‘–ð�‘©" or "ð�‘ ð�‘©".
word .		delete this word from the dictionary

Words are matched case-sensitive when possible, e.g. US/us, WHO/who, Job/job, Nice/nice, Polish/polish.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dict

type Dict struct {
	// contains filtered or unexported fields
}

func Parse

func Parse(r io.Reader) (*Dict, error)

func (*Dict) Translate

func (d *Dict) Translate(word string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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