Releases: swanandx/lemmeknow
v0.8.0
We switched from Lazy<Vec<Regex>>
to Vec<Lazy<Regex>>
!
This release provides major performance boost by compiling only those regular expressions that are required.
It was storing regexes as Lazy<Vec<Regex>>
, so even though we were compiling it only once, we were compiling them all! But some regex like URL are huge, and regex compilation is expensive. Fixing it is easy, just don't compile all regex at once, instead compile them as required, i.e. Vec<Lazy<Regex>>
!
v0.7.0
lemmeknow v0.7.0 with bytes support!
Being able to match on bytes was a requirement for API users, that is why lemmeknow is now using regex crate instead of fancy_regex to get bytes support.
But there is always a tradeoff, regex crate isn't fancy. It doesn't support look-around.
Below is the list of regex which won't compile because of using look-around.
- Internet Protocol (IP) Address Version 6
- Bitcoin (₿) Wallet Address
- American Social Security Number
- Date of Birth
- JSON Web Token (JWT)
- Amazon Web Services Access Key
- Amazon Web Services Secret Access Key
- YouTube Video ID
There are other changes for hopefully performance improvement like parsing regex.json
file at compile time.
What's Changed
New Contributors
Full Changelog: v0.6.0...v0.7.0
v0.6.0
What's new?
first_match()
to get the first identification - docs
let identifier = lemmeknow::Identifier::default();
let some_result = identifier.first_match("8888888888");
let not_gonna_find = identifier.first_match("a friend for swanandx");
assert_eq!(some_result.unwrap().data.name, "Phone Number");
assert!(not_gonna_find.is_none());
what else? well actually, we got old stuff back!
Breaking Changes
Identify
is nowIdentifier
( makes more sense ).min_rarity
andmax_rarity
are nowf32
instead ofOption<f32>
( let me know if Option was better )
Bug Fix for API users: We used to call build_regexes
inside identify
, which kept building regexes everytime we call identify
making it slow. Instead of this, now regexes are built and stored in lazy static. Which means they are compiled only when first accessed.
v0.5.0
v0.4.1
v0.4.1 for bug fix
v0.4.0
What's new?
- Made some changes to API
- Dependencies for CLI (clap and comfy-table) are now optional, reducing the dependencies when we use
lemmeknow
as API! - Fixed the bug where panic occurred when directory was supplied instead of a file.
- Reduced binary size for Linux and MacOS by working on release profile in
Cargo.toml
- Added benchmarks against pyWhat.
- Performance improvements !?
- etc.
v0.3.0
Bumped version to 0.3.0 🥳
v0.2.0
Bumped version to 0.2.0 and added .exe in windows release
v0.1.0
Explained how to run, renamed files as per OS