id
stringlengths
14
16
text
stringlengths
44
2.73k
source
stringlengths
49
114
d926d452363d-0
.rst .pdf Document Loaders Document Loaders# Note Conceptual Guide Combining language models with your own text data is a powerful way to differentiate them. The first step in doing this is to load the data into “documents” - a fancy way of say some pieces of text. This module is aimed at making this easy. A primary dr...
https://python.langchain.com/en/latest/modules/indexes/document_loaders.html
d926d452363d-1
By Harrison Chase © Copyright 2023, Harrison Chase. Last updated on Apr 25, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders.html
5a7261ebb916-0
.ipynb .pdf Getting Started Contents One Line Index Creation Walkthrough Getting Started# LangChain primary focuses on constructing indexes with the goal of using them as a Retriever. In order to best understand what this means, it’s worth highlighting what the base Retriever interface is. The BaseRetriever class in ...
https://python.langchain.com/en/latest/modules/indexes/getting_started.html
5a7261ebb916-1
Create a Retriever from that index Create a question answering chain Ask questions! Each of the steps has multiple sub steps and potential configurations. In this notebook we will primarily focus on (1). We will start by showing the one-liner for doing so, but then break down what is actually going on. First, let’s imp...
https://python.langchain.com/en/latest/modules/indexes/getting_started.html
5a7261ebb916-2
index.query_with_sources(query) {'question': 'What did the president say about Ketanji Brown Jackson', 'answer': " The president said that he nominated Circuit Court of Appeals Judge Ketanji Brown Jackson, one of the nation's top legal minds, to continue Justice Breyer's legacy of excellence, and that she has received...
https://python.langchain.com/en/latest/modules/indexes/getting_started.html
5a7261ebb916-3
We will then select which embeddings we want to use. from langchain.embeddings import OpenAIEmbeddings embeddings = OpenAIEmbeddings() We now create the vectorstore to use as the index. from langchain.vectorstores import Chroma db = Chroma.from_documents(texts, embeddings) Running Chroma using direct local API. Using D...
https://python.langchain.com/en/latest/modules/indexes/getting_started.html
5a7261ebb916-4
) Hopefully this highlights what is going on under the hood of VectorstoreIndexCreator. While we think it’s important to have a simple way to create indexes, we also think it’s important to understand what’s going on under the hood. previous Indexes next Document Loaders Contents One Line Index Creation Walkthrough...
https://python.langchain.com/en/latest/modules/indexes/getting_started.html
6b18ab40dee4-0
.rst .pdf Vectorstores Vectorstores# Note Conceptual Guide Vectorstores are one of the most important components of building indexes. For an introduction to vectorstores and generic functionality see: Getting Started We also have documentation for all the types of vectorstores that are supported. Please see below for t...
https://python.langchain.com/en/latest/modules/indexes/vectorstores.html
2c63ab6e979c-0
.rst .pdf Text Splitters Text Splitters# Note Conceptual Guide When you want to deal with long pieces of text, it is necessary to split up that text into chunks. As simple as this sounds, there is a lot of potential complexity here. Ideally, you want to keep the semantically related pieces of text together. What “seman...
https://python.langchain.com/en/latest/modules/indexes/text_splitters.html
9891479292d6-0
.rst .pdf Retrievers Retrievers# Note Conceptual Guide The retriever interface is a generic interface that makes it easy to combine documents with language models. This interface exposes a get_relevant_documents method which takes in a query (a string) and returns a list of documents. Please see below for a list of all...
https://python.langchain.com/en/latest/modules/indexes/retrievers.html
210b46549c3b-0
.ipynb .pdf s3 Directory Contents Specifying a prefix s3 Directory# This covers how to load document objects from an s3 directory object. from langchain.document_loaders import S3DirectoryLoader #!pip install boto3 loader = S3DirectoryLoader("testing-hwc") loader.load() [Document(page_content='Lorem ipsum dolor sit a...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/s3_directory.html
f3da393524db-0
.ipynb .pdf Telegram Telegram# This notebook covers how to load data from Telegram into a format that can be ingested into LangChain. from langchain.document_loaders import TelegramChatLoader loader = TelegramChatLoader("example_data/telegram.json") loader.load() [Document(page_content="Henry on 2020-01-01T00:00:02: It...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/telegram.html
d8c5ad934266-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
9a76d59e269e-0
.ipynb .pdf YouTube Contents Add video info YouTube loader from Google Cloud Prerequisites 🧑 Instructions for ingesting your Google Docs data YouTube# How to load documents from YouTube transcripts. from langchain.document_loaders import YoutubeLoader # !pip install youtube-transcript-api loader = YoutubeLoader.from...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/youtube.html
9a76d59e269e-1
# Use a Channel youtube_loader_channel = GoogleApiYoutubeLoader(google_api_client=google_api_client, channel_name="Reducible",captions_language="en") # Use Youtube Ids youtube_loader_ids = GoogleApiYoutubeLoader(google_api_client=google_api_client, video_ids=["TrdevFK_am4"], add_video_info=True) # returns a list of Doc...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/youtube.html
7743c3706e86-0
.ipynb .pdf Hacker News Hacker News# How to pull page data and comments from Hacker News from langchain.document_loaders import HNLoader loader = HNLoader("https://news.ycombinator.com/item?id=34817881") data = loader.load() data [Document(page_content="delta_p_delta_x 18 hours ago \n | next [–] \n\nAstrop...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hn.html
7743c3706e86-1
Document(page_content="andrewflnr 19 hours ago \n | prev | next [–] \n\nWhoa. I didn't know the accretion theory of Ia supernovae was dead, much less that it had been since 2011.\n \nreply", lookup_str='', metadata={'source': 'https://news.ycombinator.com/item?id=34817881', 'title': 'What Lights the Univer...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hn.html
ddb077e13f23-0
.ipynb .pdf CSV Loader Contents Customizing the csv parsing and loading Specify a column to be used identify the document source CSV Loader# Load csv files with a single row per document. from langchain.document_loaders.csv_loader import CSVLoader loader = CSVLoader(file_path='./example_data/mlb_teams_2012.csv') data...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-1
[Document(page_content='Team: Nationals\n"Payroll (millions)": 81.34\n"Wins": 98', lookup_str='', metadata={'source': './example_data/mlb_teams_2012.csv', 'row': 0}, lookup_index=0), Document(page_content='Team: Reds\n"Payroll (millions)": 82.20\n"Wins": 97', lookup_str='', metadata={'source': './example_data/mlb_teams...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-2
lookup_index=0), Document(page_content='Team: Rangers\n"Payroll (millions)": 120.51\n"Wins": 93', lookup_str='', metadata={'source': './example_data/mlb_teams_2012.csv', 'row': 6}, lookup_index=0), Document(page_content='Team: Orioles\n"Payroll (millions)": 81.43\n"Wins": 93', lookup_str='', metadata={'source': './exam...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-3
'row': 11}, lookup_index=0), Document(page_content='Team: Dodgers\n"Payroll (millions)": 95.14\n"Wins": 86', lookup_str='', metadata={'source': './example_data/mlb_teams_2012.csv', 'row': 12}, lookup_index=0), Document(page_content='Team: White Sox\n"Payroll (millions)": 96.92\n"Wins": 85', lookup_str='', metadata={'so...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-4
'row': 17}, lookup_index=0), Document(page_content='Team: Padres\n"Payroll (millions)": 55.24\n"Wins": 76', lookup_str='', metadata={'source': './example_data/mlb_teams_2012.csv', 'row': 18}, lookup_index=0), Document(page_content='Team: Mariners\n"Payroll (millions)": 81.97\n"Wins": 75', lookup_str='', metadata={'sour...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-5
'row': 23}, lookup_index=0), Document(page_content='Team: Red Sox\n"Payroll (millions)": 173.18\n"Wins": 69', lookup_str='', metadata={'source': './example_data/mlb_teams_2012.csv', 'row': 24}, lookup_index=0), Document(page_content='Team: Indians\n"Payroll (millions)": 78.43\n"Wins": 68', lookup_str='', metadata={'sou...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-6
Customizing the csv parsing and loading# See the csv module documentation for more information of what csv args are supported. loader = CSVLoader(file_path='./example_data/mlb_teams_2012.csv', csv_args={ 'delimiter': ',', 'quotechar': '"', 'fieldnames': ['MLB Team', 'Payroll in millions', 'Wins'] }) data = ...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-7
[Document(page_content='MLB Team: Team\nPayroll in millions: "Payroll (millions)"\nWins: "Wins"', lookup_str='', metadata={'source': './example_data/mlb_teams_2012.csv', 'row': 0}, lookup_index=0), Document(page_content='MLB Team: Nationals\nPayroll in millions: 81.34\nWins: 98', lookup_str='', metadata={'source': './e...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-8
'./example_data/mlb_teams_2012.csv', 'row': 5}, lookup_index=0), Document(page_content='MLB Team: Athletics\nPayroll in millions: 55.37\nWins: 94', lookup_str='', metadata={'source': './example_data/mlb_teams_2012.csv', 'row': 6}, lookup_index=0), Document(page_content='MLB Team: Rangers\nPayroll in millions: 120.51\nW...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-9
in millions: 132.30\nWins: 88', lookup_str='', metadata={'source': './example_data/mlb_teams_2012.csv', 'row': 11}, lookup_index=0), Document(page_content='MLB Team: Cardinals\nPayroll in millions: 110.30\nWins: 88', lookup_str='', metadata={'source': './example_data/mlb_teams_2012.csv', 'row': 12}, lookup_index=0), Do...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-10
16}, lookup_index=0), Document(page_content='MLB Team: Diamondbacks\nPayroll in millions: 74.28\nWins: 81', lookup_str='', metadata={'source': './example_data/mlb_teams_2012.csv', 'row': 17}, lookup_index=0), Document(page_content='MLB Team: Pirates\nPayroll in millions: 63.43\nWins: 79', lookup_str='', metadata={'sour...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-11
metadata={'source': './example_data/mlb_teams_2012.csv', 'row': 22}, lookup_index=0), Document(page_content='MLB Team: Royals\nPayroll in millions: 60.91\nWins: 72', lookup_str='', metadata={'source': './example_data/mlb_teams_2012.csv', 'row': 23}, lookup_index=0), Document(page_content='MLB Team: Marlins\nPayroll in ...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-12
in millions: 78.06\nWins: 64', lookup_str='', metadata={'source': './example_data/mlb_teams_2012.csv', 'row': 28}, lookup_index=0), Document(page_content='MLB Team: Cubs\nPayroll in millions: 88.19\nWins: 61', lookup_str='', metadata={'source': './example_data/mlb_teams_2012.csv', 'row': 29}, lookup_index=0), Document(...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-13
Specify a column to be used identify the document source# Use the source_column argument to specify a column to be set as the source for the document created from each row. Otherwise file_path will be used as the source for all documents created from the csv file. This is useful when using documents loaded from CSV fil...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-14
[Document(page_content='Team: Nationals\n"Payroll (millions)": 81.34\n"Wins": 98', lookup_str='', metadata={'source': 'Nationals', 'row': 0}, lookup_index=0), Document(page_content='Team: Reds\n"Payroll (millions)": 82.20\n"Wins": 97', lookup_str='', metadata={'source': 'Reds', 'row': 1}, lookup_index=0), Document(page...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-15
'row': 6}, lookup_index=0), Document(page_content='Team: Orioles\n"Payroll (millions)": 81.43\n"Wins": 93', lookup_str='', metadata={'source': 'Orioles', 'row': 7}, lookup_index=0), Document(page_content='Team: Rays\n"Payroll (millions)": 64.17\n"Wins": 90', lookup_str='', metadata={'source': 'Rays', 'row': 8}, lookup_...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-16
lookup_str='', metadata={'source': 'White Sox', 'row': 13}, lookup_index=0), Document(page_content='Team: Brewers\n"Payroll (millions)": 97.65\n"Wins": 83', lookup_str='', metadata={'source': 'Brewers', 'row': 14}, lookup_index=0), Document(page_content='Team: Phillies\n"Payroll (millions)": 174.54\n"Wins": 81', lookup...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-17
(millions)": 93.35\n"Wins": 74', lookup_str='', metadata={'source': 'Mets', 'row': 20}, lookup_index=0), Document(page_content='Team: Blue Jays\n"Payroll (millions)": 75.48\n"Wins": 73', lookup_str='', metadata={'source': 'Blue Jays', 'row': 21}, lookup_index=0), Document(page_content='Team: Royals\n"Payroll (millions)...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-18
lookup_index=0), Document(page_content='Team: Rockies\n"Payroll (millions)": 78.06\n"Wins": 64', lookup_str='', metadata={'source': 'Rockies', 'row': 27}, lookup_index=0), Document(page_content='Team: Cubs\n"Payroll (millions)": 88.19\n"Wins": 61', lookup_str='', metadata={'source': 'Cubs', 'row': 28}, lookup_index=0),...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
ddb077e13f23-19
previous Copy Paste next DataFrame Loader Contents Customizing the csv parsing and loading Specify a column to be used identify the document source By Harrison Chase © Copyright 2023, Harrison Chase. Last updated on Apr 25, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html
6cac92fcc702-0
.ipynb .pdf PDF Contents Using PyPDF Using Unstructured Retain Elements Fetching remote PDFs using Unstructured Using PDFMiner Using PDFMiner to generate HTML text Using PyMuPDF PDF# This covers how to load pdfs into a document format that we can use downstream. Using PyPDF# Load PDF using pypdf into array of documen...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-1
Document(page_content='LayoutParser : A Uni\x0ced Toolkit for Deep\nLearning Based Document Image Analysis\nZejiang Shen1( \x00), Ruochen Zhang2, Melissa Dell3, Benjamin Charles Germain\nLee4, Jacob Carlson3, and Weining Li5\n1Allen Institute for AI\nshannons@allenai.org\n2Brown University\nruochen zhang@brown.edu\n3Ha...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-2
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\nl...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-3
Learning(DL)-based approaches are the state-of-the-art for a wide range of\ndocument image analysis (DIA) tasks including document image classi\x0ccation [ 11,arXiv:2103.15348v2 [cs.CV] 21 Jun 2021', lookup_str='', metadata={'source': 'example_data/layout-parser-paper.pdf', 'page': '0'}, lookup_index=0)
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-4
An advantage of this approach is that documents can be retrieved with page numbers. from langchain.vectorstores import FAISS from langchain.embeddings.openai import OpenAIEmbeddings faiss_index = FAISS.from_documents(pages, OpenAIEmbeddings()) docs = faiss_index.similarity_search("How will the community be engaged?", k...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-5
For each shared pipeline, it has a dedicated project page, with links to the source code, documentation, and an outline of the approaches. A discussion panel is provided for exchanging ideas. Combined with the core LayoutParser library, users can easily build reusable components based on the shared pipelines and apply ...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-6
vision and natural language processing problems. LayoutParser , on the other hand, specializes speci cally in DIA tasks. LayoutParser is also equipped with a community platform inspired by established model hubs such as Torch Hub [23] andTensorFlow Hub [1]. It enables the sharing of pretrained models as well as full do...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-7
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
6cac92fcc702-8
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
6cac92fcc702-9
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
6cac92fcc702-10
Fetching remote PDFs using Unstructured# This covers how to load online pdfs into a document format that we can use downstream. This can be used for various online pdf sites such as https://open.umn.edu/opentextbooks/textbooks/ and https://arxiv.org/archive/ Note: all other pdf loaders can also be used to fetch remote ...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-11
[Document(page_content='A WEAK ( k, k ) -LEFSCHETZ THEOREM FOR PROJECTIVE TORIC ORBIFOLDS\n\nWilliam D. Montoya\n\nInstituto de Matem´atica, Estat´ıstica e Computa¸c˜ao Cient´ıfica,\n\nIn [3] we proved that, under suitable conditions, on a very general codimension s quasi- smooth intersection subvariety X in a projectiv...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-12
theorem for projective orbifolds ([11]). When p = d + 1 − s the proof relies on the Cayley trick, a trick which associates to X a quasi-smooth hypersurface Y in a projective vector bundle, and the Cayley Proposition (4.3) which gives an isomorphism of some primitive cohomologies (4.2) of X and Y . The Cayley trick, fol...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-13
N ⊗ Z R .\n\nif there exist k linearly independent primitive elements e\n\n, . . . , e k ∈ N such that σ = { µ\n\ne\n\n+ ⋯ + µ k e k } . • The generators e i are integral if for every i and any nonnegative rational number µ the product µe i is in N only if µ is an integer. • Given two rational simplicial cones σ , σ ′ ...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-14
< σ and σ ∩ σ ′ < σ ′ ;\n\nN R = σ\n\n∪ ⋅ ⋅ ⋅ ∪ σ t .\n\nA rational simplicial complete d -dimensional fan Σ defines a d -dimensional toric variety P d Σ having only orbifold singularities which we assume to be projective. Moreover, T ∶ = N ⊗ Z C ∗ ≃ ( C ∗ ) d is the torus action on P d Σ . We denote by Σ ( i ) the i -d...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-15
locus Z ( Σ ) ∶ = V ( B Σ ) in the affine space A d ∶ = Spec ( S ) is the irrelevant locus.\n\nProposition 2.3 (Theorem 5.1.11 [5]) . The toric variety P d Σ is a categorical quotient A d ∖ Z ( Σ ) by the group Hom ( Cl ( Σ ) , C ∗ ) and the group action is induced by the Cl ( Σ ) - grading of S .\n\nNow we give a brief ...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-16
A differential form on a complex orbifold Z is defined locally at z ∈ Z as a G -invariant differential form on C d where G ⊂ Gl ( d, C ) and Z is locally isomorphic to d\n\nRoughly speaking the local geometry of orbifolds reduces to local G -invariant geometry.\n\nWe have a complex of differential forms ( A ● ( Z ) , d ) a...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-17
. Quasi-smooth hypersurfaces or more generally quasi-smooth intersection sub-\n\nExample 3.2 . Quasi-smooth hypersurfaces or more generally quasi-smooth intersection sub- varieties are quasi-smooth subvarieties (see [2] or [7] for more details).\n\nRemark 3.3 . Quasi-smooth subvarieties are suborbifolds of P d Σ in the...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-18
/ H 2 ( X, O X ) ≃ Dolbeault H 2 ( X, C ) deRham ≃ H 2 dR ( X, C ) / / H 0 , 2 ¯ ∂ ( X )\n\nof the proof follows as the ( 1 , 1 ) -Lefschetz theorem in [6].\n\nRemark 3.5 . For k = 1 and P d Σ as the projective space, we recover the classical ( 1 , 1 ) - Lefschetz theorem.\n\nBy the Hard Lefschetz Theorem for projectiv...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-19
If the dimension of X is 1 , 2 or 3 . The Hodge conjecture holds on X\n\nProof. If the dim C X = 1 the result is clear by the Hard Lefschetz theorem for projective orbifolds. The dimension 2 and 3 cases are covered by Theorem 3.5 and the Hard Lefschetz.\n\nCayley trick and Cayley proposition\n\nThe Cayley trick is a wa...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-20
Cox ring, without considering the grading, of P d Σ is C [ x 1 , . . . , x m ] then the Cox ring of P ( E ) is\n\nMoreover for X a quasi-smooth intersection subvariety cut off by f 1 , . . . , f s with deg ( f i ) = [ L i ] we relate the hypersurface Y cut off by F = y 1 f 1 + ⋅ ⋅ ⋅ + y s f s which turns out to be quasi-...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-21
y ) ∈ Y with y ≠ 0 has a preimage. Hence for any subvariety W = V ( I W ) ⊂ X ⊂ P d Σ there exists W ′ ⊂ Y ⊂ P d + s − 1 Σ ,X such that π ( W ′ ) = W , i.e., W ′ = { z = ( x, y ) ∣ x ∈ W } .\n\nFor X ⊂ P d Σ a quasi-smooth intersection variety the morphism in cohomology induced by the inclusion i ∗ ∶ H d − s ( P d Σ , ...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-22
− s prim ( X, Q ) with rational coefficients.\n\nH d − s ( P d Σ , C ) and H d − s ( X, C ) have pure Hodge structures, and the morphism i ∗ is com- patible with them, so that H d − s prim ( X ) gets a pure Hodge structure.\n\nThe next Proposition is the Cayley proposition.\n\nProposition 4.3. [Proposition 2.3 in [3] ] L...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-23
C . See the beginning of Section 7.1 in [10] for more details.\n\nTheorem 5.1. Let Y = { F = y 1 f 1 + ⋯ + y k f k = 0 } ⊂ P 2 k + 1 Σ ,X be the quasi-smooth hypersurface associated to the quasi-smooth intersection surface X = X f 1 ∩ ⋅ ⋅ ⋅ ∩ X f k ⊂ P k + 2 Σ . Then on Y the Hodge conjecture holds.\n\nthe Hodge conjec...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-24
1 , . . . , λ C n with rational coefficients of H 1 , 1 prim ( X, Q ) , that is, there are n ∶ = h 1 , 1 prim ( X, Q ) algebraic curves C 1 , . . . , C n in X such that under the Poincar´e duality the class in homology [ C i ] goes to λ C i , [ C i ] ↦ λ C i . Recall that the Cox ring of P k + 2 is contained in the Cox r...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-25
degree. Moreover, by Remark 4.1 each C i is contained in Y = { F = y 1 f 1 + ⋯ + y k f k = 0 } and\n\nfurthermore it has codimension k .\n\nClaim: { C i } ni = 1 is a basis of prim ( ) . It is enough to prove that λ C i is different from zero in H k,k prim ( Y, Q ) or equivalently that the cohomology classes { λ C i } n...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-26
,X such that V ∩ Y = C j so they are equal as a homology class of P 2 k + 1 Σ ,X ,i.e., [ V ∩ Y ] = [ C j ] . It is easy to check that π ( V ) ∩ X = C j as a subvariety of P k + 2 Σ where π ∶ ( x, y ) ↦ x . Hence [ π ( V ) ∩ X ] = [ C j ] which is equivalent to say that λ C j comes from P k + 2 Σ which contradicts the ...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-27
0 } ⊂ P 2 k + 1 Σ ,X be the quasi-smooth hypersurface associated to a quasi-smooth intersection subvariety X = X f 1 ∩ ⋅ ⋅ ⋅ ∩ X f s ⊂ P d Σ such that d + s = 2 ( k + 1 ) . If the Hodge conjecture holds on X then it holds as well on Y .\n\nCorollary 5.4. If the dimension of Y is 2 s − 1 , 2 s or 2 s + 1 then the Hodge ...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-28
U., and Montoya, W. On the Hodge conjecture for quasi-smooth in- tersections in toric varieties. S˜ao Paulo J. Math. Sci. Special Section: Geometry in Algebra and Algebra in Geometry (\n\n). [\n\n] Caramello Jr, F. C. Introduction to orbifolds. a\n\niv:\n\nv\n\n(\n\n). [\n\n] Cox, D., Little, J., and Schenck, H. Toric ...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-29
Steenbrink, J. H. M. Intersection form for quasi-homogeneous singularities. Com- positio Mathematica\n\n,\n\n(\n\n),\n\n–\n\n[\n\n] Voisin, C. Hodge Theory and Complex Algebraic Geometry I, vol.\n\nof Cambridge Studies in Advanced Mathematics . Cambridge University Press,\n\n[\n\n] Wang, Z. Z., and Zaffran, D. A remark...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-30
U., and Montoya, W. On the Hodge conjecture for quasi-smooth in- tersections in toric varieties. S˜ao Paulo J. Math. Sci. Special Section: Geometry in Algebra and Algebra in Geometry (2021).\n\nA. R. Cohomology of complete intersections in toric varieties. Pub-', lookup_str='', metadata={'source': '/var/folders/ph/hhm7...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-31
Using PDFMiner# from langchain.document_loaders import PDFMinerLoader loader = PDFMinerLoader("example_data/layout-parser-paper.pdf") data = loader.load() Using PDFMiner to generate HTML text# This can be helpful for chunking texts semantically into sections as the output html content can be parsed via BeautifulSoup to...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html
6cac92fcc702-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
6cac92fcc702-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
6cac92fcc702-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
6cac92fcc702-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
6cac92fcc702-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
6cac92fcc702-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
6cac92fcc702-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
6cac92fcc702-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
6cac92fcc702-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
6cac92fcc702-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
9afdaea84afa-0
.ipynb .pdf CoNLL-U CoNLL-U# This is an example of how to load a file in CoNLL-U format. The whole file is treated as one document. The example data (conllu.conllu) is based on one of the standard UD/CoNLL-U examples. from langchain.document_loaders import CoNLLULoader loader = CoNLLULoader("example_data/conllu.conllu"...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/CoNLL-U.html
97dfdede6c81-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
97dfdede6c81-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
97dfdede6c81-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
97dfdede6c81-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
97dfdede6c81-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
97dfdede6c81-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
710af5899c8b-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
710af5899c8b-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
710af5899c8b-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
710af5899c8b-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
710af5899c8b-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
155408c9b4a6-0
.ipynb .pdf URL Contents URL Selenium URL Loader Setup Playwright URL Loader Setup URL# This covers how to load HTML documents from a list of URLs into a document format that we can use downstream. from langchain.document_loaders import UnstructuredURLLoader urls = [ "https://www.understandingwar.org/backgrounde...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/url.html
155408c9b4a6-1
!pip install "playwright" !pip install "unstructured" !playwright install from langchain.document_loaders import PlaywrightURLLoader urls = [ "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "https://goo.gl/maps/NDSHwePEyaHMFGwh8" ] loader = PlaywrightURLLoader(urls=urls, remove_selectors=["header", "footer"]) da...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/url.html
fcaa2cc3aa1c-0
.ipynb .pdf GCS File Storage GCS File Storage# This covers how to load document objects from an Google Cloud Storage (GCS) file object. from langchain.document_loaders import GCSFileLoader # !pip install google-cloud-storage loader = GCSFileLoader(project_name="aist", bucket="testing-hwc", blob="fake.docx") loader.load...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gcs_file.html
e0dcc9dea2b3-0
.ipynb .pdf College Confidential College Confidential# This covers how to load College Confidential webpages into a document format that we can use downstream. from langchain.document_loaders import CollegeConfidentialLoader loader = CollegeConfidentialLoader("https://www.collegeconfidential.com/colleges/brown-universi...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
e0dcc9dea2b3-1
[Document(page_content='\n\n\n\n\n\n\n\nA68FEB02-9D19-447C-B8BC-818149FD6EAF\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Media (2)\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nE45B8B13-33D4-450E-B7DB-F66EFE8F2097\n\n\n\n\n\n\n\n\n\nE45B8B13-33D4-450E-B7DB-F66EFE8F2097\n\n\n\n\n\n\n\n\n\n\n\n\n\...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
e0dcc9dea2b3-2
students to get involved at Brown! \nLove music or performing? Join a campus band, sing in a chorus, or perform with one of the school\'s theater groups.\nInterested in journalism or communications? Brown students can write for the campus newspaper, host a radio show or be a producer for the student-run television chan...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
e0dcc9dea2b3-3
"good" school. Some factors that can help you determine what a good school for you might be include admissions criteria, acceptance rate, tuition costs, and more.\nLet\'s take a look at these factors to get a clearer sense of what Brown offers and if it could be the right college for you.\nBrown Acceptance Rate 2022\nI...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
e0dcc9dea2b3-4
six-year graduation rate for U.S. colleges and universities is 61% for public schools, and 67% for private, non-profit schools.\nJob Outcomes for Brown Grads\nJob placement stats are a good resource for understanding the value of a degree from Brown by providing a look on how job placement has gone for other grads. \nC...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
e0dcc9dea2b3-5
Financial Aid at Brown\nTuition is another important factor when choose a college. Some colleges may have high tuition, but do a better job at meeting students\' financial need.\nBrown meets 100% of the demonstrated financial need for undergraduates. The average financial aid package for a full-time, first-year studen...
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html