bleve: Index | Files

package en

import ""

Package en implements an analyzer with reasonable defaults for processing English text.

It strips possessive suffixes ('s), transforms tokens to lower case, removes stopwords from a built-in list, and applies porter stemming.

The built-in stopwords list is defined in EnglishStopWords.


Package Files

analyzer_en.go possessive_filter_en.go stop_filter_en.go stop_words_en.go


const AnalyzerName = "en"
const PossessiveName = "possessive_en"

PossessiveName is the name PossessiveFilter is registered as in the bleve registry.

const StopName = "stop_en"


var EnglishStopWords = []byte("" /* 4968 byte string literal not displayed */)

EnglishStopWords is the built-in list of stopwords used by the "stop_en" TokenFilter.

this content was obtained from: lucene-4.7.2/analysis/common/src/resources/org/apache/lucene/analysis/snowball/ ` was changed to ' to allow for literal string

func AnalyzerConstructor Uses

func AnalyzerConstructor(config map[string]interface{}, cache *registry.Cache) (*analysis.Analyzer, error)

func PossessiveFilterConstructor Uses

func PossessiveFilterConstructor(config map[string]interface{}, cache *registry.Cache) (analysis.TokenFilter, error)

func StopTokenFilterConstructor Uses

func StopTokenFilterConstructor(config map[string]interface{}, cache *registry.Cache) (analysis.TokenFilter, error)

func TokenMapConstructor Uses

func TokenMapConstructor(config map[string]interface{}, cache *registry.Cache) (analysis.TokenMap, error)

type PossessiveFilter Uses

type PossessiveFilter struct {

PossessiveFilter implements a TokenFilter which strips the English possessive suffix ('s) from tokens. It handle a variety of apostrophe types, is case-insensitive and doesn't distinguish between possessive and contraction. (ie "She's So Rad" becomes "She So Rad")

func NewPossessiveFilter Uses

func NewPossessiveFilter() *PossessiveFilter

func (*PossessiveFilter) Filter Uses

func (s *PossessiveFilter) Filter(input analysis.TokenStream) analysis.TokenStream

Package en imports 7 packages (graph) and is imported by 34 packages. Updated 2018-01-29. Refresh now. Tools for package owners.