Skip to content

A blazing-fast semantic search React component. Match by meaning, not just by letters. Search as you type without waiting (no debounce needed). Rank by cosine similarity.

License

Mihaiii/semantic-autocomplete

Repository files navigation

semantic-autocomplete

semantic-autocomplete is a React component that extends v5 MUI's autocomplete and performs semantic similarity search using a small, quantized machine learning (ML) model which runs on client side. The model is downloaded once and then taken from browser's cache. The full functionality is provided within this React component!

Demo

Sort paragraphs of a webpage by meaning:

https://mihaiii.github.io/semantic-autocomplete/

How to install

Install:

npm install --save semantic-autocomplete

Then import:

import SemanticAutocomplete from "semantic-autocomplete";

Usage

Since semantic-autocomplete extends MUI's autocomplete, the entire v5 MUI's autocomplete API will also work on semantic-autocomplete. The only exception is the filterOptions property.

If you're already using autocomplete in your project, just replace the tag name and you're done. 🙌

You can see the component being used in code here and here.

See this page for how you can use MUI's autocomplete and therefore semantic-autocomplete too.

Besides the MUI's autocomplete API, the following props are provided:

Thanks / credit

About

A blazing-fast semantic search React component. Match by meaning, not just by letters. Search as you type without waiting (no debounce needed). Rank by cosine similarity.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published