1.1.7 • Published 8 months ago

quese v1.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

QUESE

"Quese" allows you implement in an easy way a Search Algoritm, based on Embeddings and Semantic Similarity, in your JavaScripts apps. The package is available in python (pip) as well: https://pypi.org/project/quese/

The module provides:

COMPATIBILITY

Create React AppNode
SearcherYESNO
searchByEmbeddingsNOYES

USAGE

1. Searcher component:

Example of an implementation of the Searcher component.

2. searchByEmbeddings function:

Example of an implementation of the searchByEmbeddings function.

PARAMS AND PROPS

1. Seacher props:

NameRequiredFormatDescriptionDefault value
datatrue Array of objectsRepresents the data you want to search forundefined
bytrue if not templateStringRepresents the key of your objects that is going to be compared with the query in the searching processundefined
templatetrue if not byString, object keys between {}Similar to the "by" prop, allows you to create a customized sentence for compare with the queryundefined
accuracyfalseNumber (0-1)It represents the minimum similarity rate wich the object must have with the quey to be returned0.5
defaultStylefalseBooleanBoolean value wich indicates if the default style will be charged or the user prefer her own styletrue
InputStylefalseObjectThe typical object for stylize your components in react, but in this case to stylize the input of the Searcher componentundefined
ContainerStylefalseObjectThe typical object for stylize your components in react, but in this case to stylize the div of the Searcher componentundefined
inputClassNamefalseStringThe typical className prop, but in this case to stylize the input of the Searcher componentundefined
ContainerClassnamefalseStringThe typical className prop, but in this case to stylize the div of the Searcher componentundefined
renderItemFunctionfalse unless you use the template propJSX FunctionFunction with two params: the item and the index, in wich you can customize the structure and the style of the previous resultsundefined
itemLinkFunctionfalseFunctionFunction with two params: the item and the index, in wich you can customize the href of each previous result returning a dinamyc stringundefined
onSearchChangefalseFunctionIt's a function to handle the results for each change of the input. The first param are this results.undefined
onSearchSubmitfalseFunctionIt's a function to handle the results for each submit of the input. The first param are this results.undefined
iconCancelfalseBooleanBoolean value to define if the icon for cancel the search will be charged or nottrue
iconSearchfalseBooleanBoolean value to define if the search icon will be charged or nottrue
placeholderfalseStringThe typical input placeholder..."Search..."
prevResultsfalseStringBoolean value to define if the previous results (the results between the input) will be charged or nottrue
maxPrevResultsfalseNumberNumber that define the maximum number of previous results that will be chargedundefined

2. seachByEmbeddings() params:

NameRequiredFormatDescriptionDefault value
datatrue Array of objectsRepresents the data you want to search forundefined
querytrueStringRepresents the query of your searching processundefined
bytrue if not templateStringRepresents the key of your objects that is going to be compared with the query in the searching processundefined
templatetrue if not byString, object keys between {}Similar to the "by" prop, allows you to create a customized sentence for compare with the queryundefined
accuracyfalseNumber (0-1)It represents the minimum similarity rate wich the object must have with the quey to be returned0.5
modelfalseStringThe HuggingFace model you want to use to create the embeddings (take care if it works with Transformers.js and if it's able to do the feature-extraction task)"Xenova/all-MiniLM-L6-v2"
1.1.1

8 months ago

1.1.0

8 months ago

1.1.7

8 months ago

1.1.5

8 months ago

1.1.4

8 months ago

1.1.3

8 months ago

1.1.2

8 months ago

1.0.6

9 months ago

2.0.1

9 months ago

2.0.0

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago