I wrote a script to calculate document distance code. It seems working but I couldntcouldn't be sure. (I tried for the small strings and it seems working) Also I am not sure that its fast enough for large texts.
Here is the Document Distance formula :
The frequency is the number of occurrences for each object. Such as for "D1: be or not to be" the frequency will be freq$$(D_1) = {be=2, not=1, or=1, to=2}$$ and $$||D_1|| = \sqrt{2^2 + 1^2 + 1^2 + 2^2}$$
I did not use the acosacos
function since I dontdon't think I need it.
Edit: People asked what is the document distance I am sharing a link
https://www.andrew.cmu.edu/course/15-121/labs/HW-4%20Document%20Distance/lab.html
The frequency is the number of occurrences for each object. Such as for "D1: be or not to be" the frequency will be freq$$(D_1) = {be=2, not=1, or=1, to=2}$$ and $$||D_1|| = \sqrt{2^2 + 1^2 + 1^2 + 2^2}$$
I wrote a document distance code. It seems working but I couldnt be sure. (I tried for the small strings and it seems working) Also I am not sure that its fast enough for large texts.
I did not use the acos since I dont think I need it.
Edit: People asked what is the document distance I am sharing a link
https://www.andrew.cmu.edu/course/15-121/labs/HW-4%20Document%20Distance/lab.html
The frequency is the number of occurrences for each object. Such as for "D1: be or not to be" the frequency will be freq$$(D_1) = {be=2, not=1, or=1, to=2}$$ and $$||D_1|| = \sqrt{2^2 + 1^2 + 1^2 + 2^2}$$
I wrote a script to calculate document distance. It seems working but I couldn't be sure. (I tried for the small strings and it seems working) Also I am not sure that its fast enough for large texts.
Here is the Document Distance formula :
The frequency is the number of occurrences for each object. Such as for "D1: be or not to be" the frequency will be freq$$(D_1) = {be=2, not=1, or=1, to=2}$$ and $$||D_1|| = \sqrt{2^2 + 1^2 + 1^2 + 2^2}$$
I did not use the acos
function since I don't think I need it.
The frequency is the number of occurrences for each object. Such as for "D1: be or not to be" the frequency will be freq$$(D_1) = {be=2, not=1, or=1, to=2}$$ and $$||D_1|| = \sqrt{2^2 + 1^2 + 1^2 + 2^2}$$
The frequency is the number of occurrences for each object. Such as for "D1: be or not to be" the frequency will be freq$$(D_1) = {be=2, not=1, or=1, to=2}$$ and $$||D_1|| = \sqrt{2^2 + 1^2 + 1^2 + 2^2}$$
Edit: People asked what is the document distance I am sharing a link
https://www.andrew.cmu.edu/course/15-121/labs/HW-4%20Document%20Distance/lab.html
Edit: People asked what is the document distance I am sharing a link
https://www.andrew.cmu.edu/course/15-121/labs/HW-4%20Document%20Distance/lab.html