articles_ca.go 591 B

123456789101112131415161718192021222324252627282930
  1. package ca
  2. import (
  3. "github.com/couchbaselabs/bleve/analysis"
  4. "github.com/couchbaselabs/bleve/registry"
  5. )
  6. const ArticlesName = "articles_ca"
  7. // this content was obtained from:
  8. // lucene-4.7.2/analysis/common/src/resources/org/apache/lucene/analysis
  9. var CatalanArticles = []byte(`
  10. d
  11. l
  12. m
  13. n
  14. s
  15. t
  16. `)
  17. func ArticlesTokenMapConstructor(config map[string]interface{}, cache *registry.Cache) (analysis.TokenMap, error) {
  18. rv := analysis.NewTokenMap()
  19. err := rv.LoadBytes(CatalanArticles)
  20. return rv, err
  21. }
  22. func init() {
  23. registry.RegisterTokenMap(ArticlesName, ArticlesTokenMapConstructor)
  24. }