Papers
Init file.
ArxivReader #
Bases: BaseReader
Arxiv Reader.
Gets a search query, return a list of Documents of the top corresponding scientific papers on Arxiv.
Source code in llama-index-integrations/readers/llama-index-readers-papers/llama_index/readers/papers/arxiv/base.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
load_data #
load_data(search_query: str, papers_dir: Optional[str] = '.papers', max_results: Optional[int] = 10) -> List[Document]
Search for a topic on Arxiv, download the PDFs of the top results locally, then read them.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
search_query |
str
|
A topic to search for (e.g. "Artificial Intelligence"). |
required |
papers_dir |
Optional[str]
|
Locally directory to store the papers |
'.papers'
|
max_results |
Optional[int]
|
Maximum number of papers to fetch. |
10
|
Returns:
Type | Description |
---|---|
List[Document]
|
List[Document]: A list of Document objects. |
Source code in llama-index-integrations/readers/llama-index-readers-papers/llama_index/readers/papers/arxiv/base.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
load_papers_and_abstracts #
load_papers_and_abstracts(search_query: str, papers_dir: Optional[str] = '.papers', max_results: Optional[int] = 10) -> Tuple[List[Document], List[Document]]
Search for a topic on Arxiv, download the PDFs of the top results locally, then read them.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
search_query |
str
|
A topic to search for (e.g. "Artificial Intelligence"). |
required |
papers_dir |
Optional[str]
|
Locally directory to store the papers |
'.papers'
|
max_results |
Optional[int]
|
Maximum number of papers to fetch. |
10
|
Returns:
Type | Description |
---|---|
List[Document]
|
List[Document]: A list of Document objects representing the papers themselves |
List[Document]
|
List[Document]: A list of Document objects representing abstracts only |
Source code in llama-index-integrations/readers/llama-index-readers-papers/llama_index/readers/papers/arxiv/base.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
PubmedReader #
Bases: BaseReader
Pubmed Reader.
Gets a search query, return a list of Documents of the top corresponding scientific papers on Pubmed.
Source code in llama-index-integrations/readers/llama-index-readers-papers/llama_index/readers/papers/pubmed/base.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
|
load_data_bioc #
load_data_bioc(search_query: str, max_results: Optional[int] = 10) -> List[Document]
Search for a topic on Pubmed, fetch the text of the most relevant full-length papers. Uses the BoiC API, which has been down a lot.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
search_query |
str
|
A topic to search for (e.g. "Alzheimers"). |
required |
max_results |
Optional[int]
|
Maximum number of papers to fetch. |
10
|
Returns:
Type | Description |
---|---|
List[Document]
|
List[Document]: A list of Document objects. |
Source code in llama-index-integrations/readers/llama-index-readers-papers/llama_index/readers/papers/pubmed/base.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|
load_data #
load_data(search_query: str, max_results: Optional[int] = 10) -> List[Document]
Search for a topic on Pubmed, fetch the text of the most relevant full-length papers.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
search_query |
str
|
A topic to search for (e.g. "Alzheimers"). |
required |
max_results |
Optional[int]
|
Maximum number of papers to fetch. |
10
|
Returns:
Type | Description |
---|---|
List[Document]
|
List[Document]: A list of Document objects. |
Source code in llama-index-integrations/readers/llama-index-readers-papers/llama_index/readers/papers/pubmed/base.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
|