So, in this case, 1 word will be represented as a vector shape (5000,) with only one β1β and 4999 β0β in that vector, right? So why is that a one-dimensional input vector (with 5000 units) instead of a 5000-dimensional vector? I donβt get the difference among units and dimensions, especially regarding language

The number of dimensions is the number of coordinates needed to identify each value.

For example, a 2D matrix would have two coordinates, one for the rows and one for the columns. It might be noted as X(r,c).

A 3D matrix would have three coordinates, for example a color image would have a rows and column for each of three colors (red, blue, green). It might be noted as A(x,y,3).

The number of elements in a dimension is a different concept than the number of dimensions.

Thank you for the answer. Still have some doubts. So, the coordinates to represent a word vector after one-hot encoding of shape (5000,) is only one? How that vector will be represented in the vectorial space? Different words would give vectors in the same axis with only different lengths? And what if the word vector has not only one β1β but two β1β in a vector shape (5000,)? Would that be also 1 dimensional?

I feel there is a misconception here between classic math and CS/NumPy/assignment notebook terminology.
In math, a vector of 5000 values is called a 5000-dimensional vector.
However, in numpy, a vector of shape (5000,) is a rank-1 ndarray, sometimes called 1-dimensional array / 1-dimensional vector (meaning a 1 sequence of numbers, in 1 dimension).

Values βinsideβ vectors do not affect dimensionality in both terminologies.