Semantic document viewer

An experiment by Samson Zhang

Input the text for your document below, then hit "calculate embeddings" to be able to semantically search through it.

All calculations are done on your browser (no user data is ever sent to the server), but there are some performance issues at the moment that may cause your browser to freeze up or crash if you have long sentences in your document.


Hello world


Use cases

  • For journalists: searching through interview transcripts for relevant quotes
  • For researchers: searching through paper texts for relevant passages

Implementation details

Embeddings for each sentence are calculated using Universal Sentence Encoder via Tensorflow.js, then compared to the embedding of search strings using cosine similarity.

You can find the full code for this app on GitHub here.