synonyms

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package synonyms provides a builder for filtering and replacing synonyms in a token stream

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFilter

func NewFilter(mappings map[string]string, ignoreCase bool, ignoreRunes []rune) jargon.Filter

NewFilter creates a new synonyms Filter

Types

type Filter

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

Filter is the data structure of a synonyms filter. Use NewFilter to create.

func (*Filter) Decl

func (f *Filter) Decl() string

Decl returns a Go source declaration of the Filter

func (*Filter) Filter

func (f *Filter) Filter(incoming *jargon.TokenStream) *jargon.TokenStream

Filter replaces tokens with their canonical terms, based on Stack Overflow tags & synonyms

func (*Filter) String

func (f *Filter) String() string

String returns a Go source declaration of the Filter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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