Skip to content

Commit

Permalink
feat(nlp-spacy/ex1): update subject and audit
Browse files Browse the repository at this point in the history
- clarify required goal of exercise.
- update audit question to avoid floating issues.
  • Loading branch information
nprimo committed Dec 12, 2023
1 parent 9f5882d commit dbf88f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions subjects/ai/nlp-spacy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ I recommend to use:

The goal of this exercise is to learn to load an embedding on `spaCy`.

1. Install and load `en_core_web_sm` version `3.4.1` [embedding](https://github.com/explosion/spacy-models/releases/tag/en_core_web_sm-3.4.1). Compute the embedding of `car`.
1. Install and load `en_core_web_sm` version `3.4.1` [embedding](https://github.com/explosion/spacy-models/releases/tag/en_core_web_sm-3.4.1).
Compute the embedding of `car` and print out its shape.

2. Print out the sum of the first 20 values of the `car` embedding. The result
must be printed out using
[`float.as_integer_ration()`](https://docs.python.org/3/library/stdtypes.html#float.as_integer_ratio)

---

Expand Down Expand Up @@ -94,7 +99,7 @@ The goal of this exercise is to learn to use `spaCy` embedding on a document.

![alt text][logo]

[logo]: ./w3day05ex1_plot.png "Plot"
[logo]: ./w3day05ex1_plot.png 'Plot'

https://medium.com/datadriveninvestor/cosine-similarity-cosine-distance-6571387f9bf8

Expand Down
4 changes: 2 additions & 2 deletions subjects/ai/nlp-spacy/audit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

###### For question 1, is the embedding's shape `(96,)`?

###### Do the 20 first values of the vector sum to `2.9790137708187103`?
###### For question 2, do the 20 first values of the vector sum to `(99959115, 33554432)`?

---

Expand Down Expand Up @@ -58,7 +58,7 @@

![alt text][logo]

[logo]: ../w3day05ex1_plot.png "Plot"
[logo]: ../w3day05ex1_plot.png 'Plot'

---

Expand Down

0 comments on commit dbf88f1

Please sign in to comment.