https://github.com/rekola/boolean-search
A single-header C++ Boolean search library for streaming applications
https://github.com/rekola/boolean-search
boolean boolean-logic c-plus-plus cplusplus search-algorithm string-matching
Last synced: 3 months ago
JSON representation
A single-header C++ Boolean search library for streaming applications
- Host: GitHub
- URL: https://github.com/rekola/boolean-search
- Owner: rekola
- License: mit
- Created: 2024-03-07T15:31:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-15T12:36:32.000Z (over 1 year ago)
- Last Synced: 2025-02-13T18:51:17.476Z (4 months ago)
- Topics: boolean, boolean-logic, c-plus-plus, cplusplus, search-algorithm, string-matching
- Language: C++
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# boolean-search
[](https://github.com/rekola/boolean-search/blob/main/LICENSE)
[]()
[](http://makeapullrequest.com)A single-header C++ Boolean search library for streaming applications.
## Features
- UTF-8
- AND, OR, NOT, NEAR, ONEAR operators
- Wildcards
- Unicode normalization## Example
```c++
boolean_matcher::matcher m("apple AND orange");
if (m.match("I've got an apple and an orange")) {
std::cout << "A match was found\n";
}
```## Future Plans
- Add maximum distance to NEAR and ONEAR (e.g. `NEAR/1`)
- Add support for wstrings
- Add support for pairs and tuples
- Add interface for metadata queries (e.g. `.timestamp > "2024-10-01"`)
- Allow wildcards inside terms (e.g. `w*d`)
- Add comparison operators and arithmetics
- Add filtering
- Add better lexer and parser
- Embeddings / Document vectors## Dependencies
- utf8proc