https://github.com/ddo/go-keyword
:mag: golang word matching in text
https://github.com/ddo/go-keyword
Last synced: 5 months ago
JSON representation
:mag: golang word matching in text
- Host: GitHub
- URL: https://github.com/ddo/go-keyword
- Owner: ddo
- License: mit
- Created: 2015-03-11T11:59:12.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-10-13T13:35:41.000Z (over 8 years ago)
- Last Synced: 2024-06-21T03:14:54.928Z (almost 2 years ago)
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# keyword [![Build Status][semaphore-img]][semaphore-url] [![Doc][godoc-img]][godoc-url]
> :mag: word matching in text
[semaphore-img]: https://semaphoreci.com/api/v1/projects/04fc8f93-78b7-4a13-96e9-8c4adb38f2a2/657485/badge.svg
[semaphore-url]: https://semaphoreci.com/ddo/go-keyword
[godoc-img]: https://img.shields.io/badge/godoc-Reference-brightgreen.svg?style=flat-square
[godoc-url]: https://godoc.org/github.com/ddo/go-keyword
##Example
```go
var wordChecker = keyword.New("love, happy", "hate, sad, die", false)
if wordChecker.Check("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore LOVE magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.") {
println("positive sentence")
}
```