id stringlengths 14 16 | text stringlengths 45 2.73k | source stringlengths 49 114 |
|---|---|---|
1986249a4dec-32 | from langchain.docstore.document import Document
cur_idx = -1
semantic_snippets = []
# Assumption: headings have higher font size than their respective content
for s in snippets:
# if current snippet's font size > previous section's heading => it is a new heading
if not semantic_snippets or s[1] > semantic_snip... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html |
1986249a4dec-33 | Document(page_content='Recently, various DL models and datasets have been developed for layout analysis\ntasks. The dhSegment [22] utilizes fully convolutional networks [20] for segmen-\ntation tasks on historical documents. Object detection-based methods like Faster\nR-CNN [28] and Mask R-CNN [12] are used for identif... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html |
1986249a4dec-34 | by Neudecker et al. [21], it is designed for\nanalyzing historical documents, and provides no supports for recent DL models.\nThe DocumentLayoutAnalysis project8 focuses on processing born-digital PDF\ndocuments via analyzing the stored PDF data. Repositories like DeepLayout9\nand Detectron2-PubLayNet10 are individual ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html |
1986249a4dec-35 | type as ‘code’.\n7 https://ocr-d.de/en/about\n8 https://github.com/BobLd/DocumentLayoutAnalysis\n9 https://github.com/leonlulu/DeepLayout\n10 https://github.com/hpanwar08/detectron2\n11 https://github.com/JaidedAI/EasyOCR\n12 https://github.com/PaddlePaddle/PaddleOCR\n4\nZ. Shen et al.\nFig. 1: The overall architecture... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html |
1986249a4dec-36 | and deploying models for general computer\nvision and natural language processing problems. LayoutParser, on the other\nhand, specializes specifically in DIA tasks. LayoutParser is also equipped with a\ncommunity platform inspired by established model hubs such as Torch Hub [23]\nand TensorFlow Hub [1]. It enables the s... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html |
1986249a4dec-37 | Using PyMuPDF#
This is the fastest of the PDF parsing options, and contains detailed metadata about the PDF and its pages, as well as returns one document per page.
from langchain.document_loaders import PyMuPDFLoader
loader = PyMuPDFLoader("example_data/layout-parser-paper.pdf")
data = loader.load()
data[0] | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html |
1986249a4dec-38 | Document(page_content='LayoutParser: A Unified Toolkit for Deep\nLearning Based Document Image Analysis\nZejiang Shen1 (�), Ruochen Zhang2, Melissa Dell3, Benjamin Charles Germain\nLee4, Jacob Carlson3, and Weining Li5\n1 Allen Institute for AI\nshannons@allenai.org\n2 Brown University\nruochen zhang@brown.edu\n3 Harvar... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html |
1986249a4dec-39 | processing and computer\nvision, none of them are optimized for challenges in the domain of DIA.\nThis represents a major gap in the existing toolkit, as DIA is central to\nacademic research across a wide range of disciplines in the social sciences\nand humanities. This paper introduces LayoutParser, an open-source\nli... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html |
1986249a4dec-40 | Learning(DL)-based approaches are the state-of-the-art for a wide range of\ndocument image analysis (DIA) tasks including document image classification [11,\narXiv:2103.15348v2 [cs.CV] 21 Jun 2021\n', lookup_str='', metadata={'file_path': 'example_data/layout-parser-paper.pdf', 'page_number': 1, 'total_pages': 16, 'fo... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html |
1986249a4dec-41 | Additionally, you can pass along any of the options from the PyMuPDF documentation as keyword arguments in the load call, and it will be pass along to the get_text() call.
previous
Obsidian
next
PowerPoint
Contents
Using PyPDF
Using Unstructured
Retain Elements
Fetching remote PDFs using Unstructured
Using PDFMiner... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html |
95370ad86ec0-0 | .ipynb
.pdf
Copy Paste
Contents
Metadata
Copy Paste#
This notebook covers how to load a document object from something you just want to copy and paste. In this case, you don’t even need to use a DocumentLoader, but rather can just construct the Document directly.
from langchain.docstore.document import Document
text ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/copypaste.html |
cf58bd5e1daf-0 | .ipynb
.pdf
GCS Directory
Contents
Specifying a prefix
GCS Directory#
This covers how to load document objects from an Google Cloud Storage (GCS) directory.
from langchain.document_loaders import GCSDirectoryLoader
# !pip install google-cloud-storage
loader = GCSDirectoryLoader(project_name="aist", bucket="testing-hw... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gcs_directory.html |
cf58bd5e1daf-1 | Specifying a prefix#
You can also specify a prefix for more finegrained control over what files to load.
loader = GCSDirectoryLoader(project_name="aist", bucket="testing-hwc", prefix="fake")
loader.load()
/Users/harrisonchase/workplace/langchain/.venv/lib/python3.10/site-packages/google/auth/_default.py:83: UserWarning... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gcs_directory.html |
cf58bd5e1daf-2 | By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on Apr 21, 2023. | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gcs_directory.html |
2650fb503f95-0 | .ipynb
.pdf
Confluence
Confluence#
A loader for Confluence pages.
This currently supports both username/api_key and Oauth2 login.
Specify a list page_ids and/or space_key to load in the corresponding pages into Document objects, if both are specified the union of both sets will be returned.
You can also specify a boole... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/confluence.html |
4b8482519870-0 | .ipynb
.pdf
Apify Dataset
Contents
Prerequisites
An example with question answering
Apify Dataset#
This notebook shows how to load Apify datasets to LangChain.
Apify Dataset is a scaleable append-only storage with sequential access built for storing structured web scraping results, such as a list of products or Googl... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/apify_dataset.html |
4b8482519870-1 | from langchain.docstore.document import Document
from langchain.document_loaders import ApifyDatasetLoader
from langchain.indexes import VectorstoreIndexCreator
loader = ApifyDatasetLoader(
dataset_id="your-dataset-id",
dataset_mapping_function=lambda item: Document(
page_content=item["text"] or "", met... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/apify_dataset.html |
f4da9577f086-0 | .ipynb
.pdf
Unstructured File Loader
Contents
Retain Elements
Define a Partitioning Strategy
PDF Example
Unstructured File Loader#
This notebook covers how to use Unstructured to load files of many types. Unstructured currently supports loading of text files, powerpoints, html, pdfs, images, and more.
# # Install pac... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/unstructured_file.html |
f4da9577f086-1 | loader = UnstructuredFileLoader("./example_data/state_of_the_union.txt", mode="elements")
docs = loader.load()
docs[:5]
[Document(page_content='Madam Speaker, Madam Vice President, our First Lady and Second Gentleman. Members of Congress and the Cabinet. Justices of the Supreme Court. My fellow Americans.', lookup_str=... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/unstructured_file.html |
f4da9577f086-2 | from langchain.document_loaders import UnstructuredFileLoader
loader = UnstructuredFileLoader("layout-parser-paper-fast.pdf", strategy="fast", mode="elements")
docs = loader.load()
docs[:5]
[Document(page_content='1', lookup_str='', metadata={'source': 'layout-parser-paper-fast.pdf', 'filename': 'layout-parser-paper-fa... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/unstructured_file.html |
f4da9577f086-3 | docs = loader.load()
docs[:5]
[Document(page_content='LayoutParser : A Unified Toolkit for Deep Learning Based Document Image Analysis', lookup_str='', metadata={'source': '../../layout-parser-paper.pdf'}, lookup_index=0),
Document(page_content='Zejiang Shen 1 ( (ea)\n ), Ruochen Zhang 2 , Melissa Dell 3 , Benjamin Cha... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/unstructured_file.html |
9ac7f7aa7adc-0 | .ipynb
.pdf
GitBook
Contents
Load from single GitBook page
Load from all paths in a given GitBook
GitBook#
How to pull page data from any GitBook.
from langchain.document_loaders import GitbookLoader
loader = GitbookLoader("https://docs.gitbook.com")
Load from single GitBook page#
page_data = loader.load()
page_data
... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gitbook.html |
9ac7f7aa7adc-1 | all_pages_data = loader.load()
Fetching text from https://docs.gitbook.com/
Fetching text from https://docs.gitbook.com/getting-started/overview
Fetching text from https://docs.gitbook.com/getting-started/import
Fetching text from https://docs.gitbook.com/getting-started/git-sync
Fetching text from https://docs.gitbook... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gitbook.html |
9ac7f7aa7adc-2 | Fetching text from https://docs.gitbook.com/troubleshooting/hard-refresh
Fetching text from https://docs.gitbook.com/troubleshooting/report-bugs
Fetching text from https://docs.gitbook.com/troubleshooting/connectivity-issues
Fetching text from https://docs.gitbook.com/troubleshooting/support
print(f"fetched {len(all_pa... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gitbook.html |
9ac7f7aa7adc-3 | Document(page_content="Import\nFind out how to easily migrate your existing documentation and which formats are supported.\nThe import function allows you to migrate and unify existing documentation in GitBook. You can choose to import single or multiple pages although limits apply. \nPermissions\nAll members with edit... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gitbook.html |
9ac7f7aa7adc-4 | in the page action menu, found in the table of contents:\nImport from the page action menu\nWhen you choose your input source, instructions will explain how to proceed.\nAlthough GitBook supports importing content from different kinds of sources, the end result might be different from your source due to differences in ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gitbook.html |
9ac7f7aa7adc-5 | previous
Git
next
Google Drive
Contents
Load from single GitBook page
Load from all paths in a given GitBook
By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on Apr 21, 2023. | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gitbook.html |
f7455f227a6a-0 | .ipynb
.pdf
Images
Contents
Using Unstructured
Retain Elements
Images#
This covers how to load images such as JPGs PNGs into a document format that we can use downstream.
Using Unstructured#
from langchain.document_loaders.image import UnstructuredImageLoader
loader = UnstructuredImageLoader("layout-parser-paper-fast... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/image.html |
f7455f227a6a-1 | Document(page_content="LayoutParser: A Unified Toolkit for Deep\nLearning Based Document Image Analysis\n\n\n‘Zxjiang Shen' (F3}, Ruochen Zhang”, Melissa Dell*, Benjamin Charles Germain\nLeet, Jacob Carlson, and Weining LiF\n\n\nsugehen\n\nshangthrows, et\n\n“Abstract. Recent advanocs in document image analysis (DIA) h... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/image.html |
f7455f227a6a-2 | streamlining the sage of DL in DIA research and appicn\n‘tons The core LayoutFaraer brary comes with a sch of simple and\nIntative interfaee or applying and eutomiing DI. odel fr Inyo de\npltfom for sharing both protrined modes an fal document dist\n{ation pipeline We demonutate that LayootPareer shea fr both\nlightwei... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/image.html |
f7455f227a6a-3 | Retain Elements#
Under the hood, Unstructured creates different “elements” for different chunks of text. By default we combine those together, but you can easily keep that separation by specifying mode="elements".
loader = UnstructuredImageLoader("layout-parser-paper-fast.jpg", mode="elements")
data = loader.load()
dat... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/image.html |
21efa1ad66b7-0 | .ipynb
.pdf
Markdown
Contents
Retain Elements
Markdown#
This covers how to load markdown documents into a document format that we can use downstream.
from langchain.document_loaders import UnstructuredMarkdownLoader
loader = UnstructuredMarkdownLoader("../../../../README.md")
data = loader.load()
data | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html |
21efa1ad66b7-1 | [Document(page_content="ð\x9f¦\x9cï¸\x8fð\x9f”\x97 LangChain\n\nâ\x9a¡ Building applications with LLMs through composability â\x9a¡\n\nProduction Support: As you move your LangChains into production, we'd love to offer more comprehensive support.\nPlease fill out this form and we'll set up a dedicated support Slack cha... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html |
21efa1ad66b7-2 | Chatbots\n\nDocumentation\n\nEnd-to-end Example: Chat-LangChain\n\nð\x9f¤\x96 Agents\n\nDocumentation\n\nEnd-to-end Example: GPT+WolframAlpha\n\nð\x9f“\x96 Documentation\n\nPlease see here for full documentation on:\n\nGetting started (installation, setting up the environment, simple examples)\n\nHow-To examples (demos... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html |
21efa1ad66b7-3 | chains for common applications.\n\nð\x9f“\x9a Data Augmented Generation:\n\nData Augmented Generation involves specific types of chains that first interact with an external datasource to fetch data to use in the generation step. Examples of this include summarization of long pieces of text and question/answering over s... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html |
21efa1ad66b7-4 | is using language models themselves to do the evaluation. LangChain provides some prompts/chains for assisting in this.\n\nFor more information on these concepts, please see our full documentation.\n\nð\x9f’\x81 Contributing\n\nAs an open source project in a rapidly developing field, we are extremely open to contributi... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html |
21efa1ad66b7-5 | Retain Elements#
Under the hood, Unstructured creates different “elements” for different chunks of text. By default we combine those together, but you can easily keep that separation by specifying mode="elements".
loader = UnstructuredMarkdownLoader("../../../../README.md", mode="elements")
data = loader.load()
data[0]... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html |
5a03cb45baaf-0 | .ipynb
.pdf
Blackboard
Blackboard#
This covers how to load data from a Blackboard Learn instance.
from langchain.document_loaders import BlackboardLoader
loader = BlackboardLoader(
blackboard_course_url="https://blackboard.example.com/webapps/blackboard/execute/announcement?method=search&context=course_entry&course... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/blackboard.html |
64a0b1fce5c6-0 | .ipynb
.pdf
Directory Loader
Contents
Change loader class
Directory Loader#
This covers how to use the DirectoryLoader to load all documents in a directory. Under the hood, by default this uses the UnstructuredLoader
from langchain.document_loaders import DirectoryLoader
We can use the glob parameter to control which... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/directory_loader.html |
0167a7992ed0-0 | .ipynb
.pdf
PowerPoint
Contents
Retain Elements
PowerPoint#
This covers how to load PowerPoint documents into a document format that we can use downstream.
from langchain.document_loaders import UnstructuredPowerPointLoader
loader = UnstructuredPowerPointLoader("example_data/fake-power-point.pptx")
data = loader.load... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/powerpoint.html |
c26f2272a05f-0 | .ipynb
.pdf
Airbyte JSON
Airbyte JSON#
This covers how to load any source from Airbyte into a local JSON file that can be read in as a document
Prereqs:
Have docker desktop installed
Steps:
Clone Airbyte from GitHub - git clone https://github.com/airbytehq/airbyte.git
Switch into Airbyte directory - cd airbyte
Start Ai... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/airbyte_json.html |
c26f2272a05f-1 | game_indices:
game_index: 180
version:
name: red
url: https://pokeapi.co/api/v2/version/1/
game_index: 180
version:
name: blue
url: https://pokeapi.co/api/v2/version/2/
game_index: 180
version:
n
previous
CoNLL-U
next
Apify Dataset
By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/airbyte_json.html |
97b7ee397df4-0 | .ipynb
.pdf
Image captions
Contents
Prepare a list of image urls from Wikimedia
Create the loader
Create the index
Query
Image captions#
This notebook shows how to use the ImageCaptionLoader tutorial to generate a query-able index of image captions
from langchain.document_loaders import ImageCaptionLoader
Prepare a l... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/image_captions.html |
97b7ee397df4-1 | 'https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/2022-01-22_Men%27s_World_Cup_at_2021-22_St._Moritz%E2%80%93Celerina_Luge_World_Cup_and_European_Championships_by_Sandro_Halank%E2%80%93257.jpg/288px-2022-01-22_Men%27s_World_Cup_at_2021-22_St._Moritz%E2%80%93Celerina_Luge_World_Cup_and_European_Championships_by... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/image_captions.html |
97b7ee397df4-2 | Document(page_content='an image of a shark swimming in the ocean [SEP]', metadata={'image_path': 'https://upload.wikimedia.org/wikipedia/commons/thumb/7/71/Tibur%C3%B3n_azul_%28Prionace_glauca%29%2C_canal_Fayal-Pico%2C_islas_Azores%2C_Portugal%2C_2020-07-27%2C_DD_14.jpg/270px-Tibur%C3%B3n_azul_%28Prionace_glauca%29%2C_... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/image_captions.html |
97b7ee397df4-3 | Document(page_content='an image of a man on skis in the snow [SEP]', metadata={'image_path': 'https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/2022-01-22_Men%27s_World_Cup_at_2021-22_St._Moritz%E2%80%93Celerina_Luge_World_Cup_and_European_Championships_by_Sandro_Halank%E2%80%93257.jpg/288px-2022-01-22_Men%27s_... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/image_captions.html |
97b7ee397df4-4 | from .autonotebook import tqdm as notebook_tqdm
/Users/saitosean/dev/langchain/.venv/lib/python3.10/site-packages/transformers/generation/utils.py:1313: UserWarning: Using `max_length`'s default (20) to control the generation length. This behaviour is deprecated and will be removed from the config in v5 of Transformers... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/image_captions.html |
c65e6d66a8b9-0 | .ipynb
.pdf
DuckDB Loader
Contents
Specifying Which Columns are Content vs Metadata
Adding Source to Metadata
DuckDB Loader#
Load a DuckDB query with one document per row.
from langchain.document_loaders import DuckDBLoader
%%file example.csv
Team,Payroll
Nationals,81.34
Reds,82.20
Writing example.csv
loader = DuckDB... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/duckdb.html |
c65e6d66a8b9-1 | Specifying Which Columns are Content vs Metadata
Adding Source to Metadata
By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on Apr 21, 2023. | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/duckdb.html |
951e01b7060e-0 | .ipynb
.pdf
HTML
Contents
Loading HTML with BeautifulSoup4
HTML#
This covers how to load HTML documents into a document format that we can use downstream.
from langchain.document_loaders import UnstructuredHTMLLoader
loader = UnstructuredHTMLLoader("example_data/fake-content.html")
data = loader.load()
data
[Document... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/html.html |
f3810a9dafd4-0 | .ipynb
.pdf
Git
Contents
Load existing repository from disk
Clone repository from url
Filtering files to load
Git#
This notebook shows how to load text files from Git repository.
Load existing repository from disk#
from git import Repo
repo = Repo.clone_from(
"https://github.com/hwchase17/langchain", to_path="./e... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/git.html |
b1e8b2345b94-0 | .ipynb
.pdf
Subtitle Files
Subtitle Files#
How to load data from subtitle (.srt) files
from langchain.document_loaders import SRTLoader
loader = SRTLoader("example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.srt")
docs = loader.load()
docs[0].page_content[:100]
'<i>Corruption discovered\nat the core of the... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/srt.html |
81f8b0336a8f-0 | .ipynb
.pdf
Notion DB Loader
Contents
Requirements
Setup
1. Create a Notion Table Database
2. Create a Notion Integration
3. Connect the Integration to the Database
4. Get the Database ID
Usage
Notion DB Loader#
NotionDBLoader is a Python class for loading content from a Notion database. It retrieves pages from the d... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/notiondb.html |
81f8b0336a8f-1 | To connect your integration to the database, follow these steps:
Open your database in Notion.
Click on the three-dot menu icon in the top right corner of the database view.
Click on the “+ New integration” button.
Find your integration, you may need to start typing its name in the search box.
Click on the “Connect” bu... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/notiondb.html |
81f8b0336a8f-2 | Requirements
Setup
1. Create a Notion Table Database
2. Create a Notion Integration
3. Connect the Integration to the Database
4. Get the Database ID
Usage
By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on Apr 21, 2023. | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/notiondb.html |
c36f9d1f373a-0 | .ipynb
.pdf
WhatsApp Chat
WhatsApp Chat#
This notebook covers how to load data from the WhatsApp Chats into a format that can be ingested into LangChain.
from langchain.document_loaders import WhatsAppChatLoader
loader = WhatsAppChatLoader("example_data/whatsapp_chat.txt")
loader.load()
previous
Web Base
next
Word Docu... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/whatsapp_chat.html |
4f6e9372097e-0 | .ipynb
.pdf
Azure Blob Storage File
Azure Blob Storage File#
This covers how to load document objects from a Azure Blob Storage file.
from langchain.document_loaders import AzureBlobStorageFileLoader
#!pip install azure-storage-blob
loader = AzureBlobStorageFileLoader(conn_str='<connection string>', container='<contain... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/azure_blob_storage_file.html |
1a346076800c-0 | .ipynb
.pdf
Notion
Contents
🧑 Instructions for ingesting your own dataset
Notion#
This notebook covers how to load documents from a Notion database dump.
In order to get this notion dump, follow these instructions:
🧑 Instructions for ingesting your own dataset#
Export your dataset from Notion. You can do this by cl... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/notion.html |
e56f1962347e-0 | .ipynb
.pdf
Figma
Figma#
This notebook covers how to load data from the Figma REST API into a format that can be ingested into LangChain, along with example usage for code generation.
import os
from langchain.document_loaders.figma import FigmaFileLoader
from langchain.text_splitter import CharacterTextSplitter
from la... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/figma.html |
e56f1962347e-1 | # See https://python.langchain.com/en/latest/modules/models/chat/getting_started.html for chat info
system_prompt_template = """You are expert coder Jon Carmack. Use the provided design context to create idomatic HTML/CSS code as possible based on the user request.
Everything must be inline in one file and your... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/figma.html |
e56f1962347e-2 | <!DOCTYPE html>\n<html lang="en">\n<head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <style>\n @import url(\'https://fonts.googleapis.com/css2?family=DM+Sans:wght@500;700&family=Inter:wght@600&display=swap\');\n\n body {\n margin... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/figma.html |
e56f1962347e-3 | font-weight: 700;\n margin: 0;\n }\n\n .header nav {\n display: flex;\n align-items: center;\n }\n\n .header nav a {\n font-size: 14px;\n font-weight: 500;\n text-decoration: none;\n color: #000;\n margin... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/figma.html |
e56f1962347e-4 | Ipsum</a>\n <a href="#">Lorem Ipsum</a>\n <a href="#">Lorem Ipsum</a>\n </nav>\n </header>\n</body>\n</html> | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/figma.html |
e56f1962347e-5 | previous
Facebook Chat
next
GCS Directory
By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on Apr 21, 2023. | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/figma.html |
9054a455e32a-0 | .ipynb
.pdf
iFixit
Contents
Searching iFixit using /suggest
iFixit#
iFixit is the largest, open repair community on the web. The site contains nearly 100k repair manuals, 200k Questions & Answers on 42k devices, and all the data is licensed under CC-BY-NC-SA 3.0.
This loader will allow you to download the text of a r... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-1 | data = loader.load()
data
[Document(page_content="# Banana Teardown\nIn this teardown, we open a banana to see what's inside. Yellow and delicious, but most importantly, yellow.\n\n\n###Tools Required:\n\n - Fingers\n\n - Teeth\n\n - Thumbs\n\n\n###Parts Required:\n\n - None\n\n\n## Step 1\nTake one banana from the bu... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-2 | [Document(page_content='# My iPhone 6 is typing and opening apps by itself\nmy iphone 6 is typing and opening apps by itself. How do i fix this. I just bought it last week.\nI restored as manufactures cleaned up the screen\nthe problem continues\n\n## 27 Answers\n\nFilter by: \n\nMost Helpful\nNewest\nOldest\n\n### Acc... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-3 | same issues, screen freezing, opening apps by itself, selecting the screens and typing on it\'s own. I first suspected aliens and then ghosts and then hackers.\niPhone 6 is weak physically and tend to bend on pressure. And my phone had no case or cover.\nI took the phone to apple stores and they said sensors need to be... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-4 | to iTunes and reset your phone completely. (please take a back-up first).\nAnd your phone should be good to use again.\nWhat really happened here for me is that the sensors might have stuck to the screen and with mild twisting, they got disengaged/released.\nI posted this in Apple Community and the moderators deleted i... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-5 | to local area iphone repairing lab, and they detected that it is an LCD issue. LCD get out of order without any reason (It was neither hit or nor slipped, but LCD get out of order all and sudden, while using it) it started opening things at random. I get LCD replaced with new one, that cost me $80.00 in total ($70.00 ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-6 | took it off I noticed that there was a lot of dust and dirt around the areas that the case didn\'t cover. I shined a light in my ports and noticed they were filled with dust. Tomorrow I plan on using pressurized air to clean it out and the problem should be solved. If you plug in your phone and unplug it and it stops ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-7 | I have my original charger. I am going to clean it and try everyone’s advice. It really sucks! I had 40,000,000 on my heart of Vegas slots! I play every day. I would be spinning and my fingers were no where max buttons and it would light up and switch to max. It did it 3 times before I caught it light up by its s... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-8 | that it\'s most likely a hardware problem--which the "genius" probably knows too.\nI\'m getting ready to go Android.\n\n\n\n### Other Answer\nI experienced similar ghost touches. Two weeks ago, I changed my iPhone 6 Plus shell (I had forced the phone into it because it’s pretty tight), and also put a new glass screen ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-9 | solved.\n\n\n\n### Other Answer\nthank you so much for this post! i was struggling doing the reset because i cannot type userids and passwords correctly because the iphone 6 plus i have kept on typing letters incorrectly. I have been doing it for a day until i come across this article. Very helpful! God bless you!!\n\n... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-10 | up and fix your phone for free! You pay a lot for a Apple they should back it. I did the next 30 month payments and finally have it paid off in June. My iPad sept. Looking forward to a almost 100 drop in my phone bill! Now this crap!!! Really\n\n\n\n### Other Answer\nIf your phone is JailBroken, suggest downloadin... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-11 | below. I took it off and it stopped. I ordered more protectors from amazon and replaced it\n\n\n\n### Other Answer\niPhone 6 Plus first generation….I had the same issues as all above, apps opening by themselves, self typing, ultra sensitive screen, items jumping around all over….it even called someone on FaceTime twice... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-12 | laptop that was plugged in to the same wall plug as my phone charger with the dollar store block plug….until I changed the block plug.\n\n\n\n### Other Answer\nHad the problem: Inherited a 6s Plus from my wife. She had no problem with it.\nLooks like it was merely the cheap phone case I purchased on Amazon. It was eith... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-13 | come back to needing the original iPhone cable…or at least another 1 that would have come with another iPhone…not the $5 Store fast charging cables. My original cable is pretty beat up - like most that I see - but I’ve been beaten up much MUCH less by sticking with its use! I didn’t find that the casing/shell around ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-14 | way to get rid of my password and all of a sudden my phone wants to touch stuff on its own which got my phone disabled many times to the point where I have to wait a whole hour and I really need to finish something on my phone today PLEASE HELPPPP\n\n\n\n### Other Answer\nIn my case , iphone 6 screen was faulty. I got ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-15 | in LCD connector on the motherboard, specially if you lock/unlock screen and screen works again for sometime. lcd connectors gets disconnected lightly from the motherboard due to multiple falls and hits after sometime. best of luck for all\n\n\n\n### Other Answer\nI am facing the same issue whereby these ghost touches ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-16 | all my images and videos to my PC and restarted the phone - problem solved. Been working now for two days.', lookup_str='', metadata={'source': 'https://www.ifixit.com/Answers/View/318583/My+iPhone+6+is+typing+and+opening+apps+by+itself', 'title': 'My iPhone 6 is typing and opening apps by itself'}, lookup_index=0)] | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-17 | loader = IFixitLoader("https://www.ifixit.com/Device/Standard_iPad")
data = loader.load()
data
[Document(page_content="Standard iPad\nThe standard edition of the tablet computer made by Apple.\n== Background Information ==\n\nOriginally introduced in January 2010, the iPad is Apple's standard edition of their tablet co... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-18 | data = IFixitLoader.load_suggestions("Banana")
data
[Document(page_content='Banana\nTasty fruit. Good source of potassium. Yellow.\n== Background Information ==\n\nCommonly misspelled, this wildly popular, phone shaped fruit serves as nutrition and an obstacle to slow down vehicles racing close behind you. Also used co... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
9054a455e32a-19 | Document(page_content="# Banana Teardown\nIn this teardown, we open a banana to see what's inside. Yellow and delicious, but most importantly, yellow.\n\n\n###Tools Required:\n\n - Fingers\n\n - Teeth\n\n - Thumbs\n\n\n###Parts Required:\n\n - None\n\n\n## Step 1\nTake one banana from the bunch.\nDon't squeeze too har... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html |
418bd3c193fc-0 | .ipynb
.pdf
Email
Contents
Using Unstructured
Retain Elements
Using OutlookMessageLoader
Email#
This notebook shows how to load email (.eml) and Microsoft Outlook (.msg) files.
Using Unstructured#
from langchain.document_loaders import UnstructuredEmailLoader
loader = UnstructuredEmailLoader('example_data/fake-email.... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/email.html |
418bd3c193fc-1 | previous
DuckDB Loader
next
EPubs
Contents
Using Unstructured
Retain Elements
Using OutlookMessageLoader
By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on Apr 21, 2023. | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/email.html |
b1fb943e5424-0 | .ipynb
.pdf
Notebook
Notebook#
This notebook covers how to load data from an .ipynb notebook into a format suitable by LangChain.
from langchain.document_loaders import NotebookLoader
loader = NotebookLoader("example_data/notebook.ipynb", include_outputs=True, max_output_length=20, remove_newline=True)
NotebookLoader.l... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/notebook.html |
b1fb943e5424-1 | traceback (bool): whether to include full traceback (default is False).
loader.load()
[Document(page_content='\'markdown\' cell: \'[\'# Notebook\', \'\', \'This notebook covers how to load data from an .ipynb notebook into a format suitable by LangChain.\']\'\n\n \'code\' cell: \'[\'from langchain.document_loaders impo... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/notebook.html |
6b2b286bd8bc-0 | .ipynb
.pdf
Obsidian
Obsidian#
This notebook covers how to load documents from an Obsidian database.
Since Obsidian is just stored on disk as a folder of Markdown files, the loader just takes a path to this directory.
Obsidian files also sometimes contain metadata which is a YAML block at the top of the file. These val... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/obsidian.html |
94a37b205703-0 | .ipynb
.pdf
AZLyrics
AZLyrics#
This covers how to load AZLyrics webpages into a document format that we can use downstream.
from langchain.document_loaders import AZLyricsLoader
loader = AZLyricsLoader("https://www.azlyrics.com/lyrics/mileycyrus/flowers.html")
data = loader.load()
data | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/azlyrics.html |
94a37b205703-1 | [Document(page_content="Miley Cyrus - Flowers Lyrics | AZLyrics.com\n\r\nWe were good, we were gold\nKinda dream that can't be sold\nWe were right till we weren't\nBuilt a home and watched it burn\n\nI didn't wanna leave you\nI didn't wanna lie\nStarted to cry but then remembered I\n\nI can buy myself flowers\nWrite my... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/azlyrics.html |
94a37b205703-2 | to myself for hours, yeah\nSay things you don't understand\nI can take myself dancing\nAnd I can hold my own hand\nYeah, I can love me better than you can\n\nCan love me better\nI can love me better, baby\nCan love me better\nI can love me better, baby\nCan love me better\nI can love me better, baby\nCan love me better... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/azlyrics.html |
94a37b205703-3 | love me better\nI\n", lookup_str='', metadata={'source': 'https://www.azlyrics.com/lyrics/mileycyrus/flowers.html'}, lookup_index=0)] | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/azlyrics.html |
94a37b205703-4 | previous
Apify Dataset
next
Azure Blob Storage Container
By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on Apr 21, 2023. | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/azlyrics.html |
53696ead69e0-0 | .ipynb
.pdf
Getting Started
Getting Started#
The default recommended text splitter is the RecursiveCharacterTextSplitter. This text splitter takes a list of characters. It tries to create chunks based on splitting on the first character, but if any chunks are too large it then moves onto the next character, and so fort... | https://python.langchain.com/en/latest/modules/indexes/text_splitters/getting_started.html |
53696ead69e0-1 | previous
Text Splitters
next
Character Text Splitter
By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on Apr 21, 2023. | https://python.langchain.com/en/latest/modules/indexes/text_splitters/getting_started.html |
c3491b57039f-0 | .ipynb
.pdf
RecursiveCharacterTextSplitter
RecursiveCharacterTextSplitter#
This text splitter is the recommended one for generic text. It is parameterized by a list of characters. It tries to split on them in order until the chunks are small enough. The default list is ["\n\n", "\n", " ", ""]. This has the effect of tr... | https://python.langchain.com/en/latest/modules/indexes/text_splitters/examples/recursive_text_splitter.html |
1350273bdbc0-0 | .ipynb
.pdf
Spacy Text Splitter
Spacy Text Splitter#
Another alternative to NLTK is to use Spacy.
How the text is split: by Spacy
How the chunk size is measured: by length function passed in (defaults to number of characters)
# This is a long document we can split up.
with open('../../../state_of_the_union.txt') as f:
... | https://python.langchain.com/en/latest/modules/indexes/text_splitters/examples/spacy.html |
1350273bdbc0-1 | By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on Apr 21, 2023. | https://python.langchain.com/en/latest/modules/indexes/text_splitters/examples/spacy.html |
03141ed809ad-0 | .ipynb
.pdf
Character Text Splitter
Character Text Splitter#
This is a more simple method. This splits based on characters (by default “\n\n”) and measure chunk length by number of characters.
How the text is split: by single character
How the chunk size is measured: by length function passed in (defaults to number of ... | https://python.langchain.com/en/latest/modules/indexes/text_splitters/examples/character_text_splitter.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.