vocabulary

package
v0.0.0-...-a058bfc Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Buckets

func Buckets(vocabulary []string) map[rune][]string

func Existing

func Existing(dir, filename string, fh FileHandler) (string, error)

func Filter

func Filter(paragraphs []string) (accepted []string, discarded []string)

func LanguageDirectory

func LanguageDirectory(language string, config map[string]string) string

func Merge

func Merge(old, new []string) []string

func ParseConfig

func ParseConfig(workspace string) map[string]string

func Summary

func Summary(vocabulary []string) string

func Upsert

func Upsert(dir, filename string, r rune, vocabulary []string, fh FileHandler) error

Types

type FileHandler

type FileHandler interface {
	Read(dir, filename string) (string, error)
	Write(dir, filename, contents string) error
}

type Filesystem

type Filesystem struct{}

func (*Filesystem) Read

func (*Filesystem) Read(dir, filename string) (string, error)

func (*Filesystem) Write

func (*Filesystem) Write(dir, filename, contents string) error

type Parser

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

func NewParser

func NewParser() *Parser

func (*Parser) Parse

func (p *Parser) Parse(input string) []string

Jump to

Keyboard shortcuts

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