<jupyter_start><jupyter_text>Identifying similar vectors<jupyter_code>token = nlp(u'lion cat pets')

for token1 in token:
    for token2 in token:
        print(token1, token2, token1.similarity(token2))
### display as markdown 

a,b,c = token

from IPython.display import Markdown, display
display(Markdown(f'<table><tr><th></th><th>{a.text}</th><th>{b.text}</th><th>{c.text}</th></tr>\
<tr><td>**{a.text}**</td><td>{a.similarity(a):{.4}}</td><td>{b.similarity(a):{.4}}</td><td>{c.similarity(a):{.4}}</td></tr>\
<tr><td>**{b.text}**</td><td>{a.similarity(b):{.4}}</td><td>{b.similarity(b):{.4}}</td><td>{c.similarity(b):{.4}}</td></tr>\
<tr><td>**{c.text}**</td><td>{a.similarity(c):{.4}}</td><td>{b.similarity(c):{.4}}</td><td>{c.similarity(c):{.4}}</td></tr>'))
nlp(u'lion').similarity(nlp(u'tiger'))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.31812725090036015, 'fraction_numerical': 0.01800720288115246, 'mean_word_length': 7.257425742574258, 'pattern_counts': {'":': 0, '<': 46, '<?xml version=': 0, '>': 46, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '620011', 'license': 'Apache-2.0', 'n_tokens_mistral': 389, 'n_tokens_neox': 355, 'n_words': 32, 'path': 'nlp/UPDATED_NLP_COURSE/04-Semantics-and-Sentiment-Analysis/Word Vectors.ipynb', 'repo_name': 'rishuatgithub/MLPy', 'size': '833'}