Notes
![]() ![]() Notes - notes.io |
Semantic Elasticsearch with Sentence Transformers. We will use the power of Elastic and the magic of BERT to index a million articles and perform lexical and semantic search on them.
The purpose is to provide an ease-of-use way of setting up your own Elasticsearch with near state of the art capabilities of contextual embeddings / semantic search using NLP transformers.
The above setup works as follows
Set up an Elasticsearch server with Dockers
Collect the dataset
Use sentence-transformers to index them onto Elastic (takes about 3 hrs on 4 CPU cores)
Look at some comparison examples between lexical and semantic search
The repo introduces the ElasiticTransformers class. Utilities which help create, index and query Elasticsearch indices which include embeddings
Initiate the connection links as well as (optionally) the name of the index to work with
create_index_spec define mapping for the index. Lists of relevant fields can be provided for keyword search or semantic (dense vector) search. It also has parameters for the size of the dense vector as those can vary create_index - uses the spec created earlier to create an index ready for search
write_large_csv - breaks up a large csv file into chunks and iteratively uses a predefined embedding utility to create the embeddings list for each chunk and subsequently feed results to the index
search - allows to select either keyword (‘match’ in Elastic) or semantic (dense in Elastic) search. Notably it requires the same embedding function used in write_large_csv
Automated Threat Report Classification Over Multi-Source Data
This creates the sentence transformer object as well as small helper function which simplifies the embedding call and helps lading data into elastic easier
https://www.kaggle.com/aashita/nyt-comments?select=CommentsFeb2018.csv
https://github.com/md-experiments/elastic_transformers/blob/master/notebooks/Setting_up_ElasticTransformers.ipynb
https://aws.amazon.com/blogs/machine-learning/powering-a-search-engine-with-amazon-sagemaker/
https://github.com/aws-samples/amazon-sagemaker-nlu-search
https://reposhub.com/python/natural-language-processing/md-experiments-elastic_transformers.html
https://xplordat.com/2019/10/28/semantics-at-scale-bert-elasticsearch/
https://github.com/Hironsan/bertsearch
https://repositorio-aberto.up.pt/bitstream/10216/128539/2/412375.pdf
https://eventregistry.org/
https://www.kaggle.com/therohk/examine-the-examiner
https://github.com/Hironsan/bertsearch
https://trec.nist.gov/data/reuters/reuters.html
https://github.com/ChubaOraka/data-science-on-aws-workshop-2020-09-26
https://github.com/marcelpetrick/KubeFlow_BERT_GPU_TensorFlow_Keras_SageMaker_Workshop
https://towardsdatascience.com/speeding-up-bert-search-in-elasticsearch-750f1f34f455
https://medium.com/analytics-vidhya/elasticbert-information-retrieval-using-bert-and-elasticsearch-51fef465b9ae
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team