neznib commited on
Commit
707cf08
·
1 Parent(s): 5f08a22
Files changed (3) hide show
  1. agent.py +18 -0
  2. app_playground.ipynb +471 -33
  3. langchain_custom.py +29 -0
agent.py CHANGED
@@ -14,6 +14,8 @@ from langchain_core.tools import tool
14
  from langgraph.prebuilt import ToolNode
15
  from pydantic import SecretStr
16
 
 
 
17
  from typing_extensions import TypedDict, Annotated
18
 
19
 
@@ -137,6 +139,22 @@ def get_graph(llm):
137
  query: The search query."""
138
  print("\n-------------------- Tool (Wikipedia) has been called --------------------\n")
139
  search_docs = WikipediaLoader(query=query, load_max_docs=2).load()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  formatted_search_docs = "\n\n---\n\n".join(
141
  [
142
  f'<Document source="{doc.metadata["source"]}" page="{doc.metadata.get("page", "")}"/>\n{doc.page_content}\n</Document>'
 
14
  from langgraph.prebuilt import ToolNode
15
  from pydantic import SecretStr
16
 
17
+ from langchain_custom import WikipediaTableLoader
18
+
19
  from typing_extensions import TypedDict, Annotated
20
 
21
 
 
139
  query: The search query."""
140
  print("\n-------------------- Tool (Wikipedia) has been called --------------------\n")
141
  search_docs = WikipediaLoader(query=query, load_max_docs=2).load()
142
+ formatted_search_docs = "\n\n---\n\n".join(
143
+ [
144
+ f'<Document source="{doc.metadata["source"]}" page="{doc.metadata["title"]} page="{doc.metadata.get("page", "")}"/>\n{doc.page_content}\n</Document>'
145
+ for doc in search_docs
146
+ ])
147
+ return {"wiki_results": formatted_search_docs}
148
+
149
+ @tool
150
+ def wiki_table_search(url: str, title: str) -> str:
151
+ """Get Wikipedia tables for a given URL and title.
152
+
153
+ Args:
154
+ url: The Wikipedia URL.
155
+ title: The title of the Wikipedia page."""
156
+ print("\n-------------------- Tool (Wikipedia-Table) has been called --------------------\n")
157
+ search_docs = WikipediaTableLoader(url=url, title=title).load()
158
  formatted_search_docs = "\n\n---\n\n".join(
159
  [
160
  f'<Document source="{doc.metadata["source"]}" page="{doc.metadata.get("page", "")}"/>\n{doc.page_content}\n</Document>'
app_playground.ipynb CHANGED
@@ -6,13 +6,15 @@
6
  "metadata": {
7
  "collapsed": true,
8
  "ExecuteTime": {
9
- "end_time": "2025-04-30T12:27:19.455377Z",
10
- "start_time": "2025-04-30T12:27:13.274787Z"
11
  }
12
  },
13
  "source": [
 
 
14
  "from dotenv import load_dotenv\n",
15
  "from gradio.server_messages import BaseMessage\n",
 
16
  "\n",
17
  "from agent import *\n",
18
  "\n",
@@ -24,8 +26,17 @@
24
  "\n",
25
  "# graph.invoke({\"messages\": [HumanMessage(content=question),]})"
26
  ],
27
- "outputs": [],
28
- "execution_count": 1
 
 
 
 
 
 
 
 
 
29
  },
30
  {
31
  "metadata": {},
@@ -509,44 +520,471 @@
509
  "id": "1cd902f95e32ce1"
510
  },
511
  {
512
- "metadata": {},
 
 
 
 
 
513
  "cell_type": "code",
514
  "source": "from langchain_community.document_loaders import WikipediaLoader",
515
  "id": "47a99dbe711a8258",
516
  "outputs": [],
517
- "execution_count": null
518
  },
519
  {
520
- "metadata": {},
 
 
 
 
 
521
  "cell_type": "code",
522
  "source": "search_docs = WikipediaLoader(query=\"Mercedes Sosa\", load_max_docs=2, doc_content_chars_max=14000).load()",
523
  "id": "df1f417c73ee0bbd",
524
  "outputs": [],
525
- "execution_count": null
526
  },
527
  {
528
- "metadata": {},
 
 
 
 
 
529
  "cell_type": "code",
530
- "source": "search_docs[0].page_content",
531
  "id": "236722808c1a55bb",
532
- "outputs": [],
533
- "execution_count": null
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
534
  },
535
  {
536
- "metadata": {},
 
 
 
 
 
537
  "cell_type": "code",
538
- "source": "",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
539
  "id": "3c8a97a5ef2382d6",
540
- "outputs": [],
541
- "execution_count": null
 
 
 
 
 
 
 
 
 
 
 
 
542
  },
543
  {
544
- "metadata": {},
 
 
 
 
 
545
  "cell_type": "code",
546
- "source": "",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
547
  "id": "c003227b404d40ac",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
548
  "outputs": [],
549
- "execution_count": null
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
550
  },
551
  {
552
  "metadata": {},
@@ -603,7 +1041,7 @@
603
  {
604
  "metadata": {
605
  "ExecuteTime": {
606
- "end_time": "2025-04-30T10:41:49.649526Z",
607
  "start_time": "2025-04-30T10:41:47.338329Z"
608
  }
609
  },
@@ -626,7 +1064,7 @@
626
  {
627
  "metadata": {
628
  "ExecuteTime": {
629
- "end_time": "2025-04-30T10:41:56.657308Z",
630
  "start_time": "2025-04-30T10:41:49.991801Z"
631
  }
632
  },
@@ -830,7 +1268,7 @@
830
  {
831
  "metadata": {
832
  "ExecuteTime": {
833
- "end_time": "2025-04-30T12:15:55.744664Z",
834
  "start_time": "2025-04-30T12:15:55.581450Z"
835
  }
836
  },
@@ -846,7 +1284,7 @@
846
  {
847
  "metadata": {
848
  "ExecuteTime": {
849
- "end_time": "2025-04-30T11:59:14.735777Z",
850
  "start_time": "2025-04-30T11:59:06.756631Z"
851
  }
852
  },
@@ -876,7 +1314,7 @@
876
  {
877
  "metadata": {
878
  "ExecuteTime": {
879
- "end_time": "2025-04-30T12:15:59.481214Z",
880
  "start_time": "2025-04-30T12:15:59.476620Z"
881
  }
882
  },
@@ -893,7 +1331,7 @@
893
  {
894
  "metadata": {
895
  "ExecuteTime": {
896
- "end_time": "2025-04-30T12:24:33.742243Z",
897
  "start_time": "2025-04-30T12:24:33.059987Z"
898
  }
899
  },
@@ -1295,7 +1733,7 @@
1295
  {
1296
  "metadata": {
1297
  "ExecuteTime": {
1298
- "end_time": "2025-04-30T12:27:38.766862Z",
1299
  "start_time": "2025-04-30T12:27:19.741664Z"
1300
  }
1301
  },
@@ -1366,7 +1804,7 @@
1366
  {
1367
  "metadata": {
1368
  "ExecuteTime": {
1369
- "end_time": "2025-04-30T12:55:07.171820Z",
1370
  "start_time": "2025-04-30T12:55:07.155179Z"
1371
  }
1372
  },
@@ -1399,7 +1837,7 @@
1399
  {
1400
  "metadata": {
1401
  "ExecuteTime": {
1402
- "end_time": "2025-04-30T12:40:28.602601Z",
1403
  "start_time": "2025-04-30T12:40:16.914256Z"
1404
  }
1405
  },
@@ -1419,7 +1857,7 @@
1419
  {
1420
  "metadata": {
1421
  "ExecuteTime": {
1422
- "end_time": "2025-04-30T12:46:33.635917Z",
1423
  "start_time": "2025-04-30T12:46:33.146187Z"
1424
  }
1425
  },
@@ -1444,7 +1882,7 @@
1444
  {
1445
  "metadata": {
1446
  "ExecuteTime": {
1447
- "end_time": "2025-04-30T12:56:11.668787Z",
1448
  "start_time": "2025-04-30T12:56:06.012180Z"
1449
  }
1450
  },
@@ -1489,7 +1927,7 @@
1489
  {
1490
  "metadata": {
1491
  "ExecuteTime": {
1492
- "end_time": "2025-04-30T12:57:50.890823Z",
1493
  "start_time": "2025-04-30T12:57:50.885966Z"
1494
  }
1495
  },
@@ -1513,7 +1951,7 @@
1513
  {
1514
  "metadata": {
1515
  "ExecuteTime": {
1516
- "end_time": "2025-04-30T13:03:39.949969Z",
1517
  "start_time": "2025-04-30T13:03:39.945166Z"
1518
  }
1519
  },
@@ -1545,7 +1983,7 @@
1545
  {
1546
  "metadata": {
1547
  "ExecuteTime": {
1548
- "end_time": "2025-04-30T13:30:30.256759Z",
1549
  "start_time": "2025-04-30T13:30:02.301925Z"
1550
  }
1551
  },
 
6
  "metadata": {
7
  "collapsed": true,
8
  "ExecuteTime": {
9
+ "start_time": "2025-05-03T15:20:06.018894Z"
 
10
  }
11
  },
12
  "source": [
13
+ "from io import StringIO\n",
14
+ "\n",
15
  "from dotenv import load_dotenv\n",
16
  "from gradio.server_messages import BaseMessage\n",
17
+ "from jinja2 import BaseLoader\n",
18
  "\n",
19
  "from agent import *\n",
20
  "\n",
 
26
  "\n",
27
  "# graph.invoke({\"messages\": [HumanMessage(content=question),]})"
28
  ],
29
+ "outputs": [
30
+ {
31
+ "name": "stderr",
32
+ "output_type": "stream",
33
+ "text": [
34
+ "/Users/dennis/PycharmProjects/Final_Assignment_Template/.venv/lib/python3.11/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
35
+ " from .autonotebook import tqdm as notebook_tqdm\n"
36
+ ]
37
+ }
38
+ ],
39
+ "execution_count": null
40
  },
41
  {
42
  "metadata": {},
 
520
  "id": "1cd902f95e32ce1"
521
  },
522
  {
523
+ "metadata": {
524
+ "ExecuteTime": {
525
+ "end_time": "2025-05-03T15:20:14.388615Z",
526
+ "start_time": "2025-05-03T15:20:14.273193Z"
527
+ }
528
+ },
529
  "cell_type": "code",
530
  "source": "from langchain_community.document_loaders import WikipediaLoader",
531
  "id": "47a99dbe711a8258",
532
  "outputs": [],
533
+ "execution_count": 1
534
  },
535
  {
536
+ "metadata": {
537
+ "ExecuteTime": {
538
+ "end_time": "2025-05-03T15:20:07.654144Z",
539
+ "start_time": "2025-05-03T15:02:19.755634Z"
540
+ }
541
+ },
542
  "cell_type": "code",
543
  "source": "search_docs = WikipediaLoader(query=\"Mercedes Sosa\", load_max_docs=2, doc_content_chars_max=14000).load()",
544
  "id": "df1f417c73ee0bbd",
545
  "outputs": [],
546
+ "execution_count": 2
547
  },
548
  {
549
+ "metadata": {
550
+ "ExecuteTime": {
551
+ "end_time": "2025-05-03T15:20:07.654289Z",
552
+ "start_time": "2025-05-03T15:09:56.216383Z"
553
+ }
554
+ },
555
  "cell_type": "code",
556
+ "source": "print(search_docs[0].page_content)",
557
  "id": "236722808c1a55bb",
558
+ "outputs": [
559
+ {
560
+ "name": "stdout",
561
+ "output_type": "stream",
562
+ "text": [
563
+ "Haydée Mercedes \"La Negra\" Sosa (Latin American Spanish: [meɾˈseðes ˈsosa]; 9 July 1935 – 4 October 2009) was an Argentine singer who was popular throughout Latin America and many countries outside the region. With her roots in Argentine folk music, Sosa became one of the preeminent exponents of El nuevo cancionero. She gave voice to songs written by many Latin American songwriters. Her music made people hail her as the \"voice of the voiceless ones\". She was often called \"the conscience of Latin America\".\n",
564
+ "Sosa performed in venues such as the Lincoln Center in New York City, the Théâtre Mogador in Paris, the Sistine Chapel in Vatican City, as well as sold-out shows in New York's Carnegie Hall and the Roman Colosseum during her final decade of life. Her career spanned four decades and she was the recipient of six Latin Grammy awards (2000, 2003, 2004, 2006, 2009, 2011), including a Latin Grammy Lifetime Achievement Award in 2004 and two posthumous Latin Grammy Award for Best Folk Album in 2009 and 2011. She won the Premio Gardel in 2000, the main musical award in Argentina. She served as an ambassador for UNICEF.\n",
565
+ "\n",
566
+ "\n",
567
+ "== Life ==\n",
568
+ "Sosa was born on 9 July 1935, in San Miguel de Tucumán, in the northwestern Argentine province of Tucumán, of mestizo ancestry. She was of French, Spanish and Diaguita descent. Her nickname \"la negra\", which is a common nickname in Argentina for people with darker complexion, is a reference to her indigenous heritage. Her parents, a day laborer and a washerwoman, were Peronists, although they never registered in the party, and she started her career as a singer for the Peronist Party in Tucuman under the name Gladys Osorio. In 1950, at age fifteen, she won a singing competition organized by a local radio station and was given a contract to perform for two months. She recorded her first album, La Voz de la Zafra, in 1959. A performance at the 1965 Cosquín National Folklore Festival—where she was introduced and brought to the stage while sitting in the audience by fellow folk singer Jorge Cafrune— brought her to the attention of the Argentine public. Sosa and her first husband, Manuel Oscar Matus, with whom she had one son, were key players in the mid-60s nueva canción movement (which was called nuevo cancionero in Argentina). Her second record was Canciones con Fundamento, a collection of Argentine folk songs.\n",
569
+ "\n",
570
+ "Sosa \"spent the late 1960s building her audience in Europe and among the cosmopolitan middle class in Buenos Aires, becoming in the process a much bigger star\" than her contemporaries.In 1967, Sosa toured the United States and Europe with great success. In later years, she performed and recorded extensively, broadening her repertoire to include material from throughout Latin America.\n",
571
+ "In the early 1970s, Sosa released two concept albums in collaboration with composer Ariel Ramírez and lyricist Félix Luna: Cantata Sudamericana and Mujeres Argentinas (Argentine Women). She also recorded a tribute to Chilean musician Violeta Parra in 1971, including what was to become one of Sosa's signature songs, Gracias a la vida. She further popularized of songs written by Milton Nascimento of Brazil and Pablo Milanés and Silvio Rodríguez both from Cuba. Throughout the decade, she released albums such as Hasta la Victoria in 1972 and Traigo un Pueblo en mi Voz in 1973. They featured songs like \"Cuando tenga la tierra\", written by Ariel Petrocelli and Daniel Toro, which tackles political and social issues like wealth and land inequality. During the 1970s she was a part of two films by the director Leopoldo Torre Nilsson: El Santo de la Espada in 1970 and Güemes, la tierra en armas in 1971, in which she portrayed Juana Azurduy de Padilla, the guerrilla military leader who fought for Argentine independence.\n",
572
+ "\n",
573
+ "After the military junta of Jorge Videla came to power in 1976, the atmosphere in Argentina grew increasingly oppressive. Sosa faced death threats against both her and her family, but refused for many years to leave the country. At a concert in La Plata in 1979, Sosa was searched and arrested on stage, along with all those attending the concert. Their release came about through international intervention. Despite attempts to hold more concerts, she was officially barred from performing by the military regime. Banned in her own country, she moved to Paris and then to Madrid.She has spoken publicly about her artistic and emotional struggles during this period of her life. While in exile, she released the album A Quien Doy in 1981. The album included a recording of the song \"Cuando Me Acuerdo de Mi Pais\" which was originally written by the prolific Chilean singer/songwriter, Patricio Manns. The song, which he wrote while also in political exile, expresses the sorrow he felt from being separated from his homeland. She related to this feeling and struggled to continue recording and performing. In an interview with the New York Times, she said, “It was a mental problem, a problem of morale...It wasn’t my throat, or anything physical\". \n",
574
+ "Sosa returned to Argentina from her exile in Europe in February of 1982, several months before the military regime collapsed as a result of the Falklands War, and gave a series of concerts at the Teatro Ópera in Buenos Aires, where she invited many of her younger colleagues to share the stage. A double album of recordings from these performances became an instant best seller. She then traveled to perform in her home province of Tucuman. However, these performances were largely ignored by mainstream media in the country. In subsequent years, Sosa continued to tour both in Argentina and abroad, performing in such venues as the Lincoln Center in New York City and the Théâtre Mogador in Paris. In poor health for much of the 1990s, she performed a comeback show in Argentina in 1998. In 1994, she played in the Sistine Chapel in Vatican City. In 2002, she sold out both Carnegie Hall in New York and the Colosseum in Rome in the same year.\n",
575
+ "\n",
576
+ "A supporter of Perón, she favored leftist causes throughout her life. She supported President Raul Alfonsin in the election of 1983 which marked the return of democracy in Argentina following the dictatorship. She referred to this election as \"Argentina's Spring\" She opposed President Carlos Menem, who was in office from 1989 to 1999, and supported the election of Néstor Kirchner, who became president in 2003.\n",
577
+ "Sosa was a UNESCO Goodwill Ambassador for Latin America and the Caribbean. \n",
578
+ "Sosa disliked being identified as a protest singer. While she was outright in her political stances, Sosa said the following on the position of the artist: \n",
579
+ "\n",
580
+ "“An artist isn’t political in the party political sense – they have a constituency, which is their public – it is the poetry that matters most of all.”\n",
581
+ "In a career spanning four decades, she worked with performers across several genres and generations, folk, opera, pop, rock, including Martha Argerich, Andrea Bocelli, David Broza, Franco Battiato, Jaime Roos, Joan Baez, Francis Cabrel, Gal Costa, Luz Casal, Lila Downs, Lucio Dalla, Maria Farantouri, Lucecita Benitez, Nilda Fernández, Charly Garcia, León Gieco, Gian Marco, Nana Mouskouri, Pablo Milanés, Holly Near, Milton Nascimento, Pata Negra, Fito Páez, Franco De Vita, Lourdes Pérez, Luciano Pavarotti, Silvio Rodríguez, Ismael Serrano, Shakira, Sting, Caetano Veloso, Julieta Venegas, Gustavo Cerati and Konstantin Wecker\n",
582
+ "Sosa participated in a 1999 production of Ariel Ramírez's Misa Criolla. Her song Balderrama is featured in the 2008 movie Che, starring Benicio del Toro as the Argentine Marxist revolutionary Che Guevara.\n",
583
+ "Sosa was the co-chair of the Earth Charter International Commission.\n",
584
+ "\n",
585
+ "\n",
586
+ "== Awards ==\n",
587
+ "Sosa won the Latin Grammy Award for Best Folk Album in 2000 (Misa Criolla), 2003 (Acústico), 2006 (Corazón Libre), 2009 (Cantora 1, which also won Best Recording Package and was nominated for Album of the Year), and 2011 (Deja La Vida Volar), as well as several international awards.\n",
588
+ "In 1995, Konex Foundation from Argentina granted her the Diamond Konex Award, one of the most prestigious awards in Argentina, as the most important personality in the popular music of her country in the last decade.\n",
589
+ "\n",
590
+ "\n",
591
+ "== Death ==\n",
592
+ "\n",
593
+ "Suffering from recurrent endocrine and respiratory problems in later years, the 74-year-old Sosa was hospitalized in Buenos Aires on 18 September 2009. She died from multiple organ failure on 4 October 2009, at 5:15 am. She is survived by one son, Fabián Matus, born of her first marriage. He said: \"She lived her 74 years to the fullest. She had done practically everything she wanted, she didn't have any type of barrier or any type of fear that limited her\". The hospital expressed its sympathies to her relatives. Her website featured the following: \"Her undisputed talent, her honesty and her profound convictions leave a great legacy to future generations\".\n",
594
+ "Her body was placed on display at the National Congress building in Buenos Aires for the public to pay their respects, and President Fernández de Kirchner ordered three days of national mourning. Thousands had queued by the end of the day.\n",
595
+ "Sosa's obituary in The Daily Telegraph said she was \"an unrivalled interpreter of works by her compatriot, the Argentine Atahualpa Yupanqui, and Chile's Violeta Parra\". Helen Popper of Reuters reported her death by saying she \"fought South America's dictators with her voice and became a giant of contemporary Latin American music\". Sosa received three Latin Grammy nominations for her album, in 2009 . She went on to win Best Folk Album about a month after her death.\n",
596
+ "\n",
597
+ "\n",
598
+ "== Tributes ==\n",
599
+ "In 2019, Sosa was celebrated by a Google Doodle. The doodle was showcased in Argentina, Chile, Uruguay, Paraguay, Bolivia, Peru, Ecuador, Cuba, Iceland, Sweden, Serbia, Greece, Israel and Vietnam.\n",
600
+ "In 2023, Rolling Stone ranked Sosa at number 160 on its list of the 200 Greatest Singers of All Time.\n",
601
+ "\n",
602
+ "\n",
603
+ "== Discography ==\n",
604
+ "\n",
605
+ "Sosa recorded forty albums.\n",
606
+ "\n",
607
+ "\n",
608
+ "=== Studio albums ===\n",
609
+ "\n",
610
+ "\n",
611
+ "=== EPs ===\n",
612
+ "\n",
613
+ "\n",
614
+ "=== Live albums ===\n",
615
+ "\n",
616
+ "\n",
617
+ "=== Compilation albums ===\n",
618
+ "\n",
619
+ "\n",
620
+ "== Filmography ==\n",
621
+ "Güemes, la tierra en armas (1971)\n",
622
+ "Argentinísima (1972)\n",
623
+ "Esta es mi Argentina (1974)\n",
624
+ "Mercedes Sosa, como un pájaro libre (1983)\n",
625
+ "Será possible el sur: Mercedes Sosa (1985)\n",
626
+ "Historias de Argentina en vivo (2001)\n",
627
+ "\n",
628
+ "\n",
629
+ "== Further reading ==\n",
630
+ "\n",
631
+ "\n",
632
+ "== References ==\n",
633
+ "\n",
634
+ "\n",
635
+ "== External links ==\n",
636
+ "\n",
637
+ "Tribute to Mercedes Sosa (in Portuguese BR)\n",
638
+ "Mercedes Sosa's website (in Spanish)\n",
639
+ "Mercedes Sosa's News (in Spanish)\n",
640
+ "Mercedes Sosa at IMDb\n",
641
+ "Mercedes Sosa's Discography on Discogs.com\n"
642
+ ]
643
+ }
644
+ ],
645
+ "execution_count": 22
646
  },
647
  {
648
+ "metadata": {
649
+ "ExecuteTime": {
650
+ "end_time": "2025-05-03T15:20:07.654467Z",
651
+ "start_time": "2025-05-03T15:14:13.429101Z"
652
+ }
653
+ },
654
  "cell_type": "code",
655
+ "source": "print(search_docs[0].metadata[\"title\"])",
656
+ "id": "35beee79b5b922d1",
657
+ "outputs": [
658
+ {
659
+ "name": "stdout",
660
+ "output_type": "stream",
661
+ "text": [
662
+ "Mercedes Sosa\n"
663
+ ]
664
+ }
665
+ ],
666
+ "execution_count": 23
667
+ },
668
+ {
669
+ "metadata": {
670
+ "ExecuteTime": {
671
+ "end_time": "2025-05-03T15:20:07.654593Z",
672
+ "start_time": "2025-05-03T15:02:21.929612Z"
673
+ }
674
+ },
675
+ "cell_type": "code",
676
+ "source": "search_docs",
677
  "id": "3c8a97a5ef2382d6",
678
+ "outputs": [
679
+ {
680
+ "data": {
681
+ "text/plain": [
682
+ "[Document(metadata={'title': 'Mercedes Sosa', 'summary': 'Haydée Mercedes \"La Negra\" Sosa (Latin American Spanish: [meɾˈseðes ˈsosa]; 9 July 1935 – 4 October 2009) was an Argentine singer who was popular throughout Latin America and many countries outside the region. With her roots in Argentine folk music, Sosa became one of the preeminent exponents of El nuevo cancionero. She gave voice to songs written by many Latin American songwriters. Her music made people hail her as the \"voice of the voiceless ones\". She was often called \"the conscience of Latin America\".\\nSosa performed in venues such as the Lincoln Center in New York City, the Théâtre Mogador in Paris, the Sistine Chapel in Vatican City, as well as sold-out shows in New York\\'s Carnegie Hall and the Roman Colosseum during her final decade of life. Her career spanned four decades and she was the recipient of six Latin Grammy awards (2000, 2003, 2004, 2006, 2009, 2011), including a Latin Grammy Lifetime Achievement Award in 2004 and two posthumous Latin Grammy Award for Best Folk Album in 2009 and 2011. She won the Premio Gardel in 2000, the main musical award in Argentina. She served as an ambassador for UNICEF.', 'source': 'https://en.wikipedia.org/wiki/Mercedes_Sosa'}, page_content='Haydée Mercedes \"La Negra\" Sosa (Latin American Spanish: [meɾˈseðes ˈsosa]; 9 July 1935 – 4 October 2009) was an Argentine singer who was popular throughout Latin America and many countries outside the region. With her roots in Argentine folk music, Sosa became one of the preeminent exponents of El nuevo cancionero. She gave voice to songs written by many Latin American songwriters. Her music made people hail her as the \"voice of the voiceless ones\". She was often called \"the conscience of Latin America\".\\nSosa performed in venues such as the Lincoln Center in New York City, the Théâtre Mogador in Paris, the Sistine Chapel in Vatican City, as well as sold-out shows in New York\\'s Carnegie Hall and the Roman Colosseum during her final decade of life. Her career spanned four decades and she was the recipient of six Latin Grammy awards (2000, 2003, 2004, 2006, 2009, 2011), including a Latin Grammy Lifetime Achievement Award in 2004 and two posthumous Latin Grammy Award for Best Folk Album in 2009 and 2011. She won the Premio Gardel in 2000, the main musical award in Argentina. She served as an ambassador for UNICEF.\\n\\n\\n== Life ==\\nSosa was born on 9 July 1935, in San Miguel de Tucumán, in the northwestern Argentine province of Tucumán, of mestizo ancestry. She was of French, Spanish and Diaguita descent. Her nickname \"la negra\", which is a common nickname in Argentina for people with darker complexion, is a reference to her indigenous heritage. Her parents, a day laborer and a washerwoman, were Peronists, although they never registered in the party, and she started her career as a singer for the Peronist Party in Tucuman under the name Gladys Osorio. In 1950, at age fifteen, she won a singing competition organized by a local radio station and was given a contract to perform for two months. She recorded her first album, La Voz de la Zafra, in 1959. A performance at the 1965 Cosquín National Folklore Festival—where she was introduced and brought to the stage while sitting in the audience by fellow folk singer Jorge Cafrune— brought her to the attention of the Argentine public. Sosa and her first husband, Manuel Oscar Matus, with whom she had one son, were key players in the mid-60s nueva canción movement (which was called nuevo cancionero in Argentina). Her second record was Canciones con Fundamento, a collection of Argentine folk songs.\\n\\nSosa \"spent the late 1960s building her audience in Europe and among the cosmopolitan middle class in Buenos Aires, becoming in the process a much bigger star\" than her contemporaries.In 1967, Sosa toured the United States and Europe with great success. In later years, she performed and recorded extensively, broadening her repertoire to include material from throughout Latin America.\\nIn the early 1970s, Sosa released two concept albums in collaboration with composer Ariel Ramírez and lyricist Félix Luna: Cantata Sudamericana and Mujeres Argentinas (Argentine Women). She also recorded a tribute to Chilean musician Violeta Parra in 1971, including what was to become one of Sosa\\'s signature songs, Gracias a la vida. She further popularized of songs written by Milton Nascimento of Brazil and Pablo Milanés and Silvio Rodríguez both from Cuba. Throughout the decade, she released albums such as Hasta la Victoria in 1972 and Traigo un Pueblo en mi Voz in 1973. They featured songs like \"Cuando tenga la tierra\", written by Ariel Petrocelli and Daniel Toro, which tackles political and social issues like wealth and land inequality. During the 1970s she was a part of two films by the director Leopoldo Torre Nilsson: El Santo de la Espada in 1970 and Güemes, la tierra en armas in 1971, in which she portrayed Juana Azurduy de Padilla, the guerrilla military leader who fought for Argentine independence.\\n\\nAfter the military junta of Jorge Videla came to power in 1976, the atmosphere in Argentina grew increasingly oppressive. Sosa faced death threats against both her and her family, but refused for many years to leave the country. At a concert in La Plata in 1979, Sosa was searched and arrested on stage, along with all those attending the concert. Their release came about through international intervention. Despite attempts to hold more concerts, she was officially barred from performing by the military regime. Banned in her own country, she moved to Paris and then to Madrid.She has spoken publicly about her artistic and emotional struggles during this period of her life. While in exile, she released the album A Quien Doy in 1981. The album included a recording of the song \"Cuando Me Acuerdo de Mi Pais\" which was originally written by the prolific Chilean singer/songwriter, Patricio Manns. The song, which he wrote while also in political exile, expresses the sorrow he felt from being separated from his homeland. She related to this feeling and struggled to continue recording and performing. In an interview with the New York Times, she said, “It was a mental problem, a problem of morale...It wasn’t my throat, or anything physical\". \\nSosa returned to Argentina from her exile in Europe in February of 1982, several months before the military regime collapsed as a result of the Falklands War, and gave a series of concerts at the Teatro Ópera in Buenos Aires, where she invited many of her younger colleagues to share the stage. A double album of recordings from these performances became an instant best seller. She then traveled to perform in her home province of Tucuman. However, these performances were largely ignored by mainstream media in the country. In subsequent years, Sosa continued to tour both in Argentina and abroad, performing in such venues as the Lincoln Center in New York City and the Théâtre Mogador in Paris. In poor health for much of the 1990s, she performed a comeback show in Argentina in 1998. In 1994, she played in the Sistine Chapel in Vatican City. In 2002, she sold out both Carnegie Hall in New York and the Colosseum in Rome in the same year.\\n\\nA supporter of Perón, she favored leftist causes throughout her life. She supported President Raul Alfonsin in the election of 1983 which marked the return of democracy in Argentina following the dictatorship. She referred to this election as \"Argentina\\'s Spring\" She opposed President Carlos Menem, who was in office from 1989 to 1999, and supported the election of Néstor Kirchner, who became president in 2003.\\nSosa was a UNESCO Goodwill Ambassador for Latin America and the Caribbean. \\nSosa disliked being identified as a protest singer. While she was outright in her political stances, Sosa said the following on the position of the artist: \\n\\n“An artist isn’t political in the party political sense – they have a constituency, which is their public – it is the poetry that matters most of all.”\\nIn a career spanning four decades, she worked with performers across several genres and generations, folk, opera, pop, rock, including Martha Argerich, Andrea Bocelli, David Broza, Franco Battiato, Jaime Roos, Joan Baez, Francis Cabrel, Gal Costa, Luz Casal, Lila Downs, Lucio Dalla, Maria Farantouri, Lucecita Benitez, Nilda Fernández, Charly Garcia, León Gieco, Gian Marco, Nana Mouskouri, Pablo Milanés, Holly Near, Milton Nascimento, Pata Negra, Fito Páez, Franco De Vita, Lourdes Pérez, Luciano Pavarotti, Silvio Rodríguez, Ismael Serrano, Shakira, Sting, Caetano Veloso, Julieta Venegas, Gustavo Cerati and Konstantin Wecker\\nSosa participated in a 1999 production of Ariel Ramírez\\'s Misa Criolla. Her song Balderrama is featured in the 2008 movie Che, starring Benicio del Toro as the Argentine Marxist revolutionary Che Guevara.\\nSosa was the co-chair of the Earth Charter International Commission.\\n\\n\\n== Awards ==\\nSosa won the Latin Grammy Award for Best Folk Album in 2000 (Misa Criolla), 2003 (Acústico), 2006 (Corazón Libre), 2009 (Cantora 1, which also won Best Recording Package and was nominated for Album of the Year), and 2011 (Deja La Vida Volar), as well as several international awards.\\nIn 1995, Konex Foundation from Argentina granted her the Diamond Konex Award, one of the most prestigious awards in Argentina, as the most important personality in the popular music of her country in the last decade.\\n\\n\\n== Death ==\\n\\nSuffering from recurrent endocrine and respiratory problems in later years, the 74-year-old Sosa was hospitalized in Buenos Aires on 18 September 2009. She died from multiple organ failure on 4 October 2009, at 5:15 am. She is survived by one son, Fabián Matus, born of her first marriage. He said: \"She lived her 74 years to the fullest. She had done practically everything she wanted, she didn\\'t have any type of barrier or any type of fear that limited her\". The hospital expressed its sympathies to her relatives. Her website featured the following: \"Her undisputed talent, her honesty and her profound convictions leave a great legacy to future generations\".\\nHer body was placed on display at the National Congress building in Buenos Aires for the public to pay their respects, and President Fernández de Kirchner ordered three days of national mourning. Thousands had queued by the end of the day.\\nSosa\\'s obituary in The Daily Telegraph said she was \"an unrivalled interpreter of works by her compatriot, the Argentine Atahualpa Yupanqui, and Chile\\'s Violeta Parra\". Helen Popper of Reuters reported her death by saying she \"fought South America\\'s dictators with her voice and became a giant of contemporary Latin American music\". Sosa received three Latin Grammy nominations for her album, in 2009 . She went on to win Best Folk Album about a month after her death.\\n\\n\\n== Tributes ==\\nIn 2019, Sosa was celebrated by a Google Doodle. The doodle was showcased in Argentina, Chile, Uruguay, Paraguay, Bolivia, Peru, Ecuador, Cuba, Iceland, Sweden, Serbia, Greece, Israel and Vietnam.\\nIn 2023, Rolling Stone ranked Sosa at number 160 on its list of the 200 Greatest Singers of All Time.\\n\\n\\n== Discography ==\\n\\nSosa recorded forty albums.\\n\\n\\n=== Studio albums ===\\n\\n\\n=== EPs ===\\n\\n\\n=== Live albums ===\\n\\n\\n=== Compilation albums ===\\n\\n\\n== Filmography ==\\nGüemes, la tierra en armas (1971)\\nArgentinísima (1972)\\nEsta es mi Argentina (1974)\\nMercedes Sosa, como un pájaro libre (1983)\\nSerá possible el sur: Mercedes Sosa (1985)\\nHistorias de Argentina en vivo (2001)\\n\\n\\n== Further reading ==\\n\\n\\n== References ==\\n\\n\\n== External links ==\\n\\nTribute to Mercedes Sosa (in Portuguese BR)\\nMercedes Sosa\\'s website (in Spanish)\\nMercedes Sosa\\'s News (in Spanish)\\nMercedes Sosa at IMDb\\nMercedes Sosa\\'s Discography on Discogs.com'),\n",
683
+ " Document(metadata={'title': 'La Maza', 'summary': '\"La Maza\" (English: \"The Sledgehammer\") is a song by Argentine singer Mercedes Sosa featuring Colombian singer-songwriter Shakira from Sosa\\'s studio album Cantora, un Viaje Íntimo (2009). An acoustic folk song, it is known for its political message. The song was originally written and performed by Cuban composer and musician Silvio Rodríguez in 1982.', 'source': 'https://en.wikipedia.org/wiki/La_Maza'}, page_content='\"La Maza\" (English: \"The Sledgehammer\") is a song by Argentine singer Mercedes Sosa featuring Colombian singer-songwriter Shakira from Sosa\\'s studio album Cantora, un Viaje Íntimo (2009). An acoustic folk song, it is known for its political message. The song was originally written and performed by Cuban composer and musician Silvio Rodríguez in 1982.\\n\\n\\n== Background and release ==\\n\\n\"La Maza\" was written by Cuban composer and musician Silvio Rodriguez in 1979, and first released by him in 1982 as a part of his fifth studio album Unicornio. Mercedes Sosa performed the song together with Shakira in May 2008, before releasing a studio recording of the duet on her thirty-second studio album Cantora 1 on 27 March 2009, and on the double album Cantora, un Viaje Íntimo in September 2009.\\nThe official music video for \"La Maza\" was released in June 2021. The video consists of clips from the recording process of the song.\\n\\n\\n== Composition and lyrics ==\\n\"La Maza\" is a folk song. The lyrics of the song have a political and social message, and explore the theme of existential questioning and the search for meaning in one\\'s life and actions. The title of the song comes from the lyric \"¿Qué cosa fuera la maza sin cantera?\" English: (What would the sledgehammer be without a quarry?), referring to how life has no meaning if you have commitment to something. This also acts as a mirror of the society where this meaning of commitment has been forgotten. The lyric also refers to how a bond between a leader and their people rooted in the desire of change must exist.\\nThe recording of \"La Maza\" by Sosa and Shakira has an organic sound. The production is acoustic with guitar and percussion as instruments.\\n\\n\\n== Reception ==\\nCrónica outlined how \"La Maza\" is one of those Sosa\\'s songs which managed \"became hymns of struggle and resistance, a reflection of her commitment to social and humanitarian causes\". CiberCuba called the song a \"magnificent interpretation of a famous song\". In September 2020, Billboard staff listed the song as one of the 50 best Latin songs of all time, describing it as a \"powerful reflection on humanity\" that is \"even more eloquent in its arrangement, set simply to acoustic guitar and percussion.\"\\nGabriel Urbina from Cadiznoticias reflected how \"La Maza\" \"never gets old\", continuing how it is \"one of those songs that shake you strongly if you dedicate attention and time to it, looking into its eyes and drinking in the verses slowly, in small sips\", and characterized its chorus as \"brilliant and direct\".\\n\\n\\n== Live performance ==\\nOn 17 May 2008, Mercedes Sosa, Shakira, and Argentine musician Pedro Aznar performed \"La Maza\" for an audience of 150,000 people at the ALAS Foundation charity concert in Buenos Aires, Argentina. Their performance was dubbed \"one of the most emotional moments\" of the concert by Diario Río Negro. With the goal to \"improve the lives of Latin American children living in poverty\", the concert had 27 artists perform in two countries.\\n\\n\\n== Impact ==\\nAfter failed peace negotiations between Colombian government and Marxist–Leninist guerrilla group FARC, and FARC announcing the re-foundation of the Edison Romaña 53 front, on 19 April 2023, the Minister of National Defence of Colombia Iván Velásquez Gómez shared a part the lyrics of \"La Maza\" and a link to the music video of the song by Sosa and Shakira on Twitter. The lyrics \"si no creyera en lo que creo\" (English: \"if I didn’t believe in what I believe\") were a response to the criticism he had received emphasizing his conviction in the actions of his government despite opposition calling for a motion of censure. The post was met with disapproval on social media over its appropriateness and led opposition party Partido Cambio Radical to call Velásquez\\'s leadership a \"failure\".\\n\\n\\n== References ==')]"
684
+ ]
685
+ },
686
+ "execution_count": 4,
687
+ "metadata": {},
688
+ "output_type": "execute_result"
689
+ }
690
+ ],
691
+ "execution_count": 4
692
  },
693
  {
694
+ "metadata": {
695
+ "ExecuteTime": {
696
+ "end_time": "2025-05-03T15:20:07.655348Z",
697
+ "start_time": "2025-05-03T15:06:06.938991Z"
698
+ }
699
+ },
700
  "cell_type": "code",
701
+ "source": [
702
+ "# needed packages\n",
703
+ "# %pip install tabulate, lxml\n",
704
+ "\n",
705
+ "import pandas as pd\n",
706
+ "import requests\n",
707
+ "\n",
708
+ "# url = \"https://en.wikipedia.org/wiki/Mercedes_Sosa\"\n",
709
+ "url = \"https://en.wikipedia.org/wiki/2023_in_football\"\n",
710
+ "html = requests.get(url, timeout=10).text # full HTML\n",
711
+ "tables = pd.read_html(html) # → list[DataFrame]\n",
712
+ "\n",
713
+ "# convert the first table to markdown so the LLM can read it\n",
714
+ "markdown = tables[0].to_markdown(index=False)\n",
715
+ "print(markdown)"
716
+ ],
717
  "id": "c003227b404d40ac",
718
+ "outputs": [
719
+ {
720
+ "name": "stdout",
721
+ "output_type": "stream",
722
+ "text": [
723
+ "| 0 |\n",
724
+ "|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n",
725
+ "| Look for 2023 in football on one of Wikipedia's sister projects: Wiktionary (dictionary) Wikibooks (textbooks) Wikiquote (quotations) Wikisource (library) Wikiversity (learning resources) Commons (media) Wikivoyage (travel guide) Wikinews (news source) Wikidata (linked database) Wikispecies (species directory) Wikipedia does not have an article with this exact name. Please search for 2023 in football in Wikipedia to check for alternative titles or spellings. You need to log in or create an account and be autoconfirmed to create new articles. Alternatively, you can use the article wizard to submit a draft for review, or request a new article. Search for \"2023 in football\" in existing articles. Look for pages within Wikipedia that link to this title. Other reasons this message may be displayed: If a page was recently created here, it may not be visible yet because of a delay in updating the database; wait a few minutes or try the purge function. Titles on Wikipedia are case sensitive except for the first character; please check alternative capitalizations and consider adding a redirect here to the correct title. If the page has been deleted, check the deletion log, and see Why was the page I created deleted? |\n"
726
+ ]
727
+ },
728
+ {
729
+ "name": "stderr",
730
+ "output_type": "stream",
731
+ "text": [
732
+ "/var/folders/mf/9y254h_17lg1x86hptmcd4v80000gn/T/ipykernel_18882/1545040319.py:10: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object.\n",
733
+ " tables = pd.read_html(html) # → list[DataFrame]\n"
734
+ ]
735
+ }
736
+ ],
737
+ "execution_count": 17
738
+ },
739
+ {
740
+ "metadata": {
741
+ "ExecuteTime": {
742
+ "end_time": "2025-05-03T15:20:07.656185Z",
743
+ "start_time": "2025-05-03T15:05:05.133244Z"
744
+ }
745
+ },
746
+ "cell_type": "code",
747
+ "source": [
748
+ "t: str = tables[3].to_markdown(index=False)\n",
749
+ "print(type(markdown))"
750
+ ],
751
+ "id": "ffb0f3dc5a99a12d",
752
+ "outputs": [
753
+ {
754
+ "name": "stdout",
755
+ "output_type": "stream",
756
+ "text": [
757
+ "<class 'str'>\n"
758
+ ]
759
+ }
760
+ ],
761
+ "execution_count": 15
762
+ },
763
+ {
764
+ "metadata": {
765
+ "ExecuteTime": {
766
+ "end_time": "2025-05-03T15:24:40.237204Z",
767
+ "start_time": "2025-05-03T15:24:39.795870Z"
768
+ }
769
+ },
770
+ "cell_type": "code",
771
+ "source": [
772
+ "from langchain_community.document_loaders.base import BaseLoader\n",
773
+ "from langchain_core.documents import Document\n",
774
+ "import pandas as pd, requests\n",
775
+ "\n",
776
+ "class WikipediaTableLoader(BaseLoader):\n",
777
+ " \"\"\"Load every table on a Wikipedia page as a separate Document.\"\"\"\n",
778
+ " def __init__(self, url: str, title: str):\n",
779
+ " self.url = url\n",
780
+ " self.title = title\n",
781
+ "\n",
782
+ " def load(self):\n",
783
+ "\n",
784
+ " html = requests.get(self.url, timeout=10).text\n",
785
+ " dfs = pd.read_html(html) # grab the tables\n",
786
+ " docs = []\n",
787
+ "\n",
788
+ " for i, df in enumerate(dfs):\n",
789
+ " docs.append(\n",
790
+ " Document(\n",
791
+ " page_content=df.to_markdown(index=False),\n",
792
+ " metadata={\n",
793
+ " \"source\": self.url,\n",
794
+ " \"title\": self.title,\n",
795
+ " \"table_index\": i,\n",
796
+ " },\n",
797
+ " )\n",
798
+ " )\n",
799
+ " return docs"
800
+ ],
801
+ "id": "1b9cff15b35e5b79",
802
  "outputs": [],
803
+ "execution_count": 1
804
+ },
805
+ {
806
+ "metadata": {
807
+ "ExecuteTime": {
808
+ "end_time": "2025-05-03T15:28:20.229969Z",
809
+ "start_time": "2025-05-03T15:28:19.587583Z"
810
+ }
811
+ },
812
+ "cell_type": "code",
813
+ "source": [
814
+ "from langchain_custom import WikipediaTableLoader\n",
815
+ "search_docs = WikipediaTableLoader(\"https://en.wikipedia.org/wiki/Mercedes_Sosa\",\"Mercedes Sosa\").load()"
816
+ ],
817
+ "id": "339b967ca6f99806",
818
+ "outputs": [
819
+ {
820
+ "name": "stderr",
821
+ "output_type": "stream",
822
+ "text": [
823
+ "/Users/dennis/PycharmProjects/Final_Assignment/langchain_custom.py:15: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object.\n",
824
+ " dfs = pd.read_html(html) # grab the tables\n"
825
+ ]
826
+ }
827
+ ],
828
+ "execution_count": 1
829
+ },
830
+ {
831
+ "metadata": {
832
+ "ExecuteTime": {
833
+ "end_time": "2025-05-03T15:28:21.596713Z",
834
+ "start_time": "2025-05-03T15:28:21.592998Z"
835
+ }
836
+ },
837
+ "cell_type": "code",
838
+ "source": [
839
+ "for doc in search_docs:\n",
840
+ " print(doc.metadata[\"title\"], \"\\n\")\n",
841
+ " print(doc.page_content)"
842
+ ],
843
+ "id": "a99f2f73478dcb1d",
844
+ "outputs": [
845
+ {
846
+ "name": "stdout",
847
+ "output_type": "stream",
848
+ "text": [
849
+ "Mercedes Sosa \n",
850
+ "\n",
851
+ "| Mercedes Sosa | Mercedes Sosa.1 |\n",
852
+ "|:--------------------------------------|:---------------------------------------------------------------------------|\n",
853
+ "| Portrait by Annemarie Heinrich, 1960s | Portrait by Annemarie Heinrich, 1960s |\n",
854
+ "| Born | Haydée Mercedes Sosa 9 July 1935 San Miguel de Tucumán, Tucumán, Argentina |\n",
855
+ "| Died | 4 October 2009 (aged 74) Buenos Aires, Argentina |\n",
856
+ "| Occupation | Singer |\n",
857
+ "| Years active | 1950–2009 |\n",
858
+ "| Musical career | Musical career |\n",
859
+ "| Genres | Folknueva canción |\n",
860
+ "| Instruments | Vocals |\n",
861
+ "| nan | nan |\n",
862
+ "Mercedes Sosa \n",
863
+ "\n",
864
+ "| Year | Album details |\n",
865
+ "|-------:|:-------------------------------------------------------------|\n",
866
+ "| 1962 | La Voz De La Zafra Label: RCA |\n",
867
+ "| 1965 | Canciones Con Fundamento Label: El Grillo |\n",
868
+ "| 1966 | Hermano Label: Philips |\n",
869
+ "| 1966 | Yo No Canto Por Cantar Label: Philips |\n",
870
+ "| 1967 | Para Cantarle A Mi Gente Label: Philips |\n",
871
+ "| 1968 | Con Sabor A Mercedes Sosa Label: Philips |\n",
872
+ "| 1969 | Mujeres Argentinas Label: Philips |\n",
873
+ "| 1970 | El Grito De La Tierra Label: Philips |\n",
874
+ "| 1970 | Navidad Con Mercedes Sosa Label: Philips |\n",
875
+ "| 1971 | Homenaje a Violeta Parra Label: Philips |\n",
876
+ "| 1972 | Hasta La Victoria Label: Philips |\n",
877
+ "| 1972 | Cantata Sudamericana Label: Philips |\n",
878
+ "| 1973 | Traigo Un Pueblo En Mi Voz Label: Philips |\n",
879
+ "| 1975 | A Que Florezca Mi Pueblo Label: Philips |\n",
880
+ "| 1976 | En Dirección Del Viento Label: Philips |\n",
881
+ "| 1977 | Mercedes Sosa Interpreta A Atahualpa Yupanqui Label: Philips |\n",
882
+ "| 1979 | Serenata Para La Tierra De Uno Label: Philips |\n",
883
+ "| 1981 | A Quien Doy / Cuando Me Acuerdo de Mi País Label: Philips |\n",
884
+ "| 1982 | Como Un Pájaro Libre Label: Philips |\n",
885
+ "| 1983 | Mercedes Sosa Label: Philips |\n",
886
+ "| 1984 | ¿Será Posible El Sur? Label: Philips |\n",
887
+ "| 1985 | Vengo A Ofrecer Mi Corazón Label: Philips |\n",
888
+ "| 1986 | Mercedes Sosa '86 Label: Philips |\n",
889
+ "| 1987 | Mercedes Sosa '87 Label: Philips |\n",
890
+ "| 1993 | Sino Label: Philips/Polygram |\n",
891
+ "| 1994 | Gestos De Amor Label: Polydor |\n",
892
+ "| 1996 | Escondido En Mi País Label: Polydor |\n",
893
+ "| 1997 | Alta Fidelidad (w/Charly García) Label: Mercury |\n",
894
+ "| 1998 | Al Despertar Label: Mercury |\n",
895
+ "| 1999 | Misa Criolla Label: Mercury |\n",
896
+ "| 2005 | Corazón Libre Label: Edge |\n",
897
+ "| 2009 | Cantora 1 (w/various artists) Label: RCA |\n",
898
+ "| 2009 | Cantora 2 (w/various artists) Label: RCA |\n",
899
+ "| 2011 | Censurada Label: Philips |\n",
900
+ "| 2015 | Lucerito Label: RCA |\n",
901
+ "Mercedes Sosa \n",
902
+ "\n",
903
+ "| Year | EP details |\n",
904
+ "|-------:|:------------------------------|\n",
905
+ "| 1975 | Niño De Mañana Label: Philips |\n",
906
+ "Mercedes Sosa \n",
907
+ "\n",
908
+ "| Year | Album details |\n",
909
+ "|-------:|:----------------------------------------------------------------------------|\n",
910
+ "| 1973 | Si Se Calla El Cantor (with Gloria Martin) Label: Philips |\n",
911
+ "| 1980 | Gravado Ao Vivo No Brasil Label: Philips |\n",
912
+ "| 1982 | Mercedes Sosa en Argentina Label: Phonogram/Philips |\n",
913
+ "| 1985 | Corazón Americano (with Milton Nascimento & León Gieco) Label: Philips |\n",
914
+ "| 1989 | Live in Europe Label: Tropical Music/Polygram Argentina |\n",
915
+ "| 1991 | De Mí Label: Philips |\n",
916
+ "| 2002 | Acústico En Vivo Label: Sony Music Argentina |\n",
917
+ "| 2003 | Argentina Quiere Cantar (with V��ctor Heredia & León Gieco) Label: Odeon/EMI |\n",
918
+ "| 2010 | Deja La Vida Volar (En Gira) Label: RCA |\n",
919
+ "| 2014 | Angel Label: Universal Music |\n",
920
+ "| 2024 | En vivo en el Gran Rex 2006 Label: INAMU Discos |\n",
921
+ "| 2024 | Mercedes Sosa en Nueva York, 1974 Label: Sony Music Argentina |\n",
922
+ "Mercedes Sosa \n",
923
+ "\n",
924
+ "| Year | Album details |\n",
925
+ "|-------:|:-----------------------------------------|\n",
926
+ "| 1975 | Disco De Oro Label: Philips |\n",
927
+ "| 1983 | Recital Label: Philips |\n",
928
+ "| 1988 | Amigos Míos Label: Philips |\n",
929
+ "| 1993 | 30 Años Label: Polygram Argentina |\n",
930
+ "| 1995 | Oro Label: Polygram |\n",
931
+ "| 1997 | The Best Of Mercedes Sosa Label: Mercury |\n",
932
+ "| 2013 | Siempre En Ti Label: Universal Music |\n",
933
+ "Mercedes Sosa \n",
934
+ "\n",
935
+ "| vteMercedes Sosa | vteMercedes Sosa.1 |\n",
936
+ "|:-------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n",
937
+ "| Songs | \"La Maza\" |\n",
938
+ "| Albums | La Voz De La Zafra (1962) Canciones Con Fundamento (1965) Yo No Canto Por Cantar (1966) Hermano (1966) Para Cantarle A Mi Gente (1967) Con Sabor A Mercedes Sosa (1968) Mujeres Argentinas (1969) El Grito De La Tierra (1970) Navidad Con Mercedes Sosa (1970) Homenaje a Violeta Parra (1971) Hasta La Victoria (1972) Cantata Sudamericana (1972) Traigo Un Pueblo En Mi Voz (1973) A Que Florezca Mi Pueblo (1975) En Dirección Del Viento (1976) Mercedes Sosa Interpreta A Atahualpa Yupanqui (1977) Mercedes Sosa en Argentina (1982) Cantora 1 & 2 (2009) |\n",
939
+ "| Related articles | Nueva canción |\n",
940
+ "Mercedes Sosa \n",
941
+ "\n",
942
+ "| vteLatin Grammy Lifetime Achievement Award | vteLatin Grammy Lifetime Achievement Award.1 |\n",
943
+ "|:---------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n",
944
+ "| 2000s | 2004: Antonio Aguilar / Roberto Carlos / Willie Colón / José José / Mercedes Sosa 2005: Rocío Dúrcal / Generoso Jiménez / Jorge Ben Jor / Sérgio Mendes / Johnny Pacheco / Sandro 2006: León Gieco / Graciela / César Camargo Mariano / Richie Ray & Bobby Cruz / Paloma San Basilio / Alberto Vázquez / Johnny Ventura 2007: Alberto Cortez / Lucho Gatica / Olga Guillot / Os Paralamas do Sucesso / Los Tigres del Norte / Chavela Vargas 2008: Vikki Carr / Cheo Feliciano / Astrud Gilberto / Angélica María / María Dolores Pradera / Estela Raval 2009: Cándido Camero / Beth Carvalho / Charly García / Tania Libertad / Marco Antonio Muñiz / Juan Romero |\n",
945
+ "| 2010s | 2010: João Donato / Las Hermanas Márquez / Armando Manzanero / Joseíto Mateo / Jorge Oñate / Susana Rinaldi 2011: Joe Arroyo / Gal Costa / José Feliciano / Álex Lora / Les Luthiers / Rubén Rada / Linda Ronstadt 2012: Luz Casal / Leo Dan / Rita Moreno / Milton Nascimento / Daniela Romo / Poncho Sanchez / Toquinho 2013: Oscar D'León / Juan Formell / Roberto Menescal / Totó la Momposina / Palito Ortega / Eddie Palmieri / Miguel Ríos 2014: Willy Chirino / César Costa / Carlos do Carmo / Dúo Dinámico / Los Lobos / Valeria Lynch / Ney Matogrosso 2015: Gato Barbieri / Ana Belén / Ángela Carrasco / Djavan / El Gran Combo de Puerto Rico / Víctor Manuel / Pablo Milanés 2016: El Consorcio / Eugenia León / Ricardo Montaner / Ednita Nazario / Piero 2017: Lucecita Benítez / João Bosco / Ilan Chester / Víctor Heredia / Los del Río / Guadalupe Pineda / Cuco Valoy 2018: Erasmo Carlos / Dyango / Andy Montañez / José María Napoleón / Chucho Valdés / Wilfrido Vargas / Yuri 2019: Eva Ayllón / Joan Baez / José Cid / Lupita D'Alessio / Hugo Fattoruso / Pimpinela / Omara Portuondo / José Luis Rodríguez |\n",
946
+ "| 2020s | 2020 2021: Martinho da Vila / Emmanuel / Pete Escovedo / Sheila E. / Fito Páez / Milly Quezada / Joaquín Sabina / Gilberto Santa Rosa 2022: Rosario Flores / Myriam Hernández / Rita Lee / Amanda Miguel / Yordano 2023: Carmen Linares / Manuel Mijares / Arturo Sandoval / Simone / Soda Stereo / Ana Torroja 2024: Albita / Lolita Flores / Alejandro Lerner / Los Ángeles Azules / Draco Rosa / Lulu Santos |\n",
947
+ "Mercedes Sosa \n",
948
+ "\n",
949
+ "| vteOrder of Cultural Merit (Brazil) | vteOrder of Cultural Merit (Brazil).1 |\n",
950
+ "|--------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n",
951
+ "| 1995 | Antônio Carlos Magalhães Celso Furtado Fernanda Montenegro Joãosinho Trinta Jorge Amado José Mindlin José Sarney Nascimento Brito Nise da Silveira Pietro Maria Bardi Ricardo Gribel Roberto Marinho |\n",
952
+ "| 1996 | Athos Bulcão Bibi Ferreira Carybé Carlos Eduardo Moreira Ferreira Edemar Cid Ferreira Francisco Brennand Franco Montoro Jens Olesen Joel Mendes Rennó Max Justo Guedes Mestre Didi Nélida Piñon Olavo Setúbal Padre Vaz Sérgio Motta Walter Salles |\n",
953
+ "| 1997 | Adélia Prado Antônio Poteiro Antônio Salgado Braguinha David Assayag Diogo Pacheco Dona Lenoca Fayga Ostrower Gilberto Chateaubriand Gilberto Ferrez Helena Severo Hilda Hilst Jorge da Cunha Lima Jorge Gerdau José Ermírio de Moraes José Safra Lúcio Costa Luís Carlos Barreto Mãe Olga do Alaketu Marcos Vilaça Maria Clara Machado Robert Broughton Ubiratan Aguiar Wladimir Murtinho |\n",
954
+ "| 1998 | Abram Szajman Altamiro Carrilho Antônio Britto Ariano Suassuna Carlos Diegues Décio de Almeida Prado Franz Weissmann João Carlos Martins José Hugo Celidônio Lily Marinho Mãe Cleusa Millet Milu Villela Miguel Jorge Dona Neuma Octavio Frias Olavo Monteiro de Carvalho Paulo Autran Paulo César Ximenes Roseana Sarney Ruth Rocha Ruy Mesquita Sebastião Salgado Walter Hugo Khouri Zenildo Gonzaga Zoroastro de Lucena |\n",
955
+ "| 1999 | Abraham Koogan Almir Gabriel Aloysio Faria Ana Maria Diniz Angel Vianna Antônio Houaiss Beatriz Pimenta Camargo Ecyla Brandão Enrique Iglesias Esther Bertoletti Hélio Jaguaribe Hermínio Bello de Carvalho J. Borges João Antunes Mãe Stella de Oxóssi Maria Cecília Geyer Maria Delith Balaban Mário Covas Paixão Côrtes Paulo Fontainha Geyer Romero Magalhães Washington Novaes |\n",
956
+ "| 2000 | Ana Maria Machado Angela Gutierrez Dom Geraldo Dalal Achcar Edino Krieger Elizabeth D'Angelo Serra Firmino Ferreira Sampaio Neto Siron Franco Gianfrancesco Guarnieri Gilberto Gil José Alves Antunes Filho Luiz Henrique da Silveira Luiz Sponchiato Maria João Bustorff Mário Miguel Nicola Garófalo Martinho da Vila Nelson José Pinto Freire Paulo Tarso Flecha de Lima Plínio Pacheco Rodrigo Pederneiras Barbosa Ruth Escobar Sabine Lovatelli Sérgio Paulo Rouanet Sérgio Amaral Thomaz Farkas Tizuka Yamasaki Zezé Motta |\n",
957
+ "| 2001 | Arthur Moreira Lima Catherine Tasca Célia Procópio de Araújo Carvalho Euclides Menezes Ferreira Dona Zica Fernando Faro G.R.E.S. Império Serrano G.R.E.S. Portela G.R.E.S. Vila Isabel G.R.E.S. Mangueira Haroldo Costa Hermínio Bello de Carvalho Henri Philippe Reichstul Hildmar Diniz Ivo Abrahão Nesralla Jamelão João Câmara Filho Luciana Stegagno Picchio Luís Antônio Viana Lygia Fagundes Telles Manuel Salustiano Soares Milton Gonçalves Milton Nascimento Paulinho da Viola Pilar del Castillo Purificación Carpinteyro Calderón Sari Bermúdez Sheila Copps Synésio Scofano Fernandes Thiago de Mello Yvonne Lara da Costa |\n",
958
+ "| 2002 | Alberto Alves da Silva Ana Botafogo Candace Slater Carlos Roberto Faccina Centro Cultural Pró-Música Dalva Lazaroni Dominguinhos Dona Lucinha EDUSP Eduardo Baptista Vianna Frances Marinho George Savalla Gomes Guillermo O'Donnell G.R.E.S. Camisa Verde e Branco G.R.E.S. Vai Vai Henry Sobel Jack Leon Terpins João Filgueiras Jon M. Tolman Júlio Neves Julio Landmann Kabengele Munanga Lima Duarte Maria Della Costa Marlui Miranda Mestre Juca Niède Guidon Paulo Evaristo Arns Renato Borghetti Roberto Carlos Roberto DaMatta Sergio Kobayashi Silvio Barbato SBB Tania Mariza Kuchenbecker Rösing Vitae – Apoio à Cultura, Educação e Promoção Social |\n",
959
+ "| 2003 | Afro Reggae Agostinho da Silva Aloísio Magalhães Antônio Nóbrega Ary Barroso ABC-SERRA Bené Fonteles Benedito Nunes Boi Caprichoso Boi Garantido Candido Portinari Carmen Costa Casseta & Planeta Chico Buarque de Holanda Coral dos Guarani Dorival Caymmi Eduardo Bueno Gilberto Mendes Grupo Ponto de Partida e o coro Meninos de Araçuaí Haroldo de Campos Herbert Vianna João Pequeno Jongo da Serrinha Jorge Mautner Maria Judith Zuzarte Cortesão Luiz Costa Lima Mangueira do Amanhã Manoel de Barros Marília Pêra Milton Santos Moacyr Scliar Nelson Pereira dos Santos Projeto Axé Projeto Guri Rita Lee Roberto Farias Rogério Sganzerla Rubinho do Vale Velha Guarda da Portela Zezé Di Camargo & Luciano |\n",
960
+ "| 2004 | Alberto da Costa e Silva Angeli Arnaldo Carrilho Caetano Veloso Candombe do Açude Companhia Barrica Cordão da Bola Preta Danilo Miranda Fernando Sabino Frans Krajcberg Franco Fontana Fundação Casa Grande Geraldo Sarno Inezita Barroso João Donato José Júlio Pereira Cordeiro Blanco Lia de Itamaracá Liz Calder Márcia Haydée Mauricio de Sousa Movimento Arte contra a Barbárie Odete Lara Olga Praguer Coelho Orlando Villas-Bôas Ozualdo Candeias Paulo José Paulo Mendes da Rocha Pelé Povo Panará, Mato Grosso e Pará Pracatum Projeto Dança Comunidade Pulsar Companhia de Dança Rachel de Queiroz Renato Russo As Ceguinhas de Campina Grande Teatro Oficina Violeta Arraes Vó Maria Walter Firmo Waly Salomão |\n",
961
+ "| 2005 | Alfredo Bosi Ana das Carrancas Antonio Jerônimo de Meneses Neto Antonio Manuel Lima Dias Augusto Boal Augusto Carlos da Silva Teles Pinduca Ballet Stagium Carlos Lopes CUCA/UNE Cleyde Yáconis Clóvis Moura Darcy Ribeiro Eduardo Coutinho Egberto Gismonti Eliane Lage Grupo Bandolins de Oeiras Henri Salvador Isabel Mendes da Cunha João Gilberto José Antônio de Almeida Prado José Mojica Marins Lino Rojas Manuel dos Reis Machado Maria Bethânia Mario Augusto de Berredo Carneiro Maurice Capovilla Dona Militana Movimento Manguebeat Museu Casa do Pontal Nei Lopes Nino Fernandes Olivério Ferreira Paulo Linhares Roger Avanzi Ruth de Souza Silviano Santiago Vicente Joaquim Ferreira Pastinha Ziraldo |\n",
962
+ "| 2006 | Amir Haddad Banda de Pífanos de Caruaru Berthold Zilly Casa de Cultura Tainã CEASM Conselho Internacional de Museus Cora Coralina Curt Meyer-Clason Daniel Munduruku Dino Garcia Carrera Dona Teté Cacuriá Emmanuel Nassar Escola de Museologia da UniRio Feira do Livro de Porto Alegre Fernando Birri Grupo Corpo Henry Thorau Intrépida Trupe Johannes Odenthal José Mindlin Josué de Castro Júlio Bressane Laura Cardoso Lauro César Muniz Lygia Martins Costa Luiz Phelipe de Carvalho Castro Andrés Mário Cravo Neto Mário de Andrade Mário Pedrosa Mestre Eugênio Mestre Verequete Ministerio de Educación, Cultura y Deporte Moacir Santos MAX Paulo César Saraceni Pompeu Christovam de Pina Racionais MC's Ray-Güde Mertin Rodrigo Melo Franco Sábato Magaldi Santos Dumont Sivuca Tânia Andrade Lima Teodoro Freire Tomie Ohtake Vladimir Carvalho |\n",
963
+ "| 2007 | Abdias Nascimento Álvaro Siza Vieira Antônio Carlos Jobim Associação Cultural Cachuera Banda Cabaçal dos Irmãos Aniceto Bárbara Heliodora Cacique Raoni Cartola Celine Imbert Cildo Meireles Castelo Rá-Tim-Bum Claude Lévi-Strauss Clube do Choro de Brasília Dodô e Osmar Escola de Circo Picolino Glauber Rocha Grande Otelo Grupo Nós do Morro Hermilo Borba Filho Lina Bo Bardi Lia Robatto Luiz Gonzaga Luiz Otavio Souza Santos Luiz Mott José Aparecido de Oliveira Jean-Claude Bernardet Jorge Benjor Judith Malina Kanuá Kamayurá Marcelo Grassmann Moniz Bandeira Museu Paraense Emílio Goeldi Orides Fontela Oscar Niemeyer Ronaldo Fraga Selma do Coco Sérgio Britto Solano Trindade Tônia Carrero Tostão Vânia Toledo Walter Smetak |\n",
964
+ "| 2008 | Ailton Krenak Altemar Dutra Anselmo Duarte Athos Bulcão Benedito Ruy Barbosa Bule-Bule Carlos Lyra Claudia Andujar Dulcina de Moraes Edu Lobo Efigênia Ramos Rolim Eva Todor Goiandira do Couto Guimarães Rosa Hans-Joachim Koellreutter João Candido Portinari Johnny Alf Leonardo Villar Maria Bonomi Marlene Mercedes Sosa Milton Hatoum Nelson Triunfo Marcantônio Vilaça Otávio Afonso Orlando Miranda Paulo Emílio Sales Gomes Paulo Moura Pixinguinha Roberto Corrêa Ruy Guerra Sérgio Ricardo Tatiana Belinky Teresa Aguiar Vicente Salles Zabé da Loca Apiwtxa ABGLT ABI Associação Comunidade Yuba Centro Cultural Piollin Coletivo Nacional de Cultura do MST Giramundo Teatro de Bonecos Instituto Baccarelli Mestres da Guitarrada Música no Museu Quasar Cia de Dança |\n",
965
+ "| 2009 | Aderbal Freire Filho Afoxé Filhos de Gandhy Alexandre Wollner Ângela Maria Ataulfo Alves Balé Popular do Recife Beatriz Sarlo Bispo do Rosário Boaventura de Sousa Santos Carlos Manga Carmen Miranda Chico Anysio Deborah Colker Davi Kopenawa Yanomami Elifas Andreato Fernanda Abreu Fernando Peixoto Fundação Iberê Camargo Gerson King Combo Gilvan Samico Heleny Guariba Instituto Olga Kos de Inclusão Cultural Ivaldo Bertazzo José Eduardo Agualusa José Miguel Wisnik Laerte Coutinho Luiz Olimecha Lydia Hortélio Mamulengo Só-Riso Manoel de Oliveira Maria Lúcia Godoy Maracatu Estrela de Ouro de Aliança Mestre Vitalino Mia Couto Miguel Rio Branco Nathalia Timberg Ney Matogrosso Noca da Portela Os Gêmeos Patativa do Assaré Paulo Vanzolini Paulo Bruscky Raul Seixas Roberto Burle Marx Sérgio Rodrigues Teatro Vila Velha ONG Video nas Aldeias Walmor Chagas Zeca Pagodinho |\n",
966
+ "| 2010 | Andrea Tonacci Anna Bella Geiger Armando Nogueira Azelene Kaingang Cândido Mendes de Almeida Carlos Drummond de Andrade Carlota Albuquerque Cazuza Cesária Évora Companhia de Danças Folclóricas Aruanda Demônios da Garoa Denise Stoklos Época de Ouro Escuela Internacional de Cine y Televisión Gal Costa Glória Pires Hermeto Pascoal Ilo Krugli Ismael Ivo Ítalo Rossi Jaguar João Cabral de Melo Neto João Carlos de Souza Gomes Joaquim Nabuco Joênia Wapixana Lavadeiras de Almenara Leon Cakoff Leonardo Boff Lira Ceciliana Maracatu Estrela Brilhante de Igarassú Mário Gruber Correia Maureen Bisilliat Maurício Segall Mestre Alberto da Paz Moacir Werneck de Castro Nelson Rodrigues Pedro Casaldáliga Rogério Duarte Tonico Vinicius de Moraes |\n",
967
+ "| 2011 | Academia Brasileira de Letras Adriana Varejão Afonso Borges Ana Montenegro Antônio Nóbrega Antônio Pitanga Apolônio Melônio Associação Capão Cidadão Associação dos Artesãos de Santana do Araçuaí Beth Carvalho Campos de Carvalho Capiba Casa de Produtos Indígenas Wariró Central Única das Favelas Clarice Lispector Claudett de Jesus Ribeiro Dançando para não dançar Dzi Croquettes Espedito Seleiro Evando dos Santos Festival de Dança de Joinville Festival Santista de Teatro Glênio Bianchetti Grupo Galpão Gustavo Dahl Héctor Babenco Helena Kolody Herbert de Sousa Ítala Nandi Jair Rodrigues João do Vale João das Neves José Renato Pécora Leila Diniz Lélia Abramo Luiz Melodia Lygia Bojunga Nunes Maracatu Estrela de Tracunhaém Mário Lago Memorial Jesuíta Unisinos Nelson Cavaquinho Paulo Freire Paulo Gracindo Quinteto Violado Samba de Cumbuca Teatro Tablado Tereza Costa Rêgo Vik Muniz Valdemar de Oliveira Zuzu Angel |\n",
968
+ "| 2012 | Abelardo da Hora Aguinaldo Silva Alceu Valença Almir Narayamoga Suruí Amácio Mazzaropi Anna Muylaert Associação Carnavalesca Bloco Afro Olodum Autran Dourado Breno Silveira Carlos Alberto Cerqueira Lemos Cleodes Maria Piazza Julio Ribeiro Dener Pamplona de Abreu Elba Ramalho Fafá de Belém Felipe Schaedler Hebe Camargo Herivelto Martins Humberto Piva Campana and Fernando Piva Campana Escola de Dança e Integração Social Para Criança e Adolescente Fundação Municipal de Artes de Montenegro Ifigênia Rosa de Oliveira Isay Weinfeld Ismail Xavier Jorge Amado José Sarney Marieta Severo Mário Schenberg Martha Medeiros Miguel Chikaoka Milton Guran Movimento Gay de Minas Museu de Valores do Banco Central Museu Histórico Nacional Orquestra Popular da Bomba do Hemetério Orlando Orfei Paulo Goulart Plínio Marcos Raquel Trindade Regina Casé Rose Marie Muraro Senor Abravanel |\n",
969
+ "| 2013 | Antônio Abujamra Antônio Fagundes Antunes Filho Associação de Sambadores e Sambadeiras do Estado da Bahia Bárbara Paz Carlos Diegues Daniel Munduruku Dona Zica Eleazar de Carvalho Erasmo Carlos Grupo de Dança Primeiro Ato Grupo Gay da Bahia Hélio Cabral Henfil Ilê ayê Ivan Lins Laerte Coutinho Lucy Barreto Maracambuco Maria Adelaide Amaral Maria Cândido Marlos Nobre Maurice Capovilla Mira Haar Naná Vasconcelos Nilcemar Nogueira Paulo Archias Mendes da Rocha Paulo Borges Roberto Pires Ronaldo Correia de Brito Rosa Maria dos Santos Alves Rubem Braga Sérgio Mamberti Sociedade Junina Bumba Meu Boi da Liberdade Tomie Ohtake Walda Marques Walter Pinto |\n",
970
+ "| 2014 | Alex Atala Alexandre Herchcovitch Bernardo Paz Bruno e Marrone Celso Frateschi Chico de Assis Eliane Potiguara Henricredo Coelho Hermano Vianna Jenner Augusto José Carlos Meirelles Júlio Medaglia Mano Brown Marisa Monte Matheus Nachtergaele Ogã Bangbala Orlando Senna Oskar Metsavaht Patrícia Pillar Paulo Martins Tião Oleiro Vange Leonel |\n",
971
+ "| 2015 | Adylson Godoy Ailton Krenak Aldyr Schlee Antônio Araújo Arnaldo Antunes As Ceguinhas de Campina Grande Augusto de Campos Casa de Cinema de Porto Alegre Centro de Memória do Circo Cesare La Rocca Comissão Guarani Yvyrupa Daniela Mercury Davi Kopenawa Yanomami Eva Schul Humberto Teixeira Italo Campofiorito Mestre João Grande José Mourão Luís Humberto Mãe Beth de Oxum Marcelo Yuka Niède Guidon Paulo Herkenhoff Rolando Boldrin Ruy Cezar Sociedade Musical Curica Sônia Guajajara Tribo de Atuadores Uruhu Mehinako Vanisa Santiago Vera Tostes Walter Carvalho |\n",
972
+ "| 2016 | Abel Gomes Alcymar Monteiro Ana Mae Barbosa Andrucha Waddington Beatriz Milhazes Carlinhos de Jesus Carlos Alberto Serpa de Oliveira Carlos Vereza Clementina de Jesus Dona Ivone Lara Donga Fernando Meirelles Ferreira Gullar Focus Cia. De Dança Fred Gelli Fundação Darcy Ribeiro Grupo Teatro da Laje Instituto Ricardo Brennand Isaurinha Garcia Ismael Silva Jorge Aragão Jovelina Pérola Negra Maracatu Feminino Coração Nazareno Marcus Faustini Mauro Mendonça Museu do Samba Neguinho da Beija-Flor Nelson Sargento Noel Rosa Papete Ricardo Cravo Albin Rildo Hora Rosa Magalhães Rosa Maria Araújo Silas de Oliveira Vik Muniz |\n",
973
+ "| 2017 | Afonso Oliveira Ana Maria Nobrega Miranda Augusto Marzagão Beto Kelner Boni Carla Camurati Carlos Tufvesson Cláudia Costin Domingo Alzugaray Dona Onete Eduardo Portella Eduardo Saron Nunes Fernando Alterio Galo da Madrugada Genival Lacerda Ivo Barroso Jair de Souza Luciane Gorgulho Luis Severiano Ribeiro Luiz Calainho Marcelo Bertini Marcelo Bratke Marcelo Dantas Maria Ignez Mantovani Moeller & Botelho Produções Artísticas Mãe Neide Oyá D´Oxum Paulo Cruz Pierre André Mantovani Renato Aragão Ricardo Amaral Roberto Minczuk Roberto Santucci |\n",
974
+ "| 2018 | Abelardo Barbosa Antonio Mazzafera Biblioteca Oliveira Lima Bruno Wainer Carlos Saldanha Carlos Vereza Dedé Santana Eva Sopher Eva Wilma Festival Villa Mix Guilherme Fiuza Instituto Histórico e Geográfico Brasileiro Jorge Caldeira José Bonifácio Kati Almeida Braga King's Brazil Institute Luiz Oscar Niemeyer Marcelo Castello Branco Marcio Fraccaroli Martim Vasques da Cunha Milton Gonçalves Monah Delacy Museu de Arte de São Paulo Museu de Arte Moderna do Rio de Janeiro Museu de Arte Moderna de São Paulo Museu da Gente Sergipana Orquestra Filarmônica de Minas Gerais Roberto Teixeira da Costa Saulo Ferreira Sérgio Mendes Sérgio Mielniczenko Thiago Soares Trio Roraimeira Vó Mera Wanda Sá |\n",
975
+ "Mercedes Sosa \n",
976
+ "\n",
977
+ "| Authority control databases | Authority control databases.1 |\n",
978
+ "|:------------------------------|:------------------------------------------------------------------------------------------------|\n",
979
+ "| International | ISNIVIAFFASTWorldCat |\n",
980
+ "| National | GermanyUnited StatesFranceBnF dataItalySpainNetherlandsNorwayChileArgentinaKoreaIsraelCatalonia |\n",
981
+ "| Artists | MusicBrainz |\n",
982
+ "| People | Deutsche BiographieDDB |\n",
983
+ "| Other | IdRefSNAC |\n"
984
+ ]
985
+ }
986
+ ],
987
+ "execution_count": 2
988
  },
989
  {
990
  "metadata": {},
 
1041
  {
1042
  "metadata": {
1043
  "ExecuteTime": {
1044
+ "end_time": "2025-05-03T15:20:07.664466Z",
1045
  "start_time": "2025-04-30T10:41:47.338329Z"
1046
  }
1047
  },
 
1064
  {
1065
  "metadata": {
1066
  "ExecuteTime": {
1067
+ "end_time": "2025-05-03T15:20:07.673812Z",
1068
  "start_time": "2025-04-30T10:41:49.991801Z"
1069
  }
1070
  },
 
1268
  {
1269
  "metadata": {
1270
  "ExecuteTime": {
1271
+ "end_time": "2025-05-03T15:20:07.685934Z",
1272
  "start_time": "2025-04-30T12:15:55.581450Z"
1273
  }
1274
  },
 
1284
  {
1285
  "metadata": {
1286
  "ExecuteTime": {
1287
+ "end_time": "2025-05-03T15:20:07.687032Z",
1288
  "start_time": "2025-04-30T11:59:06.756631Z"
1289
  }
1290
  },
 
1314
  {
1315
  "metadata": {
1316
  "ExecuteTime": {
1317
+ "end_time": "2025-05-03T15:20:07.688006Z",
1318
  "start_time": "2025-04-30T12:15:59.476620Z"
1319
  }
1320
  },
 
1331
  {
1332
  "metadata": {
1333
  "ExecuteTime": {
1334
+ "end_time": "2025-05-03T15:20:07.688887Z",
1335
  "start_time": "2025-04-30T12:24:33.059987Z"
1336
  }
1337
  },
 
1733
  {
1734
  "metadata": {
1735
  "ExecuteTime": {
1736
+ "end_time": "2025-05-03T15:20:07.690452Z",
1737
  "start_time": "2025-04-30T12:27:19.741664Z"
1738
  }
1739
  },
 
1804
  {
1805
  "metadata": {
1806
  "ExecuteTime": {
1807
+ "end_time": "2025-05-03T15:20:07.691455Z",
1808
  "start_time": "2025-04-30T12:55:07.155179Z"
1809
  }
1810
  },
 
1837
  {
1838
  "metadata": {
1839
  "ExecuteTime": {
1840
+ "end_time": "2025-05-03T15:20:07.692386Z",
1841
  "start_time": "2025-04-30T12:40:16.914256Z"
1842
  }
1843
  },
 
1857
  {
1858
  "metadata": {
1859
  "ExecuteTime": {
1860
+ "end_time": "2025-05-03T15:20:07.693236Z",
1861
  "start_time": "2025-04-30T12:46:33.146187Z"
1862
  }
1863
  },
 
1882
  {
1883
  "metadata": {
1884
  "ExecuteTime": {
1885
+ "end_time": "2025-05-03T15:20:07.694065Z",
1886
  "start_time": "2025-04-30T12:56:06.012180Z"
1887
  }
1888
  },
 
1927
  {
1928
  "metadata": {
1929
  "ExecuteTime": {
1930
+ "end_time": "2025-05-03T15:20:07.694872Z",
1931
  "start_time": "2025-04-30T12:57:50.885966Z"
1932
  }
1933
  },
 
1951
  {
1952
  "metadata": {
1953
  "ExecuteTime": {
1954
+ "end_time": "2025-05-03T15:20:07.695702Z",
1955
  "start_time": "2025-04-30T13:03:39.945166Z"
1956
  }
1957
  },
 
1983
  {
1984
  "metadata": {
1985
  "ExecuteTime": {
1986
+ "end_time": "2025-05-03T15:20:07.696589Z",
1987
  "start_time": "2025-04-30T13:30:02.301925Z"
1988
  }
1989
  },
langchain_custom.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from langchain_community.document_loaders.base import BaseLoader
2
+ from langchain_core.documents import Document
3
+ import pandas as pd
4
+ import requests
5
+
6
+ class WikipediaTableLoader(BaseLoader):
7
+ """Load every table on a Wikipedia page as a separate Document."""
8
+ def __init__(self, url: str, title: str):
9
+ self.url = url
10
+ self.title = title
11
+
12
+ def load(self):
13
+
14
+ html = requests.get(self.url, timeout=10).text
15
+ dfs = pd.read_html(html) # grab the tables
16
+ docs = []
17
+
18
+ for i, df in enumerate(dfs):
19
+ docs.append(
20
+ Document(
21
+ page_content=df.to_markdown(index=False),
22
+ metadata={
23
+ "source": self.url,
24
+ "title": self.title,
25
+ "table_index": i,
26
+ },
27
+ )
28
+ )
29
+ return docs