spellchecker

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package spellchecker provides spellcheck functionality

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SpellChecker

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

SpellChecker describe me!

func New

func New(
	index suggest.NGramIndex,
	model lm.LanguageModel,
	tokenizer analysis.Tokenizer,
	dict dictionary.Dictionary,
) *SpellChecker

New creates a new instance of spellchecker

func (*SpellChecker) Predict

func (s *SpellChecker) Predict(query string, topK int, similarity float64) ([]string, error)

Predict predicts the next word of the sentence

Jump to

Keyboard shortcuts

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