/text-search

Example search with semantics similarity

Primary LanguageJavaScriptMIT LicenseMIT

Text Search

A simple demo showcasing semantic similarity for text search.

Getting Started

  1. Install Dependencies:
npm install
  1. Run the Search Script:
./text-search.js <filename> "<query>"
  • <filename>: The path to the text file you want to search. The file should contain one or more lines of text.
  • "<query>": The search query, enclosed in double quotes.

Example Usage

To find the most relevant lines in solar-system.txt related to "gas giants composition":

./text-search.js solar-system.txt "gas giants composition"

This will output the top 3 most similar lines from solar-system.txt based on the provided query.