ic

package module
v0.0.0-...-1ac9524 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

README

Lit

Install

go generate
go install ./..

Run

server

Open http://localhost:9090

Hosted

Open http://lit.net.ai

Documentation

Index

Constants

View Source
const SYMBOL_SIZE = 9

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

type Edge struct {
	FirstIndex, LastIndex, StartNode, EndNode int
}

type Node

type Node struct {
	Node  int
	Count int
	Books []int
}

type Pair

type Pair struct {
	Int int
	Str []byte
	Idx int
	Bok [][]int
}

Pair is a pair of values

type SuffixTree

type SuffixTree struct {
	Edges  map[uint]Edge
	Nodes  []Node
	Buffer []byte
	Ranges []books.Range
}

func BuildSuffixTree

func BuildSuffixTree(input []byte, ranges []books.Range) *SuffixTree

func (*SuffixTree) Brute

func (tree *SuffixTree) Brute(prefix string, seed int64, size, count int) []string

func (*SuffixTree) GetBooks

func (tree *SuffixTree) GetBooks(pair *Pair)

func (*SuffixTree) Index

func (tree *SuffixTree) Index(sep string) (Edge, int)

func (*SuffixTree) Inference

func (tree *SuffixTree) Inference(prefix string, bok [][]int, seed int64, size, count int) (bool, string, [][]int)

func (*SuffixTree) MultiIndex

func (tree *SuffixTree) MultiIndex(sep []byte, bok [][]int) []Pair

func (*SuffixTree) Recursive

func (tree *SuffixTree) Recursive(prefix Pair, count int) Pair

Directories

Path Synopsis
cmd
ic command
server command
wasm command

Jump to

Keyboard shortcuts

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