<jupyter_start><jupyter_text>Similar Papers<jupyter_code>%load_ext autoreload
%autoreload 2

from cord.core import similar_papers, document_vectors
from cord import ResearchPapers
ids = similar_papers('0jhfn824')
ids
def get_index(cord_uid):
    return document_vectors.loc[cord_uid]
import numpy as np
np.where(document_vectors.index == '4x1ckri')
np.where?
papers = ResearchPapers.load()
papers.similar_to('ivwn4nhl')
np.where(document_vectors.index=='le0ogx1s')
document_vectors
row_match = np.where(document_vectors.index == '4x1ck2i')
row_match
papers.covid_related()
papers[12214]
query = """
Efforts to identify the underlying drivers of fear, anxiety and stigma that fuel misinformation and rumor,
particularly social media
"""
papers.search_2d(query)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09885931558935361, 'fraction_numerical': 0.024081115335868188, 'mean_word_length': 8.186046511627907, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '499607', 'license': 'Apache-2.0', 'n_tokens_mistral': 290, 'n_tokens_neox': 262, 'n_words': 60, 'path': 'similar-papers.ipynb', 'repo_name': 'zyberguy/cord19', 'size': '789'}