- It is often seen that many a times people visit pages containing massive amounts of information and they can’t accurately google the exact question due to its ambiguity.
- Users need accurate answers in Natural Language to their questions from blogs , papers and websites. They want enriched and interactive answers to their questions from the context of the document they are currently visiting.
- Google’s Ctrl+F function only provides them with matching keywords and not the actual Natural Language answers relating to the context of the question.
- This extension is used to search information available on a webpage and provide answers in natural language.The model takes a passage and a question as input, then returns a segment of the passage that most likely answers the question.
- Uses MobileBERT fine-tuned on SQuAD Dataset via Tensorflow.JS to search for answers and mark relevant elements on the web page.
- BERT, or Bidirectional Encoder Representations from Transformers, is a method of pre-training language representations which obtains state-of-the-art results on a wide array of Natural Language Processing tasks.
- It requires semi-complex pre-processing including tokenization and post-processing steps.
Every time a user executes a search:
- The content script collects all
<p>, <div>
elements on the page and extracts text from each. - The background script executes the question-answering model on every element, using the query as the question and the element's text as the context.
- If a match is returned by the model, it is highlighted within the page along with the confidence score returned by the model.
- Clone this repository.
- Run
npm install or yarn
to install the dependencies. - Run
npm start or yarn start
- Load your extension on Chrome following:
- Access
chrome://extensions/
- Check
Developer mode
- Click on
Load unpacked extension
- Select the
build
folder.
- Access
- Happy hacking.
After the development of your extension run the command
npm build or yarn build