Comments (3)
Thanks, I can confirm that everything works fine now in 0.5.11
.
About the add_word
, is there will be any performance impact if I call it, let's say ... 10 thousand times?
I just want to use rustrict
in my telegram chat bot as a profanity filter module.
And I need some kind of easy-to-use way of extending the default dictionary.
from rustrict.
About the
add_word
, is there will be any performance impact if I call it, let's say ... 10 thousand times?
There are two parts to the performance impact:
- Calling
add_word
that many times will add a small, possibly negligible delay at startup - Future filter performance will be slightly worse (I'm guessing around 25% slower), because using more memory means a smaller proportion will fit in the CPU cache. It will not be 10,000 times slower than if there was only 1 word (the filter never iterates all words in the wordlist).
from rustrict.
Thanks for the issue! I've changed the character replacement strategy to allow matching certain non-ASCII characters. Your example now works in version 0.5.11
.
Also, is there a way to massively add new words?
You can call add_word
as many times as you want. #6 did ask for a more ergonomic API, and it is something I'm considering :)
from rustrict.
Related Issues (15)
- False positive cases HOT 8
- Documentation: Extending the word list HOT 2
- Filtering error (false positive and/or false negative) HOT 2
- Filtering error (false positive) HOT 8
- Example: How to use trie HOT 3
- Don't Mark Accents as Censored HOT 4
- Add tags to every published version HOT 3
- Filtering error (false positive and/or false negative) HOT 1
- Filtering error (false positive and/or false negative) HOT 2
- Filtering error (false positive) HOT 5
- False negatives HOT 5
- Reading multiple files HOT 2
- Self-censoring & accents does not work with custom non English words HOT 8
- Roadmap for Multi-language support HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rustrict.