Popularity
1.3
Declining
Activity
0.0
Declining
12
2
0

Programming language: Go
License: MIT License

shamoji alternatives and similar packages

Based on the "Natural Language Processing" category.
Alternatively, view shamoji alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of shamoji or a related project?

Add another 'Natural Language Processing' Package

README

shamoji

GitHub Actions codecov Go Report Card codebeat badge GoDoc GitHub license

About

The shamoji (ๆ“ๆ–‡ๅญ—) is word filtering package.

Install

$ go get -u github.com/osamingo/shamoji

Usage

package main

import (
    "fmt"
    "sync"

    "github.com/osamingo/shamoji"
    "github.com/osamingo/shamoji/filter"
    "github.com/osamingo/shamoji/tokenizer"
    "golang.org/x/text/unicode/norm"
)

var (
    o sync.Once
    s *shamoji.Serve
)

func main() {
    yes, word := Contains("ๆˆ‘ใŒ็”Ÿๆถฏใซไธ€็‰‡ใฎๆ‚”ใ„็„กใ—")
    fmt.Printf("Result: %v, Word: %s", yes, word)
}

func Contains(sentence string) (bool, string) {
    o.Do(func() {
        s = &shamoji.Serve{
            Tokenizer: tokenizer.NewKagomeSimpleTokenizer(norm.NFKC),
            Filer:     filter.NewCuckooFilter("ๆถฏใซ", "ๆ‚”ใ„"),
        }
    })
    return s.Do(sentence)
}

License

Released under the MIT License.


*Note that all licence references and agreements mentioned in the shamoji README section above are relevant to that project's source code only.