# OpenAlex Reader
```bash
pip install llama-index-readers-openalex
```
This loader will search for papers in OpenAlex and load them in llama-index. The main advantage of using OpenAlex is that you can search the full-text for Open Access papers as well.
## Usage
```python
from llama_index.readers.openalex import OpenAlexReader
openalex_reader = OpenAlexReader(email="shauryr@gmail.com")
query = "biases in large language models"
# changing this to full_text=True will let you search full-text
documents = openalex_reader.load_data(query, full_text=False)
```
## What can it do?
As shown in [demo.ipynb](demo.ipynb) we can get answers with citations.
```python
query = "biases in large language models"
response = query_engine.query(
"list the biases in large language models in a markdown table"
)
```
#### Output
| Source | Biases |
| --------- | ------------------------------------------------------------------------------------------------ |
| Source 1 | Data selection bias, social bias (gender, age, sexual orientation, ethnicity, religion, culture) |
| Source 2 | Biases of what is right and wrong to do, reflecting ethical and moral norms of society |
| Source 3 | Anti-Muslim bias |
| Source 6 | Gender bias |
| Source 9 | Anti-LGBTQ+ bias |
| Source 10 | Potential bias in the output |
## Credits
- OpenAlex API details are listed [here](https://docs.openalex.org/how-to-use-the-api/get-lists-of-entities/search-entities)
- Some code adopted from [pyAlex](https://github.com/J535D165/pyalex/blob/435287ac20d84ca047e84c71e2c32a6bb84f61a1/pyalex/api.py#L95)
Raw data
{
"_id": null,
"home_page": null,
"name": "llama-index-readers-openalex",
"maintainer": "shauryr",
"docs_url": null,
"requires_python": "<4.0,>=3.8.1",
"maintainer_email": null,
"keywords": "academic papers, open access, openalex, scientific papers",
"author": "Your Name",
"author_email": "you@example.com",
"download_url": "https://files.pythonhosted.org/packages/34/9b/fda2954c470f2aa82bb8b71cadebf162f4d40f84db0234c08d8d226bcbf1/llama_index_readers_openalex-0.2.0.tar.gz",
"platform": null,
"description": "# OpenAlex Reader\n\n```bash\npip install llama-index-readers-openalex\n```\n\nThis loader will search for papers in OpenAlex and load them in llama-index. The main advantage of using OpenAlex is that you can search the full-text for Open Access papers as well.\n\n## Usage\n\n```python\nfrom llama_index.readers.openalex import OpenAlexReader\n\nopenalex_reader = OpenAlexReader(email=\"shauryr@gmail.com\")\nquery = \"biases in large language models\"\n\n# changing this to full_text=True will let you search full-text\ndocuments = openalex_reader.load_data(query, full_text=False)\n```\n\n## What can it do?\n\nAs shown in [demo.ipynb](demo.ipynb) we can get answers with citations.\n\n```python\nquery = \"biases in large language models\"\nresponse = query_engine.query(\n \"list the biases in large language models in a markdown table\"\n)\n```\n\n#### Output\n\n| Source | Biases |\n| --------- | ------------------------------------------------------------------------------------------------ |\n| Source 1 | Data selection bias, social bias (gender, age, sexual orientation, ethnicity, religion, culture) |\n| Source 2 | Biases of what is right and wrong to do, reflecting ethical and moral norms of society |\n| Source 3 | Anti-Muslim bias |\n| Source 6 | Gender bias |\n| Source 9 | Anti-LGBTQ+ bias |\n| Source 10 | Potential bias in the output |\n\n## Credits\n\n- OpenAlex API details are listed [here](https://docs.openalex.org/how-to-use-the-api/get-lists-of-entities/search-entities)\n\n- Some code adopted from [pyAlex](https://github.com/J535D165/pyalex/blob/435287ac20d84ca047e84c71e2c32a6bb84f61a1/pyalex/api.py#L95)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "llama-index readers openalex integration",
"version": "0.2.0",
"project_urls": null,
"split_keywords": [
"academic papers",
" open access",
" openalex",
" scientific papers"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9bccf8b562641f6812ca3344e61ef29fe00ba7c1dbd5e6f9b1619a6d14b8072c",
"md5": "89c5edfb19f1873b0f66a9960b94215e",
"sha256": "7947bafe2f9916b918dafe52a320d9c76030240c5f302b3d0559da6763d5cfb1"
},
"downloads": -1,
"filename": "llama_index_readers_openalex-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "89c5edfb19f1873b0f66a9960b94215e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8.1",
"size": 3609,
"upload_time": "2024-08-22T06:43:11",
"upload_time_iso_8601": "2024-08-22T06:43:11.800663Z",
"url": "https://files.pythonhosted.org/packages/9b/cc/f8b562641f6812ca3344e61ef29fe00ba7c1dbd5e6f9b1619a6d14b8072c/llama_index_readers_openalex-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "349bfda2954c470f2aa82bb8b71cadebf162f4d40f84db0234c08d8d226bcbf1",
"md5": "4d91b01ddc028b00a9b18266dc990f4d",
"sha256": "b09ce21baaab09cafa165882d8b89e24873aafeffbdb4885534fbf4cd4a03633"
},
"downloads": -1,
"filename": "llama_index_readers_openalex-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "4d91b01ddc028b00a9b18266dc990f4d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8.1",
"size": 3398,
"upload_time": "2024-08-22T06:43:13",
"upload_time_iso_8601": "2024-08-22T06:43:13.248333Z",
"url": "https://files.pythonhosted.org/packages/34/9b/fda2954c470f2aa82bb8b71cadebf162f4d40f84db0234c08d8d226bcbf1/llama_index_readers_openalex-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-22 06:43:13",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "llama-index-readers-openalex"
}