rule_engine
Rule Engine
Simple keyword matching engine
Installation
-
Add the dependency to your
shard.yml
:dependencies: rule_engine: github: policr-project/rule_engine
-
Run
shards install
Usage
require "rule_engine"
rule = RuleEngine.compile! "[柬埔寨|东南亚 菠菜|博彩 招聘|微信]"
rule.match? "东南亚招聘菠菜" # => true
rule.match? "柬埔寨博彩加微信" # => true
Contributing
- Fork it (https://github.com/policr-project/rule_engine/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Hentioe - creator and maintainer