title
stringlengths 12
112
| published
stringlengths 19
23
| url
stringlengths 28
28
| video_id
stringlengths 11
11
| channel_id
stringclasses 5
values | id
stringlengths 16
31
| text
stringlengths 0
596
| start
float64 0
37.8k
| end
float64 2.18
37.8k
|
---|---|---|---|---|---|---|---|---|
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
|
2021-08-20 16:00:16 UTC
|
https://youtu.be/e_SBq3s20M8
|
e_SBq3s20M8
|
UCv83tO5cePwHMt1952IVVHw
|
e_SBq3s20M8-t1608.24
|
in more false negatives. So non candidate pairs where we should have candidate pairs. So it's just
| 1,608.24 | 1,622.8 |
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
|
2021-08-20 16:00:16 UTC
|
https://youtu.be/e_SBq3s20M8
|
e_SBq3s20M8
|
UCv83tO5cePwHMt1952IVVHw
|
e_SBq3s20M8-t1617.28
|
a case of balancing both of those. But that's everything for this video. I hope it's been useful.
| 1,617.28 | 1,638.8 |
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
|
2021-08-20 16:00:16 UTC
|
https://youtu.be/e_SBq3s20M8
|
e_SBq3s20M8
|
UCv83tO5cePwHMt1952IVVHw
|
e_SBq3s20M8-t1622.8
| 1,622.8 | 1,638.8 |
|
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t0.0
|
I welcome to this video on using the sentence transformers library to compare similarity
| 0 | 12.08 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t7.68
|
between different sentences. So this is going to be a pretty short video. I'm not going to go
| 7.68 | 18.4 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t12.08
|
really into depth. I'm just going to show you how to actually use the library. Now, if you do want
| 12.08 | 24.72 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t18.400000000000002
|
to go into a little more depth, I have another video that I'll be releasing just before this one.
| 18.4 | 33.28 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t24.72
|
And that will go into what is actually happening here, how we are calculating similarity or pulling
| 24.72 | 40.72 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t33.28
|
the how the BERT model that we'll be using is actually creating those embeddings and then how
| 33.28 | 46.08 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t40.72
|
we're actually calculating the similarity there. So if you're interested in that, go check it out.
| 40.72 | 53.52 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t46.96
|
Otherwise, if you just want to get a quick similarity score between two sentences,
| 46.96 | 60.96 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t53.52
|
this is probably the way to go. So we have these six sentences up here and this one,
| 53.52 | 67.84 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t61.68000000000001
|
three years later, the coffin was still full of jello. And this one, the person box was packed
| 61.68 | 76.24 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t67.84
|
with jelly many dozens of months later. They're saying the same thing, but the second one is
| 67.84 | 80.88 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t76.24000000000001
|
saying it in a way that most of us wouldn't normally say it. Instead of saying coffin,
| 76.24 | 85.6 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t80.88
|
we're saying person box instead of jello, we're saying jelly. I think that's kind of normal,
| 80.88 | 91.92 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t85.6
|
actually. And instead of years, we're saying dozens of months. So it's not really sharing
| 85.6 | 98.48 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t91.92
|
the same words, but we're going to see that we can actually find that these two sentences are
| 91.92 | 106.96 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t98.47999999999999
|
the most similar out of all of these. So we're taking those and we're going to be importing the
| 98.48 | 118.32 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t106.96
|
sentence transformers library. And we want to import the sentence transformer. And then from that,
| 106.96 | 126 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t119.11999999999999
|
we want to initialize a sentence transformer model. So we write sentence transformer.
| 119.12 | 132.72 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t127.83999999999999
|
And then in here, we're going to be using this model that I've already defined a model name,
| 127.84 | 142.08 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t132.72
|
which is a BERT base MLI mean tokens model. So initialize that. I need to rerun that.
| 132.72 | 148.88 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t143.44
|
So we have our model and I'll just show you really quickly. This model is coming from the
| 143.44 | 155.76 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t148.88
|
Hugging Face Transformers library behind sentence transformers. So this is the actual model we are
| 148.88 | 163.92 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t155.76
|
using. Now, first thing we do here is create our sentence vectors or sentence embeddings.
| 155.76 | 174.64 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t164.72
|
So we'll call this sentence Vets equals model and code. And all we need to do here is pass our
| 164.72 | 180 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t174.64
|
sentences. So we can pass a single sentence or a list of sentences. It's completely fine.
| 174.64 | 189.28 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t180.0
|
And then let's just have a quick look at what we have here. So you see that we have this big array.
| 180 | 199.6 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t190.08
|
And if we look at the shape, we see that we have a six by 768 array. So the six
| 190.08 | 209.36 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t200.16
|
refers to our six sentences here. And the 768 refers to the hidden state size within
| 200.16 | 215.12 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t209.36
|
the BERT model that we're using. So each one of these sentences is now being represented
| 209.36 | 223.12 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t215.12
|
by a dense vector containing 768 values. And that means that we already take those and
| 215.12 | 229.28 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t223.12
|
compare similarity between them. So to do that, we're going to be using the sklearn
| 223.12 | 240.56 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t229.28
|
implementation of cosine similarity, which we can import like this. So sklearn pairwise or metrics
| 229.28 | 250.8 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t244.96
|
pairwise. And we import cosine similarity.
| 244.96 | 260.4 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t250.8
|
And to calculate our cosine similarity, all we do is take that function. And inside here, we pass
| 250.8 | 266.88 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t261.2
|
our first sentence. So this three years later, the coffin is still full of jello. I want to pass
| 261.2 | 275.68 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t267.92
|
that sentence vector, which is just an index zero of our sentence Vets array.
| 267.92 | 283.92 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t275.68
|
And because we are extracting that single array value. So if we just have a look at this, you see
| 275.68 | 291.68 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t283.92
|
that we have a almost like a list of lists here. If we just extract this, we only get a list. So
| 283.92 | 296.16 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t291.68
|
what we want to do is actually keep that inside a list, otherwise we'll get dimension error.
| 291.68 | 304.32 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t297.6
|
And then we can also use the same method to extract the array. So we can extract the array
| 297.6 | 312.8 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t304.32
|
and then we do sentence Vets one onwards. So this will be the remaining sentences.
| 304.32 | 319.44 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t313.76
|
Okay, so let's take these or let's just bring them down here.
| 313.76 | 328.88 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t321.68
|
Calculate this. And we can see that our highest similarity by quite a bit is just 0.72.
| 321.68 | 338.08 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t328.88
|
Now, that means that between this sentence and this sentence, we have a similarity score of 0.72.
| 328.88 | 346.08 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t338.96
|
So clearly, it's working, it's scoring high similarity. And you can play around this and
| 338.96 | 353.44 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t346.08
|
and test multiple different words and sentences and just see how it works. But that's the easy
| 346.08 | 358.96 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t353.44
|
way of putting all this together. So I think it's really cool that we can do that so easily.
| 353.44 | 363.76 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t359.84
|
But I don't think there's really anything else to say about it. So
| 359.84 | 382.8 |
Sentence Similarity With Sentence-Transformers in Python
|
2021-05-05 15:00:09 UTC
|
https://youtu.be/Ey81KfQ3PQU
|
Ey81KfQ3PQU
|
UCv83tO5cePwHMt1952IVVHw
|
Ey81KfQ3PQU-t363.76
| 363.76 | 382.8 |
|
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t0.0
|
Okay so in this video what we're going to do is actually index our data so at the moment we just
| 0 | 14.08 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t5.92
|
have all of our paragraphs from Meditations by Marcus Aurelius and to do this we are going to
| 5.92 | 19.44 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t14.08
|
be using the Elasticsearch document store. So of course if we're using Elasticsearch we first need
| 14.08 | 25.2 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t19.44
|
to actually download and install it so I'm just going to take you through those steps now.
| 19.44 | 33.6 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t25.2
|
And all we need to do is head on over to this website up here
| 25.2 | 43.84 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t35.68
|
and it's elasticssearch.co and you can see the address just there. Now I'm going to follow the
| 35.68 | 49.28 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t43.84
|
instructions for Windows but of course if you're on Linux or Mac just follow through it's very
| 43.84 | 59.76 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t49.28
|
similar either way. So here we're going to install it on Windows using the MSI installer.
| 49.28 | 67.2 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t61.120000000000005
|
So just scroll down here and we can see we can download the package from this link so download
| 61.12 | 75.76 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t67.2
|
that and once you download it just open it and we'll see this window pop up. So once you see
| 67.2 | 82.8 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t75.76
|
this window pop up we just go through with all of the default settings. So install as a service
| 75.76 | 89.2 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t82.80000000000001
|
and continue through obviously if you do need to change anything change it but for me there's
| 82.8 | 97.28 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t89.2
|
nothing here that I want to modify. Notice here we have the HTTP port and we're using 9200 we'll
| 89.2 | 103.2 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t97.28
|
be using that later. We just continue through here default settings and then we click install
| 97.28 | 111.92 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t103.2
|
and we just let that install. Okay so now that we've installed Elasticsearch we can go ahead
| 103.2 | 118 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t111.92
|
and actually check that it's running. So to do that we're going to import Python requests
| 111.92 | 128 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t120.32000000000001
|
and whenever we interact with Elasticsearch it's either going to be through Haystack or it will be
| 120.32 | 137.28 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t128.0
|
through the request library and we'll just interact with the Elasticsearch API. So to check the health
| 128 | 144.96 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t137.28
|
of our cluster so essentially check that it's actually up and running. What we need to do is
| 137.28 | 155.36 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t144.96
|
send a GET request to localhost and if you remember earlier we had it was port 9200. Of course if the
| 144.96 | 162.4 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t155.36
|
port on yours was different modify it this is just the default value and after this we need to reach
| 155.36 | 168.8 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t162.4
|
out to the cluster endpoint and we are checking the health and then we'll just format that as a
| 162.4 | 176.56 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t168.8
|
JSON. So what you should see here is we have our cluster which is Elasticsearch. It may have a different name
| 168.8 | 184.24 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t176.56
|
if you modified it but by default it's Elasticsearch. The status is yellow which basically just means we
| 176.56 | 192.56 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t184.24
|
have one node up and running. You can have multiple nodes in Elasticsearch and for your cluster health
| 184.24 | 201.92 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t192.56
|
to be green it will expect your shards of indexes to have backup shards across different nodes and
| 192.56 | 205.76 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t201.92000000000002
|
obviously we can't do that if we only have one node but it's completely fine for us because we're
| 201.92 | 211.68 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t205.76000000000002
|
just in development. If you're in production yes you'd probably want it to have those backup shards.
| 205.76 | 217.76 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t211.68
|
If none of that made any sense don't worry about it we really don't need to know any of that for what we're doing here.
| 211.68 | 227.04 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t219.92000000000002
|
Now what we can also do is we can check if we have any indices already.
| 219.92 | 237.92 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t229.20000000000002
|
Now if I take a look at mine I will already have some indices set up which I've just set up prior
| 229.2 | 246.88 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t237.92
|
to recording this and to check that we go to localhost again
| 237.92 | 258.96 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t249.83999999999997
|
and this time we want to call the cat API which is what we would call whenever we want to see
| 249.84 | 267.52 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t258.96
|
data in a table human readable format rather than JSON and what we're checking here are the indices.
| 258.96 | 275.28 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t269.59999999999997
|
And we'll just add text on there so we can actually see that and this is quite messy so if we just
| 269.6 | 283.28 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t275.28
|
print it instead look a bit cleaner. Okay so you can see I have these two indices you shouldn't I
| 275.28 | 289.84 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t283.28
|
don't think have either of those no you won't have either of those so don't worry about that.
| 283.28 | 296.56 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t289.84
|
Now what we are going to do is create a new index which will be called Aurelius and that is where we
| 289.84 | 306.96 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t296.55999999999995
|
will put our documents. Now to actually implement that we will be going through the Haystack library
| 296.56 | 320.08 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t306.96
|
which you can pip install farm Haystack and what we want to do is from Haystack dot document store
| 306.96 | 326.32 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t322.71999999999997
|
elastic search import
| 322.72 | 336.56 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t328.96
|
elastic search document store. So this is our document store instance and of course
| 328.96 | 343.68 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t336.56
|
this is not aware of our elastic search instance we need to initialize that so
| 336.56 | 347.52 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t344.88
|
we'll store it in a variable called doc store
| 344.88 | 352.48 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t349.84000000000003
|
and all we write is elastic search document store.
| 349.84 | 358.88 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t353.84000000000003
|
Now we need to initialize it with the parameters so it knows where to connect to our elastic search
| 353.84 | 371.76 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t358.88
|
instance. So to do that we write host and this is local host. Now if you have a username and
| 358.88 | 377.76 |
How to Index Q&A Data With Haystack and Elasticsearch
|
2021-04-12 15:00:11 UTC
|
https://youtu.be/Vwq7Ucp9UCw
|
Vwq7Ucp9UCw
|
UCv83tO5cePwHMt1952IVVHw
|
Vwq7Ucp9UCw-t371.76
|
password set which you don't by default you will need to enter them in here. I don't have any set so
| 371.76 | 380.16 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.