diff --git a/docs/preparing_queries.md b/docs/preparing_queries.md
index 5837e00..06834d8 100644
--- a/docs/preparing_queries.md
+++ b/docs/preparing_queries.md
@@ -5,7 +5,7 @@ Some filter parameters accept a combination of modifiers to create complex queri
```python
from impresso import AND
-impresso.search.find(term=AND("Titanic", "ship"))
+client.search.find(term=AND("Titanic", "ship"))
```
We can refine this condition and search for all content items that mention `Titanic` and `ship` together **OR** mention `Titanic` and `iceberg` together **AND** do not mention `Di Caprio`.
@@ -14,7 +14,7 @@ We can refine this condition and search for all content items that mention `Tita
```python
from impresso import AND, OR
-impresso.search.find(
+client.search.find(
term=(
AND("Titanic", "ship") |
AND("Titanic", "iceberg")
diff --git a/docs/resources.md b/docs/resources.md
index 6bc9986..6ee239f 100644
--- a/docs/resources.md
+++ b/docs/resources.md
@@ -5,7 +5,7 @@
Search content items in the Impresso corpus.
```python
-impresso.search.find(term='Titanic', limit=10)
+client.search.find(term='Titanic', limit=10)
```
::: impresso.resources.search.SearchResource
@@ -18,7 +18,7 @@ impresso.search.find(term='Titanic', limit=10)
Search entities in the Impresso corpus.
```python
-impresso.entities.find(term="Douglas Adams")
+client.entities.find(term="Douglas Adams")
```
::: impresso.resources.entities.EntitiesResource
@@ -31,7 +31,7 @@ impresso.entities.find(term="Douglas Adams")
Search media sources available in the Impresso corpus.
```python
-impresso.media_sources.find(
+client.media_sources.find(
term="wort",
order_by="lastIssue",
)
@@ -47,7 +47,7 @@ impresso.media_sources.find(
Get a single content item by ID.
```python
-impresso.content_items.get("NZZ-1794-08-09-a-i0002")
+client.content_items.get("NZZ-1794-08-09-a-i0002")
```
## Collections
@@ -86,7 +86,7 @@ When a `find` or `facet` method is called, the response object contains data for
For example, if you want to get all the content items that mention "Titanic" with 20 items per page, you can use the following code:
```python
-result = impresso.search.find(
+result = client.search.find(
term="titanic",
limit=20,
)
diff --git a/examples/notebooks/basic.ipynb b/examples/notebooks/basic.ipynb
index 412b9f3..7acf677 100644
--- a/examples/notebooks/basic.ipynb
+++ b/examples/notebooks/basic.ipynb
@@ -19,7 +19,7 @@
"source": [
"from impresso import connect\n",
"\n",
- "impresso = connect()"
+ "client = connect()"
]
},
{
@@ -164,7 +164,7 @@
"
\n",
" \n",
- " | 2-54-San_José | \n",
- " San José | \n",
+ " 2-54-San_Jos\u00e9 | \n",
+ " San Jos\u00e9 | \n",
" location | \n",
" Q173718 | \n",
" 163 | \n",
" 114 | \n",
"
\n",
" \n",
- " | 2-54-San_José_$28$Costa_Rica$29$ | \n",
- " San José (Costa Rica) | \n",
+ " 2-54-San_Jos\u00e9_$28$Costa_Rica$29$ | \n",
+ " San Jos\u00e9 (Costa Rica) | \n",
" location | \n",
" NaN | \n",
" 2 | \n",
@@ -513,10 +513,10 @@
],
"source": [
"from impresso import OR\n",
- "impresso.entities.find(\n",
+ "client.entities.find(\n",
" entity_id=OR(\n",
- " \"2-54-San_José\",\n",
- " \"2-54-San_José_$28$Costa_Rica$29$\",\n",
+ " \"2-54-San_Jos\u00e9\",\n",
+ " \"2-54-San_Jos\u00e9_$28$Costa_Rica$29$\",\n",
" ),\n",
")"
]
@@ -617,7 +617,7 @@
],
"source": [
"from impresso import AND\n",
- "impresso.entities.find(wikidata_id=AND(\"Q2\", \"Q4\", \"Q42\"))"
+ "client.entities.find(wikidata_id=AND(\"Q2\", \"Q4\", \"Q42\"))"
]
},
{
@@ -717,7 +717,7 @@
" Parigi | \n",
" capitale de la France | \n",
" capitale della Francia | \n",
- " Hauptstadt und bevölkerungsreichste Stadt Fran... | \n",
+ " Hauptstadt und bev\u00f6lkerungsreichste Stadt Fran... | \n",
" capital city of France | \n",
" 48.856667 | \n",
" 2.352222 | \n",
@@ -737,7 +737,7 @@
" Parigi | \n",
" capitale de la France | \n",
" capitale della Francia | \n",
- " Hauptstadt und bevölkerungsreichste Stadt Fran... | \n",
+ " Hauptstadt und bev\u00f6lkerungsreichste Stadt Fran... | \n",
" capital city of France | \n",
" 48.856667 | \n",
" 2.352222 | \n",
@@ -757,7 +757,7 @@
" Parigi | \n",
" capitale de la France | \n",
" capitale della Francia | \n",
- " Hauptstadt und bevölkerungsreichste Stadt Fran... | \n",
+ " Hauptstadt und bev\u00f6lkerungsreichste Stadt Fran... | \n",
" capital city of France | \n",
" 48.856667 | \n",
" 2.352222 | \n",
@@ -776,7 +776,7 @@
}
],
"source": [
- "impresso.entities.find(term=\"Paris\", resolve=True)"
+ "client.entities.find(term=\"Paris\", resolve=True)"
]
}
],
@@ -801,4 +801,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
-}
+}
\ No newline at end of file
diff --git a/examples/notebooks/media_sources.ipynb b/examples/notebooks/media_sources.ipynb
index c51ee3c..5289917 100644
--- a/examples/notebooks/media_sources.ipynb
+++ b/examples/notebooks/media_sources.ipynb
@@ -9,15 +9,15 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "🎉 You are now connected to the Impresso API! 🎉\n",
- "🔗 Using API: https://dev.impresso-project.ch/public-api/v1\n"
+ "\ud83c\udf89 You are now connected to the Impresso API! \ud83c\udf89\n",
+ "\ud83d\udd17 Using API: https://dev.impresso-project.ch/public-api/v1\n"
]
}
],
"source": [
"from impresso import connect\n",
"\n",
- "impresso = connect()"
+ "client = connect()"
]
},
{
@@ -126,7 +126,7 @@
}
],
"source": [
- "result = impresso.media_sources.find(\n",
+ "result = client.media_sources.find(\n",
" term=\"wort\",\n",
" type=\"newspaper\",\n",
" order_by=\"lastIssue\",\n",
@@ -159,7 +159,7 @@
}
],
"source": [
- "result = impresso.media_sources.find(\n",
+ "result = client.media_sources.find(\n",
" term=\"ll\",\n",
" type=\"newspaper\",\n",
" order_by=\"lastIssue\",\n",
@@ -196,4 +196,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
-}
+}
\ No newline at end of file
diff --git a/examples/notebooks/search.ipynb b/examples/notebooks/search.ipynb
index a6afeff..d7aab9a 100644
--- a/examples/notebooks/search.ipynb
+++ b/examples/notebooks/search.ipynb
@@ -9,15 +9,15 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "🎉 You are now connected to the Impresso API! 🎉\n",
- "🔗 Using API: https://dev.impresso-project.ch/public-api/v1\n"
+ "\ud83c\udf89 You are now connected to the Impresso API! \ud83c\udf89\n",
+ "\ud83d\udd17 Using API: https://dev.impresso-project.ch/public-api/v1\n"
]
}
],
"source": [
"from impresso import connect\n",
"\n",
- "impresso = connect()"
+ "client = connect()"
]
},
{
@@ -112,7 +112,7 @@
"
\n",
" | luxland-1991-12-06-a-i0055 | \n",
" ar | \n",
- " Unzufriedenes Gefühl | \n",
+ " Unzufriedenes Gef\u00fchl | \n",
" | \n",
" [{'uid': '2-54-Reuters'}] | \n",
" [{'uid': '2-50-Parry'}, {'uid': '2-50-Robin_Wi... | \n",
@@ -148,7 +148,7 @@
"
\n",
" | luxland-2007-06-22-a-i0043 | \n",
" ar | \n",
- " Prévisible homme vert | \n",
+ " Pr\u00e9visible homme vert | \n",
" | \n",
" [] | \n",
" [{'uid': '2-50-Harold_Godwinson'}, {'uid': '2-... | \n",
@@ -177,7 +177,7 @@
}
],
"source": [
- "impresso.search.find(term=\"monthy python\")"
+ "client.search.find(term=\"monthy python\")"
]
},
{
@@ -197,15 +197,15 @@
"output_type": "stream",
"text": [
"Total items in the result set: 8\n",
- "Got page 0 - 2 of 8. The first title is Unzufriedenes Gefühl\n",
- "Got page 2 - 4 of 8. The first title is Prévisible homme vert\n",
- "Got page 4 - 6 of 8. The first title is Aux élus et aux membres des comités locaux PRD du district de St-Mauri[...]\n",
+ "Got page 0 - 2 of 8. The first title is Unzufriedenes Gef\u00fchl\n",
+ "Got page 2 - 4 of 8. The first title is Pr\u00e9visible homme vert\n",
+ "Got page 4 - 6 of 8. The first title is Aux \u00e9lus et aux membres des comit\u00e9s locaux PRD du district de St-Mauri[...]\n",
"Got page 6 - 8 of 8. The first title is DU TAC\n"
]
}
],
"source": [
- "result = impresso.search.find(\n",
+ "result = client.search.find(\n",
" term=\"monthy python\",\n",
" limit=2,\n",
")\n",
@@ -304,7 +304,7 @@
" Vor 400 Jahren wurde in Luxemburg das erste Bu... | \n",
" | \n",
" [{'uid': '2-54-Resurrection_of_Jesus'}, {'uid'... | \n",
- " [{'uid': '2-50-Jesus_(Begriffsklärung)'}, {'ui... | \n",
+ " [{'uid': '2-50-Jesus_(Begriffskl\u00e4rung)'}, {'ui... | \n",
" [{'uid': 'tm-de-all-v2.0_tp11_de', 'relevance'... | \n",
" 2999 | \n",
" 3 | \n",
@@ -322,7 +322,7 @@
" NOUVELLISTE VAUDOIS I Le transport | \n",
" | \n",
" [{'uid': '2-54-Afrique'}, {'uid': '2-54-Vienne... | \n",
- " [{'uid': '2-50-Delsol'}, {'uid': '2-50-Léon_Ga... | \n",
+ " [{'uid': '2-50-Delsol'}, {'uid': '2-50-L\u00e9on_Ga... | \n",
" [{'uid': 'tm-fr-all-v2.0_tp36_fr', 'relevance'... | \n",
" 2913 | \n",
" 1 | \n",
@@ -348,7 +348,7 @@
}
],
"source": [
- "impresso.search.find(term=\"impresso\", with_text_contents=True)"
+ "client.search.find(term=\"impresso\", with_text_contents=True)"
]
},
{
@@ -411,7 +411,7 @@
}
],
"source": [
- "impresso.search.find(title=\"impresso\")"
+ "client.search.find(title=\"impresso\")"
]
},
{
@@ -498,7 +498,7 @@
" ar | \n",
" Art, 1. Chaque personne, homme ou femme,... | \n",
" | \n",
- " [{'uid': '2-54-Société'}] | \n",
+ " [{'uid': '2-54-Soci\u00e9t\u00e9'}] | \n",
" [] | \n",
" [{'uid': 'tm-fr-all-v2.0_tp70_fr', 'relevance'... | \n",
" 202 | \n",
@@ -514,7 +514,7 @@
"
\n",
" | LLS-1980-06-25-a-i0003 | \n",
" ar | \n",
- " ÉGALITÊ HOMME-FEMME: lOMMAGE! | \n",
+ " \u00c9GALIT\u00ca HOMME-FEMME: lOMMAGE! | \n",
" | \n",
" [] | \n",
" [] | \n",
@@ -532,7 +532,7 @@
"
\n",
" | LLS-1982-12-08-a-i0006 | \n",
" ar | \n",
- " ËGALITÉ HOMME—FEMME; GAGHOTTERIES | \n",
+ " \u00cbGALIT\u00c9 HOMME\u2014FEMME; GAGHOTTERIES | \n",
" | \n",
" [] | \n",
" [{'uid': '2-50-Christiane_Brunner'}] | \n",
@@ -563,7 +563,7 @@
"source": [
"from impresso import AND\n",
"\n",
- "impresso.search.find(title=AND(\"homme\", \"femme\"))"
+ "client.search.find(title=AND(\"homme\", \"femme\"))"
]
},
{
@@ -649,7 +649,7 @@
"
\n",
" | CDV-1850-11-16-a-i0020 | \n",
" ar | \n",
- " LE RÊVE D'UN HOMME D'ETAT | \n",
+ " LE R\u00caVE D'UN HOMME D'ETAT | \n",
" | \n",
" [] | \n",
" [] | \n",
@@ -687,7 +687,7 @@
" ar | \n",
" Rapport sur la politique de la Suisse en faveu... | \n",
" | \n",
- " [{'uid': '2-54-Suisse'}, {'uid': '2-54-Genève'... | \n",
+ " [{'uid': '2-54-Suisse'}, {'uid': '2-54-Gen\u00e8ve'... | \n",
" [{'uid': '2-50-Arthur_Honegger'}, {'uid': '2-5... | \n",
" [] | \n",
" 19944 | \n",
@@ -716,7 +716,7 @@
"source": [
"from impresso import OR\n",
"\n",
- "impresso.search.find(title=OR(\"homme\", \"femme\"))"
+ "client.search.find(title=OR(\"homme\", \"femme\"))"
]
},
{
@@ -833,7 +833,7 @@
"source": [
"from impresso import OR\n",
"\n",
- "impresso.search.find(title=\"luddite\", term=~OR(\"textile\", \"machine\"))"
+ "client.search.find(title=\"luddite\", term=~OR(\"textile\", \"machine\"))"
]
},
{
@@ -944,7 +944,7 @@
" Hitler-Vrief an Stalin. | \n",
" | \n",
" [] | \n",
- " [{'uid': '2-50-Rudolf_Heß'}, {'uid': '2-50-Ben... | \n",
+ " [{'uid': '2-50-Rudolf_He\u00df'}, {'uid': '2-50-Ben... | \n",
" [{'uid': 'tm-de-all-v2.0_tp61_de', 'relevance'... | \n",
" 427 | \n",
" 1 | \n",
@@ -959,9 +959,9 @@
"
\n",
" | dunioun-1946-03-30-a-i0102 | \n",
" ar | \n",
- " DE NÜRNBERGER PROZESS | \n",
+ " DE N\u00dcRNBERGER PROZESS | \n",
" | \n",
- " [{'uid': '2-54-Däitscht_Räich_vun_1933_bis_194... | \n",
+ " [{'uid': '2-54-D\u00e4itscht_R\u00e4ich_vun_1933_bis_194... | \n",
" [{'uid': '2-50-Adolf_Hitler'}] | \n",
" [{'uid': 'tm-lb-all-v2.1_tp53_lb', 'relevance'... | \n",
" 593 | \n",
@@ -990,7 +990,7 @@
"source": [
"from impresso import AND, OR\n",
"\n",
- "impresso.search.find(term=AND(\"hitler\", \"stalin\") & OR(\"molotow\", \"ribbentrop\") & ~OR(\"churchill\"))"
+ "client.search.find(term=AND(\"hitler\", \"stalin\") & OR(\"molotow\", \"ribbentrop\") & ~OR(\"churchill\"))"
]
},
{
@@ -1054,7 +1054,7 @@
}
],
"source": [
- "impresso.search.find(term=\"impresso\", front_page=True)"
+ "client.search.find(term=\"impresso\", front_page=True)"
]
},
{
@@ -1118,7 +1118,7 @@
}
],
"source": [
- "impresso.search.find(entity_id=\"aida-0001-54-Switzerland\")"
+ "client.search.find(entity_id=\"aida-0001-54-Switzerland\")"
]
},
{
@@ -1180,7 +1180,7 @@
}
],
"source": [
- "impresso.search.find(entity_id=AND(\"aida-0001-54-Switzerland\", \"aida-0001-50-Albert_Einstein\"))"
+ "client.search.find(entity_id=AND(\"aida-0001-54-Switzerland\", \"aida-0001-50-Albert_Einstein\"))"
]
},
{
@@ -1242,7 +1242,7 @@
}
],
"source": [
- "impresso.search.find(entity_id=OR(\"aida-0001-54-Switzerland\", \"aida-0001-50-Albert_Einstein\"))"
+ "client.search.find(entity_id=OR(\"aida-0001-54-Switzerland\", \"aida-0001-50-Albert_Einstein\"))"
]
},
{
@@ -1306,7 +1306,7 @@
}
],
"source": [
- "impresso.search.find(term=\"independence\", newspaper_id=OR(\"EXP\", \"GDL\"))"
+ "client.search.find(term=\"independence\", newspaper_id=OR(\"EXP\", \"GDL\"))"
]
},
{
@@ -1392,7 +1392,7 @@
"
\n",
" | luxwort-1945-07-04-a-i0001 | \n",
" ar | \n",
- " „Proclaim liberty throughout the land...\" Ganz... | \n",
+ " \u201eProclaim liberty throughout the land...\" Ganz... | \n",
" | \n",
" [] | \n",
" [{'uid': '2-50-Adler'}, {'uid': '2-50-Charlott... | \n",
@@ -1428,7 +1428,7 @@
"
\n",
" | luxwort-1950-12-27-a-i0043 | \n",
" ar | \n",
- " Präsident Truman wieder in Washington | \n",
+ " Pr\u00e4sident Truman wieder in Washington | \n",
" | \n",
" [{'uid': '2-54-Independence'}, {'uid': '2-54-M... | \n",
" [{'uid': '2-50-Harry_S._Truman'}, {'uid': '2-5... | \n",
@@ -1459,7 +1459,7 @@
"source": [
"from impresso import DateRange\n",
"\n",
- "impresso.search.find(term=\"independence\", date_range=DateRange(\"1921-05-21\", \"2001-01-02\"))"
+ "client.search.find(term=\"independence\", date_range=DateRange(\"1921-05-21\", \"2001-01-02\"))"
]
},
{
@@ -1579,7 +1579,7 @@
"
\n",
" | NTS-1873-09-20-a-i0020 | \n",
" ar | \n",
- " — New-Iork. In Schevreport (Louisiana) b... | \n",
+ " \u2014 New-Iork. In Schevreport (Louisiana) b... | \n",
" | \n",
" [] | \n",
" [] | \n",
@@ -1610,7 +1610,7 @@
"source": [
"from impresso import DateRange\n",
"\n",
- "impresso.search.find(term=\"independence\", date_range=~DateRange(\"1921-05-21\", \"2001-01-02\"))"
+ "client.search.find(term=\"independence\", date_range=~DateRange(\"1921-05-21\", \"2001-01-02\"))"
]
},
{
@@ -1761,7 +1761,7 @@
}
],
"source": [
- "impresso.search.find(term=\"banana\", language=OR(\"it\", \"en\"))"
+ "client.search.find(term=\"banana\", language=OR(\"it\", \"en\"))"
]
},
{
@@ -1845,7 +1845,7 @@
"
\n",
" | lepetitparisien-1909-02-26-a-i0063 | \n",
" ar | \n",
- " « LA BANANA » | \n",
+ " \u00ab LA BANANA \u00bb | \n",
" | \n",
" [] | \n",
" [] | \n",
@@ -1910,7 +1910,7 @@
}
],
"source": [
- "impresso.search.find(term=\"banana\", language=~OR(\"it\", \"en\"))"
+ "client.search.find(term=\"banana\", language=~OR(\"it\", \"en\"))"
]
},
{
@@ -2025,7 +2025,7 @@
}
],
"source": [
- "impresso.search.find(mention=AND(\"Charlie Chaplin\", \"Switzerland\"))"
+ "client.search.find(mention=AND(\"Charlie Chaplin\", \"Switzerland\"))"
]
},
{
@@ -2129,7 +2129,7 @@
"
\n",
" | lepetitparisien-1925-02-27-a-i0066 | \n",
" ar | \n",
- " Une ferme détruite par un incendie | \n",
+ " Une ferme d\u00e9truite par un incendie | \n",
" | \n",
" [{'uid': '2-54-Pontoise'}] | \n",
" [] | \n",
@@ -2147,7 +2147,7 @@
"
\n",
" | lepetitparisien-1908-09-04-a-i0048 | \n",
" ar | \n",
- " Un chantier de bois et une scierie détruits, à... | \n",
+ " Un chantier de bois et une scierie d\u00e9truits, \u00e0... | \n",
" | \n",
" [{'uid': '2-54-Provins'}, {'uid': '2-54-Arrond... | \n",
" [] | \n",
@@ -2176,7 +2176,7 @@
}
],
"source": [
- "impresso.search.find(topic_id=OR(\"tm-fr-all-v2.0_tp07_fr\", \"tm-fr-all-v2.0_tp48_fr\"))"
+ "client.search.find(topic_id=OR(\"tm-fr-all-v2.0_tp07_fr\", \"tm-fr-all-v2.0_tp48_fr\"))"
]
},
{
@@ -2240,7 +2240,7 @@
}
],
"source": [
- "impresso.search.find(collection_id=\"REPLACEME\")"
+ "client.search.find(collection_id=\"REPLACEME\")"
]
},
{
@@ -2362,7 +2362,7 @@
"
\n",
" | LCE-2002-02-15-a-i0047 | \n",
" ar | \n",
- " des conditions claires Négocier dans | \n",
+ " des conditions claires N\u00e9gocier dans | \n",
" | \n",
" [{'uid': '2-54-Suisse'}, {'uid': '2-54-Union_e... | \n",
" [] | \n",
@@ -2391,7 +2391,7 @@
}
],
"source": [
- "impresso.search.find(term=\"Schengen\", country=OR(\"FR\", \"CH\"))"
+ "client.search.find(term=\"Schengen\", country=OR(\"FR\", \"CH\"))"
]
},
{
@@ -2455,7 +2455,7 @@
}
],
"source": [
- "impresso.search.find(term=\"Schengen\", partner_id=\"Migros\")"
+ "client.search.find(term=\"Schengen\", partner_id=\"Migros\")"
]
},
{
@@ -2520,7 +2520,7 @@
],
"source": [
"from impresso import OR\n",
- "impresso.search.find(text_reuse_cluster_id=OR(\"tr-nobp-all-v01-c29\"))"
+ "client.search.find(text_reuse_cluster_id=OR(\"tr-nobp-all-v01-c29\"))"
]
},
{
@@ -2613,7 +2613,7 @@
}
],
"source": [
- "impresso.search.facet(\"daterange\", term=\"monty python\")"
+ "client.search.facet(\"daterange\", term=\"monty python\")"
]
},
{
@@ -2642,7 +2642,7 @@
}
],
"source": [
- "result = impresso.search.facet(\n",
+ "result = client.search.facet(\n",
" \"daterange\",\n",
" term=\"monty python\",\n",
" limit=5,\n",
@@ -2731,7 +2731,7 @@
}
],
"source": [
- "impresso.search.facet(\"year\", term=\"impresso\")"
+ "client.search.facet(\"year\", term=\"impresso\")"
]
},
{
@@ -2813,7 +2813,7 @@
}
],
"source": [
- "impresso.search.facet(\"contentLength\", term=\"impresso\")"
+ "client.search.facet(\"contentLength\", term=\"impresso\")"
]
},
{
@@ -2891,7 +2891,7 @@
}
],
"source": [
- "impresso.search.facet(\"month\", term=\"impresso\")"
+ "client.search.facet(\"month\", term=\"impresso\")"
]
},
{
@@ -2969,7 +2969,7 @@
}
],
"source": [
- "impresso.search.facet(\"country\", term=\"impresso\")"
+ "client.search.facet(\"country\", term=\"impresso\")"
]
},
{
@@ -3051,7 +3051,7 @@
}
],
"source": [
- "impresso.search.facet(\"type\")"
+ "client.search.facet(\"type\")"
]
},
{
@@ -3138,7 +3138,7 @@
}
],
"source": [
- "impresso.search.facet(\"topic\", term=\"pomme\")"
+ "client.search.facet(\"topic\", term=\"pomme\")"
]
},
{
@@ -3202,7 +3202,7 @@
}
],
"source": [
- "impresso.search.facet(\"collection\", term=\"pomme\")"
+ "client.search.facet(\"collection\", term=\"pomme\")"
]
},
{
@@ -3268,7 +3268,7 @@
"
\n",
" | FedGazFr | \n",
" 18 | \n",
- " Feuille Fédérale | \n",
+ " Feuille F\u00e9d\u00e9rale | \n",
"
\n",
" \n",
" | GAV | \n",
@@ -3289,7 +3289,7 @@
}
],
"source": [
- "impresso.search.facet(\"newspaper\", term=\"Schengen\")"
+ "client.search.facet(\"newspaper\", term=\"Schengen\")"
]
},
{
@@ -3371,7 +3371,7 @@
}
],
"source": [
- "impresso.search.facet(\"language\", term=\"Schengen\")"
+ "client.search.facet(\"language\", term=\"Schengen\")"
]
},
{
@@ -3458,7 +3458,7 @@
}
],
"source": [
- "impresso.search.facet(\"person\", term=\"Schengen\", offset=7140)"
+ "client.search.facet(\"person\", term=\"Schengen\", offset=7140)"
]
},
{
@@ -3545,7 +3545,7 @@
}
],
"source": [
- "impresso.search.facet(\"location\", term=\"Schengen\", offset=3310)"
+ "client.search.facet(\"location\", term=\"Schengen\", offset=3310)"
]
},
{
@@ -3620,7 +3620,7 @@
],
"source": [
"from impresso import AND\n",
- "impresso.search.facet(\"nag\", title=AND(\"homme\", \"femme\"))"
+ "client.search.facet(\"nag\", title=AND(\"homme\", \"femme\"))"
]
},
{
@@ -3684,7 +3684,7 @@
}
],
"source": [
- "impresso.search.facet(\"accessRight\", term=\"pomme\")"
+ "client.search.facet(\"accessRight\", term=\"pomme\")"
]
},
{
@@ -3766,7 +3766,7 @@
}
],
"source": [
- "impresso.search.facet(\"partner\", term=\"pomme\")"
+ "client.search.facet(\"partner\", term=\"pomme\")"
]
}
],
@@ -3791,4 +3791,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
-}
+}
\ No newline at end of file
diff --git a/examples/notebooks/textReuse.ipynb b/examples/notebooks/textReuse.ipynb
index 40b4f39..7dae9bb 100644
--- a/examples/notebooks/textReuse.ipynb
+++ b/examples/notebooks/textReuse.ipynb
@@ -9,15 +9,15 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "🎉 You are now connected to the Impresso API! 🎉\n",
- "🔗 Using API: https://dev.impresso-project.ch/public-api/v1\n"
+ "\ud83c\udf89 You are now connected to the Impresso API! \ud83c\udf89\n",
+ "\ud83d\udd17 Using API: https://dev.impresso-project.ch/public-api/v1\n"
]
}
],
"source": [
"from impresso import connect, AND, OR\n",
"\n",
- "impresso = connect()"
+ "client = connect()"
]
},
{
@@ -105,7 +105,7 @@
" tr-all-v1-24-c244588 | \n",
" 78.823529 | \n",
" 2 | \n",
- " Suisses à l’étranger. — La Suisse aura mainten... | \n",
+ " Suisses \u00e0 l\u2019\u00e9tranger. \u2014 La Suisse aura mainten... | \n",
" 1884-08-20 | \n",
" 1884-08-21 | \n",
"
\n",
@@ -123,7 +123,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.find(\n",
+ "client.text_reuse.clusters.find(\n",
" term=\"banana\",\n",
" offset=2,\n",
" limit=5,\n",
@@ -154,7 +154,7 @@
}
],
"source": [
- "result = impresso.text_reuse.clusters.find(\n",
+ "result = client.text_reuse.clusters.find(\n",
" term=\"banana\",\n",
" limit=5,\n",
" order_by=\"passages-count\",\n",
@@ -227,7 +227,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.find(\n",
+ "client.text_reuse.clusters.find(\n",
" term=\"banana\",\n",
" cluster_size=(50, 100),\n",
")"
@@ -292,7 +292,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.find(\n",
+ "client.text_reuse.clusters.find(\n",
" title=AND(\"luxembourg\", \"suisse\"),\n",
" cluster_size=(100, 200),\n",
")"
@@ -357,7 +357,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.find(\n",
+ "client.text_reuse.clusters.find(\n",
" term=\"banana\",\n",
" lexical_overlap=(50, 51),\n",
")"
@@ -427,7 +427,7 @@
" tr-all-v1-24-c137439334025 | \n",
" 78.536585 | \n",
" 2 | \n",
- " Les Sociétés anonymes suisses\\npendant la cris... | \n",
+ " Les Soci\u00e9t\u00e9s anonymes suisses\\npendant la cris... | \n",
" 1937-05-08 | \n",
" 1937-07-10 | \n",
" \n",
@@ -445,7 +445,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.find(\n",
+ "client.text_reuse.clusters.find(\n",
" term=\"banana\",\n",
" day_delta=(50, 100),\n",
")"
@@ -513,7 +513,7 @@
" tr-all-v1-24-c85900161645 | \n",
" 53.061224 | \n",
" 4 | \n",
- " werden.\\nAls Reise-Neuheiten präsentiert die p... | \n",
+ " werden.\\nAls Reise-Neuheiten pr\u00e4sentiert die p... | \n",
" 1977-01-20 | \n",
" 1977-02-09 | \n",
" \n",
@@ -549,7 +549,7 @@
"source": [
"from impresso import DateRange\n",
"\n",
- "impresso.text_reuse.clusters.find(\n",
+ "client.text_reuse.clusters.find(\n",
" term=\"banana\", \n",
" date_range=DateRange(\"1921-05-21\", \"2001-01-02\")\n",
")"
@@ -614,7 +614,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.find(\n",
+ "client.text_reuse.clusters.find(\n",
" term=\"banana\", \n",
" newspaper_id=OR(\"EXP\", \"GDL\"),\n",
")"
@@ -679,7 +679,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.find(collection_id=\"12312312\")"
+ "client.text_reuse.clusters.find(collection_id=\"12312312\")"
]
},
{
@@ -741,7 +741,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.find(\n",
+ "client.text_reuse.clusters.find(\n",
" term=\"banana\", \n",
" front_page=True,\n",
")"
@@ -806,7 +806,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.find(\n",
+ "client.text_reuse.clusters.find(\n",
" term=\"banana\", \n",
" topic_id=OR(\"tm-fr-all-v2.0_tp07_fr\", \"tm-fr-all-v2.0_tp48_fr\")\n",
")"
@@ -890,7 +890,7 @@
" tr-all-v1-24-c10636 | \n",
" 18.840580 | \n",
" 30 | \n",
- " INTERNATIONAL\\nHOLDING S.A.\\nSociété Anonyme\\n... | \n",
+ " INTERNATIONAL\\nHOLDING S.A.\\nSoci\u00e9t\u00e9 Anonyme\\n... | \n",
" 1975-07-11 | \n",
" 1997-03-26 | \n",
" \n",
@@ -908,7 +908,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.find(\n",
+ "client.text_reuse.clusters.find(\n",
" term=\"luxembourg\", \n",
" language=OR(\"it\", \"en\")\n",
")"
@@ -994,7 +994,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.find(\n",
+ "client.text_reuse.clusters.find(\n",
" term=\"schengen\", \n",
" country=OR(\"FR\", \"CH\")\n",
")"
@@ -1059,7 +1059,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.find(\n",
+ "client.text_reuse.clusters.find(\n",
" term=\"schengen\", \n",
" mention=OR(\"Belval\", \"Lausanne\")\n",
")"
@@ -1124,7 +1124,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.find(\n",
+ "client.text_reuse.clusters.find(\n",
" term=\"banana\",\n",
" entity_id=\"aida-0001-54-Switzerland\"\n",
")"
@@ -1214,7 +1214,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.facet(\"daterange\", lexical_overlap=(1, 2))"
+ "client.text_reuse.clusters.facet(\"daterange\", lexical_overlap=(1, 2))"
]
},
{
@@ -1244,7 +1244,7 @@
}
],
"source": [
- "result = impresso.text_reuse.clusters.facet(\"daterange\", lexical_overlap=(1, 2), limit=50)\n",
+ "result = client.text_reuse.clusters.facet(\"daterange\", lexical_overlap=(1, 2), limit=50)\n",
"\n",
"print(f\"Total items in the result set: {result.total}. Limit: {result.limit}. Offset: {result.offset}. Size: {result.size}.\")\n",
"for page in result.pages():\n",
@@ -1331,7 +1331,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.facet(\n",
+ "client.text_reuse.clusters.facet(\n",
" \"textReuseClusterSize\",\n",
" lexical_overlap=(1, 2)\n",
")"
@@ -1414,7 +1414,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.facet(\n",
+ "client.text_reuse.clusters.facet(\n",
" \"textReuseClusterLexicalOverlap\",\n",
" lexical_overlap=(1, 2)\n",
")"
@@ -1497,7 +1497,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.facet(\n",
+ "client.text_reuse.clusters.facet(\n",
" \"textReuseClusterDayDelta\",\n",
" lexical_overlap=(1, 2)\n",
")"
@@ -1564,7 +1564,7 @@
" \n",
" | BNN | \n",
" 10 | \n",
- " Bündner Nachrichten | \n",
+ " B\u00fcndner Nachrichten | \n",
"
\n",
" \n",
" | CDV | \n",
@@ -1585,7 +1585,7 @@
}
],
"source": [
- "impresso.text_reuse.clusters.facet(\n",
+ "client.text_reuse.clusters.facet(\n",
" \"newspaper\",\n",
" lexical_overlap=(1, 2)\n",
")"
@@ -1663,14 +1663,14 @@
"
\n",
" \n",
" | c103079419312-JV-1875-01-09-a-i0001@6137:7961 | \n",
- " se trouvaient MM. Buffet, le duc d’Audiffret-\\... | \n",
+ " se trouvaient MM. Buffet, le duc d\u2019Audiffret-\\... | \n",
" JV-1875-01-09-a-i0001 | \n",
" 6137 | \n",
" 7961 | \n",
"
\n",
" \n",
" | c103079498166-tageblatt-1933-02-28-a-i0073@225:1486 | \n",
- " à Esch-sur-Alzette, rue de l'Industrie 48;\\nPo... | \n",
+ " \u00e0 Esch-sur-Alzette, rue de l'Industrie 48;\\nPo... | \n",
" tageblatt-1933-02-28-a-i0073 | \n",
" 225 | \n",
" 1486 | \n",
@@ -1689,7 +1689,7 @@
}
],
"source": [
- "impresso.text_reuse.passages.find(\n",
+ "client.text_reuse.passages.find(\n",
" term=\"belval\",\n",
" offset=2,\n",
" limit=5,\n",
@@ -1726,7 +1726,7 @@
}
],
"source": [
- "result = impresso.text_reuse.passages.find(\n",
+ "result = client.text_reuse.passages.find(\n",
" term=\"belval\",\n",
" offset=2,\n",
" limit=50,\n",
@@ -1800,7 +1800,7 @@
}
],
"source": [
- "impresso.text_reuse.passages.find(\n",
+ "client.text_reuse.passages.find(\n",
" cluster_id=\"tr-nobp-all-v01-c137438978332\",\n",
" order_by=\"clusterSize\",\n",
")"
@@ -1865,7 +1865,7 @@
}
],
"source": [
- "impresso.text_reuse.passages.find(\n",
+ "client.text_reuse.passages.find(\n",
" term=\"banana\",\n",
" cluster_size=(50, 100),\n",
")"
@@ -1930,7 +1930,7 @@
}
],
"source": [
- "impresso.text_reuse.passages.find(\n",
+ "client.text_reuse.passages.find(\n",
" title=AND(\"luxembourg\", \"suisse\"),\n",
" cluster_size=(100, 200),\n",
")"
@@ -1995,7 +1995,7 @@
}
],
"source": [
- "impresso.text_reuse.passages.find(\n",
+ "client.text_reuse.passages.find(\n",
" term=\"banana\",\n",
" lexical_overlap=(50, 51),\n",
")"
@@ -2061,7 +2061,7 @@
"