Tutov1/fr: Difference between revisions
A Lyapounov (talk | contribs) (Marked this version for translation) |
A Lyapounov (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
<translate> | <translate> | ||
= | <!--T:1--> | ||
<div style="border:2px; padding:9px; background-color:#158f68;"> | |||
<span style="color:#FFFFFF;"><big>1/ Introduction to SPARQL</big></span> | |||
</div> | |||
<!--T:2--> | <!--T:2--> | ||
Using SPARQL is like being a detective in a vast archive collection. | Using SPARQL is like being a detective in a vast archive collection. Instead of browsing through each document one by one, you use a query language that lets you instantly retrieve information that matches your criteria. | ||
Instead of browsing through each document one by one, you use a query language that lets you instantly retrieve information that matches your criteria. | |||
<!--T:3--> | <!--T:3--> | ||
| Line 21: | Line 23: | ||
<!--T:6--> | <!--T:6--> | ||
SPARQL gives you the superpower coveted by researchers everywhere: asking ultra-specific questions and getting answers within milliseconds. Of course, like any superpower, it takes a bit of practice to master. | SPARQL gives you the superpower coveted by researchers everywhere: asking ultra-specific questions and getting answers within milliseconds. Of course, like any superpower, it takes a bit of practice to master. But don’t worry—this tutorial is here to guide you and turn challenges into opportunities. Who said archival research had to be dusty? | ||
But don’t worry—this tutorial is here to guide you and turn challenges into opportunities. | |||
Who said archival research had to be dusty? | |||
<!--T:7--> | <!--T:7--> | ||
<span style="color:#158f68;"><b>Ready to master the force of SPARQL? Let’s go.</b></span> | <span style="color:#158f68;"><b>Ready to master the force of SPARQL? Let’s go.</b></span> | ||
<!--T: | <!--T:8--> | ||
- | <div style="border:2px; padding:9px; background-color:#158f68;"> | ||
<span style="color:#FFFFFF;"><big>2/ Strategy for Your First Queries</big></span> | |||
</div> | |||
<!--T:9--> | <!--T:9--> | ||
| Line 53: | Line 53: | ||
This tutorial will guide you through the basics of SPARQL and teach you how to identify the key elements needed to adapt an existing query effectively. | This tutorial will guide you through the basics of SPARQL and teach you how to identify the key elements needed to adapt an existing query effectively. | ||
<!--T: | <!--T:14--> | ||
- | <div style="border:2px; padding:9px; background-color:#158f68;"> | ||
<span style="color:#FFFFFF;"><big>3/ The Basics of a SPARQL Query</big></span> | |||
</div> | |||
<!--T:15--> | <!--T:15--> | ||
A SPARQL query is built around two essential components: | A SPARQL query is built around two essential components: | ||
* '''SELECT''' – defines which information to display in the results. | * '''SELECT''' – defines which information to display in the results. | ||
* '''WHERE''' – filters the data by setting specific conditions that the results must meet. | * '''WHERE''' – filters the data by setting specific conditions that the results must meet. | ||
<!--T:16--> | |||
'''Simple Example''' | |||
<!--T:17--> | <!--T:17--> | ||
Here’s a query that retrieves the first and last names of people in the database. | Here’s a query that retrieves the first and last names of people in the database. Lines starting with <code>#</code> are comments to help explain each part of the query. | ||
Lines starting with <code>#</code> are comments to help explain each part of the query. | |||
<syntaxhighlight lang="sparql"> | <syntaxhighlight lang="sparql"> | ||
SELECT ?nom ?prenom | SELECT ?nom ?prenom | ||
| Line 93: | Line 91: | ||
<!--T:20--> | <!--T:20--> | ||
You now know the foundation of any SPARQL query. | You now know the foundation of any SPARQL query. You’ll be able to adapt them to your needs by selecting the right variables and adding filters, extra columns, or advanced options. | ||
You’ll be able to adapt them to your needs by selecting the right variables and adding filters, extra columns, or advanced options. | |||
</translate> | </translate> | ||
Revision as of 11:53, 1 April 2025
1/ Introduction to SPARQL
Using SPARQL is like being a detective in a vast archive collection. Instead of browsing through each document one by one, you use a query language that lets you instantly retrieve information that matches your criteria.
In the context of Resistance in Belgium, SPARQL makes it easier to access data on resistance members: place of birth, residence, official recognition statuses, or affiliation with resistance organizations.
With SPARQL, you can:
- Filter and cross-reference information;
- Customize your searches with specific criteria;
- Extract precise data without manually browsing thousands of records;
- Generate visualizations to better interpret your results.
This approach gives you valuable autonomy in analyzing the dataset. You can not only extract name lists, but also identify complex relationships, such as individuals affiliated with multiple organizations or holding various recognition statuses.
SPARQL gives you the superpower coveted by researchers everywhere: asking ultra-specific questions and getting answers within milliseconds. Of course, like any superpower, it takes a bit of practice to master. But don’t worry—this tutorial is here to guide you and turn challenges into opportunities. Who said archival research had to be dusty?
Ready to master the force of SPARQL? Let’s go.
2/ Strategy for Your First Queries
Now that you have a general idea of what SPARQL is, here’s a strategy to help you get started with your research.
There are tools that assist in writing SPARQL queries, but to gain autonomy and flexibility, it’s often more effective to start from an existing query and adapt it to your needs.
This approach allows you to:
- Save time;
- Avoid common errors;
- Personalize your research with precision.
To get started, you can:
- Consult our examples of SPARQL queries;
- Use artificial intelligence tools capable of generating queries based on your needs.
This tutorial will guide you through the basics of SPARQL and teach you how to identify the key elements needed to adapt an existing query effectively.
3/ The Basics of a SPARQL Query
A SPARQL query is built around two essential components:
- SELECT – defines which information to display in the results.
- WHERE – filters the data by setting specific conditions that the results must meet.
Simple Example
Here’s a query that retrieves the first and last names of people in the database. Lines starting with # are comments to help explain each part of the query.
SELECT ?nom ?prenom
WHERE {
?personne wdt:P1 wd:Q2 ; # Selects people
wdt:P3 ?nom ; # Retrieves last name
wdt:P2 ?prenom . # Retrieves first name
}
Explanation:
1. SELECT ?nom ?prenom: specifies that we want to display the values of the ?nom and ?prenom variables.
2. WHERE { ... }: defines the conditions the data must meet to be included in the results.
Line-by-line breakdown:
?personne wdt:P1 wd:Q2: selects items classified as human beings (P1 = item type, Q2 = person).wdt:P3 ?nom: retrieves the last name of the person.wdt:P2 ?prenom: retrieves the first name of the person.
You now know the foundation of any SPARQL query. You’ll be able to adapt them to your needs by selecting the right variables and adding filters, extra columns, or advanced options.