kowalski

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: MIT Imports: 6 Imported by: 0

README

Kowalski

Kowalski, analysis

Kowalski is a Discord bot that can perform rudimentary analysis on text to help solve puzzles.

It currently supports these commands:

  • match <term> returns all known words that match the given term, where '?' is a single-character wildcard. e.g. match melism? will return melisma.

  • anagram <term> returns all known anagrams that match the given term, where '?' is a single-character wildcard. e.g. anagram lismem? will return melisma.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	Master      *bloom.BloomFilter
	CrossChecks [2]*bloom.BloomFilter
	Roots       *bloom.BloomFilter
	Counter     int
}

func LoadWords

func LoadWords(file string) (*Node, error)

LoadWords reads all words from the given file and constructs a Trie for use in future operations

func (*Node) Anagrams

func (n *Node) Anagrams(word string) []string

Anagrams finds all anagrams of the given word, expanding '?' as a single wildcard character

func (*Node) Match

func (n *Node) Match(word string) []string

Match returns all valid words that match the given input, expanding '?' as a single character wildcard

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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