<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>Abdel-aziz Harane</title>
<link>https://abdelazizharane.github.io/blog/</link>
<atom:link href="https://abdelazizharane.github.io/blog/index.xml" rel="self" type="application/rss+xml"/>
<description>ML/NLP Engineer &amp; AI Researcher — Chad AI Network</description>
<generator>quarto-1.9.38</generator>
<lastBuildDate>Tue, 10 Jun 2025 00:00:00 GMT</lastBuildDate>
<item>
  <title>Laal : documenter un isolat linguistique à 750 locuteurs</title>
  <dc:creator>Abdel-aziz Harane</dc:creator>
  <link>https://abdelazizharane.github.io/blog/2025-06-10-laal-documenter-isolat.html</link>
  <description><![CDATA[ 





<div class="h-article-header">
  <div class="h-article-meta">
    <span>10 juin 2025</span>
    <span class="separator">·</span>
    <span>8 min de lecture</span>
    <span class="separator">·</span>
    <span class="h-tag h-tag-green" style="font-size:.65rem;">Langues tchadiennes</span>
    <span class="h-tag h-tag-green" style="font-size:.65rem;">Documentation</span>
  </div>
</div>
<section id="introduction" class="level2">
<h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>Le Laal est une langue parlée dans un petit groupe de villages le long de la rivière Bahr Sara, dans la région de Moyen-Chari au sud du Tchad. Avec environ <strong>750 locuteurs restants</strong>, elle est classée au <strong>niveau 5 de l’échelle UNESCO</strong> — “en danger critique d’extinction”.</p>
<p>Ce qui rend le Laal particulièrement remarquable — et urgent à documenter — c’est son statut probable d’<strong>isolat linguistique</strong> : une langue qui n’appartient à aucune famille connue. Comme le basque en Europe, le Laal pourrait représenter le dernier vestige d’une proto-langue préhistorique du bassin du Lac Tchad.</p>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p><strong>Isolat linguistique</strong> : Une langue est dite “isolat” quand elle ne présente aucune parenté génétique démontrable avec d’autres langues. Ce statut est rare et scientifiquement très précieux — chaque isolat est une fenêtre unique sur la diversité cognitive et historique de l’humanité.</p>
</div>
</div>
</section>
<section id="ce-que-nous-savons-du-laal" class="level2">
<h2 class="anchored" data-anchor-id="ce-que-nous-savons-du-laal">Ce que nous savons du Laal</h2>
<p>La majorité de nos connaissances actuelles sur le Laal provient des travaux de <strong>Dr.&nbsp;Florian Lionnet</strong> (Princeton) et de <strong>Prof.&nbsp;Pascal Boyeldieu</strong> (CNRS/LLACAN), qui ont publié les premières descriptions structurées de la langue.</p>
<section id="caractéristiques-phonologiques" class="level3">
<h3 class="anchored" data-anchor-id="caractéristiques-phonologiques">Caractéristiques phonologiques</h3>
<p>Le Laal possède un système tonal complexe qui joue un rôle grammatical — et pas seulement lexical. C’est précisément ce qui pose des défis spécifiques aux systèmes ASR modernes, entraînés massivement sur des langues non-tonales.</p>
<div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb1-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Exemple : représentation d'un contour tonal en Laal</span></span>
<span id="cb1-2"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># H = ton haut, L = ton bas, M = ton moyen, F = ton flottant</span></span>
<span id="cb1-3"></span>
<span id="cb1-4">tonemes <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> {</span>
<span id="cb1-5">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"HL"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"contour descendant (fréquent en position finale)"</span>,</span>
<span id="cb1-6">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"LH"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"contour montant (marqueur aspectuel)"</span>,</span>
<span id="cb1-7">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"H"</span>:  <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ton haut simple"</span>,</span>
<span id="cb1-8">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"L"</span>:  <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ton bas simple"</span>,</span>
<span id="cb1-9">}</span>
<span id="cb1-10"></span>
<span id="cb1-11"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Un même segment phonémique avec des tons différents =</span></span>
<span id="cb1-12"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># deux mots distincts avec des sens complètement différents</span></span></code></pre></div>
</section>
<section id="morphologie-verbale" class="level3">
<h3 class="anchored" data-anchor-id="morphologie-verbale">Morphologie verbale</h3>
<p>La morphologie verbale du Laal est remarquablement complexe, avec des systèmes d’accord, d’aspect et de modalité entrelacés. Boyeldieu (1987) identifie plus de 15 paradigmes verbaux distincts.</p>
</section>
</section>
<section id="pourquoi-maintenant" class="level2">
<h2 class="anchored" data-anchor-id="pourquoi-maintenant">Pourquoi maintenant ?</h2>
<p>La dynamique sociolinguistique au Tchad favorise massivement le <strong>Sara</strong>, le <strong>Français</strong> et l’<strong>Arabe tchadien</strong> comme langues de communication inter-ethnique. Les enfants des communautés Laal grandissent en milieu plurilingue et choisissent souvent le Sara comme première langue fonctionnelle.</p>
<p>Sans intervention documentaire active, le Laal pourrait disparaître dans les <strong>20 à 30 prochaines années</strong>.</p>
</section>
<section id="notre-approche-le-projet-laal-yəw" class="level2">
<h2 class="anchored" data-anchor-id="notre-approche-le-projet-laal-yəw">Notre approche : le Projet Laal-Yəw</h2>
<p>Le projet <strong>Laal-Yəw</strong> (candidature Masakhane Lingua Africa 2025) vise à construire la première infrastructure numérique complète pour la langue :</p>
<div class="h-card" style="margin: 1.5rem 0; padding: 1.5rem;">
  <div style="display:grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 1rem;">
    <div>
      <div style="font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--h-green); margin-bottom:.4rem;">Phase 1</div>
      <div style="font-size:.82rem; font-weight:600; margin-bottom:.3rem;">Corpus &amp; Lexique</div>
      <div style="font-size:.75rem; color:var(--h-muted);">500+ entrées lexicales annotées, 10h d'audio transcrit, dictionnaire numérique open-source.</div>
    </div>
    <div>
      <div style="font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--h-green); margin-bottom:.4rem;">Phase 2</div>
      <div style="font-size:.82rem; font-weight:600; margin-bottom:.3rem;">ASR Baseline</div>
      <div style="font-size:.75rem; color:var(--h-muted);">Fine-tuning Whisper et Wav2Vec 2.0, avec approche riemannienne pour les tons.</div>
    </div>
    <div>
      <div style="font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--h-green); margin-bottom:.4rem;">Phase 3</div>
      <div style="font-size:.82rem; font-weight:600; margin-bottom:.3rem;">Archivage &amp; Accès</div>
      <div style="font-size:.75rem; color:var(--h-muted);">Dépôt ELAR/SOAS, licence CC-BY-SA, copies souveraines gérées par la communauté.</div>
    </div>
  </div>
</div>
<section id="la-géométrie-riemannienne-pour-les-tons" class="level3">
<h3 class="anchored" data-anchor-id="la-géométrie-riemannienne-pour-les-tons">La géométrie riemannienne pour les tons</h3>
<p>Une des innovations techniques du projet est l’utilisation de <strong>variétés riemanniennes</strong> pour représenter les structures tonales grammaticales. L’idée : les contours tonaux du Laal ne sont pas bien représentés dans les espaces euclidiens habituels des embeddings linguistiques.</p>
<div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb2-1"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> torch</span>
<span id="cb2-2"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> geoopt  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># bibliothèque pour la géométrie riemannienne en PyTorch</span></span>
<span id="cb2-3"></span>
<span id="cb2-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Espace hyperbolique de Poincaré pour les tons</span></span>
<span id="cb2-5">manifold <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> geoopt.PoincareBall(c<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1.0</span>)</span>
<span id="cb2-6"></span>
<span id="cb2-7"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Un vecteur représentant un contour tonal HL</span></span>
<span id="cb2-8"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># dans l'espace euclidien standard</span></span>
<span id="cb2-9">tone_HL_euclidean <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> torch.tensor([<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.3</span>, <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.7</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.1</span>])</span>
<span id="cb2-10"></span>
<span id="cb2-11"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Projection vers la variété de Poincaré</span></span>
<span id="cb2-12">tone_HL_hyperbolic <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> manifold.expmap0(tone_HL_euclidean)</span>
<span id="cb2-13"><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">print</span>(<span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f"Représentation hyperbolique : </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>tone_HL_hyperbolic<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb2-14"></span>
<span id="cb2-15"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># La distance hyperbolique capture mieux</span></span>
<span id="cb2-16"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># les relations hiérarchiques entre contours tonaux</span></span></code></pre></div>
</section>
</section>
<section id="implications-pour-lia-africaine" class="level2">
<h2 class="anchored" data-anchor-id="implications-pour-lia-africaine">Implications pour l’IA africaine</h2>
<p>Le Laal illustre un défi général dans le développement de l’IA pour les langues africaines : <strong>la plupart des techniques standard ont été conçues pour des langues bien dotées avec des propriétés typologiques proches de l’anglais ou du mandarin</strong>.</p>
<p>Les solutions que nous développons pour le Laal — représentations tonales non-euclidiennes, transfert d’apprentissage cross-lingue, governance communautaire des données — ont vocation à bénéficier à toutes les langues tchadiennes et, plus largement, à la communauté AfricaNLP.</p>
</section>
<section id="conclusion" class="level2">
<h2 class="anchored" data-anchor-id="conclusion">Conclusion</h2>
<p>Documenter le Laal, ce n’est pas seulement sauver une langue. C’est préserver une façon unique de conceptualiser le temps, l’espace, les relations sociales et le monde naturel. C’est contribuer à notre compréhension collective de la diversité cognitive humaine.</p>
<p>Et c’est prouver que des chercheurs basés au Tchad, avec des partenaires internationaux mais une gouvernance locale, peuvent produire une science de classe mondiale sur leurs propres langues.</p>
<hr>
<p><em>Le code du projet Laal-Yəw sera disponible sur <a href="https://github.com/abdelazizharane/Corpus-Chadian-Languages">GitHub</a> au fur et à mesure de son avancement. Les corpus audio seront déposés sur ELAR/SOAS sous licence CC-BY-SA.</em></p>


</section>

 ]]></description>
  <category>Langues tchadiennes</category>
  <category>Documentation</category>
  <category>Open Science</category>
  <guid>https://abdelazizharane.github.io/blog/2025-06-10-laal-documenter-isolat.html</guid>
  <pubDate>Tue, 10 Jun 2025 00:00:00 GMT</pubDate>
  <media:content url="https://abdelazizharane.github.io/assets/img/blog-laal.svg" medium="image" type="image/svg+xml"/>
</item>
<item>
  <title>Wav2Vec 2.0 sur les langues tonales : défis et solutions</title>
  <dc:creator>Abdel-aziz Harane</dc:creator>
  <link>https://abdelazizharane.github.io/blog/2025-05-22-wav2vec-langues-tonales.html</link>
  <description><![CDATA[ 





<div class="h-article-header">
  <div class="h-article-meta">
    <span>22 mai 2025</span>
    <span class="separator">·</span>
    <span>12 min de lecture</span>
    <span class="separator">·</span>
    <span class="h-tag h-tag-green" style="font-size:.65rem;">Speech AI</span>
    <span class="h-tag h-tag-green" style="font-size:.65rem;">NLP</span>
  </div>
</div>
<section id="contexte" class="level2">
<h2 class="anchored" data-anchor-id="contexte">Contexte</h2>
<p>Wav2Vec 2.0 (Baevski et al., 2020) est l’un des modèles ASR les plus influents de la dernière décennie. Son architecture d’auto-supervision — apprendre des représentations de la parole à partir d’audio brut sans transcriptions — en fait un candidat naturel pour les langues faiblement dotées comme le Sara ou le Laal.</p>
<p>Pourtant, nos expériences préliminaires sur le corpus <strong>Kalam-na</strong> montrent des taux d’erreur de mots (WER) initiaux de <strong>68–74%</strong>, bien supérieurs aux résultats obtenus sur des langues comme le swahili (~32%) ou le wolof (~41%) avec des approches similaires.</p>
<p>Pourquoi ? Et comment y remédier ?</p>
</section>
<section id="le-problème-des-tons" class="level2">
<h2 class="anchored" data-anchor-id="le-problème-des-tons">Le problème des tons</h2>
<p>Le Sara Ngambaye (comme d’autres langues tchadiennes) est une <strong>langue à tons grammaticaux</strong> : le ton d’une syllabe change le sens du mot ou sa fonction grammaticale, pas seulement son expressivité.</p>
<div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb1-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Exemples Sara Ngambaye (transcription simplifiée)</span></span>
<span id="cb1-2"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># H = haut, L = bas</span></span>
<span id="cb1-3"></span>
<span id="cb1-4">exemples_tonals <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> {</span>
<span id="cb1-5">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"kùl (LL)"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"charbon"</span>,</span>
<span id="cb1-6">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"kúl (HH)"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"réunion"</span>,</span>
<span id="cb1-7">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"kúl (HL)"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"appeler (impératif)"</span>,</span>
<span id="cb1-8">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"màng (LL)"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"eau"</span>,</span>
<span id="cb1-9">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"máng (HH)"</span>: <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"manguier"</span>,</span>
<span id="cb1-10">}</span></code></pre></div>
<p>Le problème : Wav2Vec 2.0 pré-entraîné sur <code>wav2vec2-large-xlsr-53</code> a été exposé à des langues où la prosodie (hauteur de la voix) encode l’émotion ou l’emphase — <strong>pas la grammaire</strong>. Le modèle apprend donc à ignorer une information que le Sara utilise comme distincteur phonémique fondamental.</p>
</section>
<section id="notre-pipeline-dadaptation" class="level2">
<h2 class="anchored" data-anchor-id="notre-pipeline-dadaptation">Notre pipeline d’adaptation</h2>
<section id="préparation-des-données" class="level3">
<h3 class="anchored" data-anchor-id="préparation-des-données">1. Préparation des données</h3>
<div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb2-1"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">from</span> datasets <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> load_dataset, Audio</span>
<span id="cb2-2"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">from</span> transformers <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> Wav2Vec2Processor</span>
<span id="cb2-3"></span>
<span id="cb2-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Chargement du corpus Kalam-na (Sara Ngambaye)</span></span>
<span id="cb2-5">dataset <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> load_dataset(</span>
<span id="cb2-6">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Chad-AI-Network/kalam-na"</span>,</span>
<span id="cb2-7">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ngambaye"</span>,</span>
<span id="cb2-8">    split<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"train"</span></span>
<span id="cb2-9">)</span>
<span id="cb2-10"></span>
<span id="cb2-11"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Rééchantillonnage à 16kHz (requis par Wav2Vec 2.0)</span></span>
<span id="cb2-12">dataset <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> dataset.cast_column(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"audio"</span>, Audio(sampling_rate<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">16_000</span>))</span>
<span id="cb2-13"></span>
<span id="cb2-14">processor <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> Wav2Vec2Processor.from_pretrained(</span>
<span id="cb2-15">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"facebook/wav2vec2-large-xlsr-53"</span></span>
<span id="cb2-16">)</span>
<span id="cb2-17"></span>
<span id="cb2-18"><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">def</span> preprocess(batch):</span>
<span id="cb2-19">    audio <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> batch[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"audio"</span>]</span>
<span id="cb2-20">    batch[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"input_values"</span>] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> processor(</span>
<span id="cb2-21">        audio[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"array"</span>],</span>
<span id="cb2-22">        sampling_rate<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>audio[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"sampling_rate"</span>],</span>
<span id="cb2-23">        return_tensors<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"pt"</span></span>
<span id="cb2-24">    ).input_values[<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>]</span>
<span id="cb2-25">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Encodage tonal dans les labels : on ajoute les diacritiques</span></span>
<span id="cb2-26">    batch[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"labels"</span>] <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> processor.tokenizer(</span>
<span id="cb2-27">        batch[<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"transcription_with_tones"</span>]</span>
<span id="cb2-28">    ).input_ids</span>
<span id="cb2-29">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">return</span> batch</span>
<span id="cb2-30"></span>
<span id="cb2-31">dataset <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> dataset.<span class="bu" style="color: null;
background-color: null;
font-style: inherit;">map</span>(preprocess, remove_columns<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>dataset.column_names)</span></code></pre></div>
</section>
<section id="vocabulaire-étendu-avec-diacritiques-tonals" class="level3">
<h3 class="anchored" data-anchor-id="vocabulaire-étendu-avec-diacritiques-tonals">2. Vocabulaire étendu avec diacritiques tonals</h3>
<div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb3-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Vocabulaire Sara Ngambaye étendu</span></span>
<span id="cb3-2">VOCAB_SARA <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> {</span>
<span id="cb3-3">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Voyelles sans ton</span></span>
<span id="cb3-4">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"a"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"e"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ɛ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"i"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"o"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ɔ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"u"</span>,</span>
<span id="cb3-5">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Voyelles avec ton haut (accent aigu)</span></span>
<span id="cb3-6">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"á"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"é"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ɛ́"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"í"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ó"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ɔ́"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ú"</span>,</span>
<span id="cb3-7">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Voyelles avec ton bas (accent grave)</span></span>
<span id="cb3-8">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"à"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"è"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ɛ̀"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ì"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ò"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ɔ̀"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ù"</span>,</span>
<span id="cb3-9">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Consonnes spécifiques</span></span>
<span id="cb3-10">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ŋ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ɲ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"gb"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"kp"</span>,</span>
<span id="cb3-11">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Tokens spéciaux</span></span>
<span id="cb3-12">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"[PAD]"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"[UNK]"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"|"</span>,  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># | = séparateur de mots</span></span>
<span id="cb3-13">}</span></code></pre></div>
</section>
<section id="fine-tuning-avec-augmentation-tonale" class="level3">
<h3 class="anchored" data-anchor-id="fine-tuning-avec-augmentation-tonale">3. Fine-tuning avec augmentation tonale</h3>
<div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb4-1"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">from</span> transformers <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> (</span>
<span id="cb4-2">    Wav2Vec2ForCTC,</span>
<span id="cb4-3">    Wav2Vec2CTCTokenizer,</span>
<span id="cb4-4">    TrainingArguments,</span>
<span id="cb4-5">    Trainer</span>
<span id="cb4-6">)</span>
<span id="cb4-7"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> torch</span>
<span id="cb4-8"></span>
<span id="cb4-9">model <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> Wav2Vec2ForCTC.from_pretrained(</span>
<span id="cb4-10">    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"facebook/wav2vec2-large-xlsr-53"</span>,</span>
<span id="cb4-11">    attention_dropout<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.1</span>,</span>
<span id="cb4-12">    hidden_dropout<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.1</span>,</span>
<span id="cb4-13">    feat_proj_dropout<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.0</span>,</span>
<span id="cb4-14">    mask_time_prob<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.05</span>,</span>
<span id="cb4-15">    layerdrop<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.1</span>,</span>
<span id="cb4-16">    ctc_loss_reduction<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"mean"</span>,</span>
<span id="cb4-17">    pad_token_id<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>processor.tokenizer.pad_token_id,</span>
<span id="cb4-18">    vocab_size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">len</span>(processor.tokenizer),</span>
<span id="cb4-19">)</span>
<span id="cb4-20"></span>
<span id="cb4-21"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Geler le feature extractor CNN les 10 premières époques</span></span>
<span id="cb4-22">model.freeze_feature_encoder()</span>
<span id="cb4-23"></span>
<span id="cb4-24">training_args <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> TrainingArguments(</span>
<span id="cb4-25">    output_dir<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"./wav2vec2-sara-ngambaye"</span>,</span>
<span id="cb4-26">    group_by_length<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">True</span>,</span>
<span id="cb4-27">    per_device_train_batch_size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">16</span>,</span>
<span id="cb4-28">    gradient_accumulation_steps<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>,</span>
<span id="cb4-29">    num_train_epochs<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">30</span>,</span>
<span id="cb4-30">    fp16<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">True</span>,</span>
<span id="cb4-31">    learning_rate<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3e-4</span>,</span>
<span id="cb4-32">    warmup_steps<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">500</span>,</span>
<span id="cb4-33">    evaluation_strategy<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"steps"</span>,</span>
<span id="cb4-34">    eval_steps<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">400</span>,</span>
<span id="cb4-35">    save_steps<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">400</span>,</span>
<span id="cb4-36">    logging_steps<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>,</span>
<span id="cb4-37">    load_best_model_at_end<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">True</span>,</span>
<span id="cb4-38">    metric_for_best_model<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"wer"</span>,</span>
<span id="cb4-39">    greater_is_better<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">False</span>,</span>
<span id="cb4-40">)</span></code></pre></div>
</section>
</section>
<section id="résultats-préliminaires" class="level2">
<h2 class="anchored" data-anchor-id="résultats-préliminaires">Résultats préliminaires</h2>
<table class="table-striped caption-top table">
<caption>Résultats WER sur le jeu de test Kalam-na Sara Ngambaye</caption>
<thead>
<tr class="header">
<th>Modèle</th>
<th>Données</th>
<th>WER (%)</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>XLSR-53 zero-shot</td>
<td>—</td>
<td>74.3</td>
</tr>
<tr class="even">
<td>XLSR-53 fine-tuné (sans tons)</td>
<td>10h</td>
<td>41.2</td>
</tr>
<tr class="odd">
<td>XLSR-53 fine-tuné (avec diacritiques)</td>
<td>10h</td>
<td>34.7</td>
</tr>
<tr class="even">
<td>MMS fine-tuné (avec diacritiques)</td>
<td>10h</td>
<td><strong>29.1</strong></td>
</tr>
</tbody>
</table>
<div class="callout callout-style-default callout-tip callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Astuce
</div>
</div>
<div class="callout-body-container callout-body">
<p><strong>Observation clé</strong> : L’inclusion explicite des diacritiques tonals dans le vocabulaire et les transcriptions réduit le WER de ~7 points absolus. Ce gain est disproportionné par rapport au coût d’annotation supplémentaire.</p>
</div>
</div>
</section>
<section id="prochaines-étapes" class="level2">
<h2 class="anchored" data-anchor-id="prochaines-étapes">Prochaines étapes</h2>
<ol type="1">
<li><strong>Cross-lingual transfer</strong> entre dialectes Sara (Ngambaye → Kaba → Mbaye) via un modèle multi-dialecte partagé</li>
<li><strong>Intégration d’un module tonal</strong> dédié en aval du CTC pour post-correction des erreurs tonales</li>
<li><strong>Évaluation sur le Laal</strong> — en cours de constitution du corpus audio</li>
</ol>
<hr>
<p><em>Code disponible sur <a href="https://github.com/Chad-AI-Network/Chadian-Data">GitHub/Chad-AI-Network</a>. Corpus Kalam-na bientôt sur HuggingFace.</em></p>


</section>

 ]]></description>
  <category>Speech AI</category>
  <category>NLP</category>
  <category>Langues tchadiennes</category>
  <guid>https://abdelazizharane.github.io/blog/2025-05-22-wav2vec-langues-tonales.html</guid>
  <pubDate>Thu, 22 May 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Pourquoi nous refusons certains financements Big Tech pour les langues africaines</title>
  <dc:creator>Abdel-aziz Harane</dc:creator>
  <link>https://abdelazizharane.github.io/blog/2025-03-08-financements-big-tech-langues-africaines.html</link>
  <description><![CDATA[ 





<div class="h-article-header">
  <div class="h-article-meta">
    <span>8 mars 2025</span>
    <span class="separator">·</span>
    <span>10 min de lecture</span>
    <span class="separator">·</span>
    <span class="h-tag h-tag-ocre" style="font-size:.65rem;">Open Science</span>
    <span class="h-tag h-tag-ocre" style="font-size:.65rem;">Réflexions</span>
  </div>
</div>
<blockquote class="blockquote">
<p><em>“Le risque n’est pas que les grandes entreprises technologiques s’intéressent aux langues africaines. C’est qu’elles le fassent en extrayant de la valeur sans créer les conditions de leur propre remplacement par des acteurs locaux.”</em></p>
</blockquote>
<section id="le-contexte-une-ruée-vers-les-langues-africaines" class="level2">
<h2 class="anchored" data-anchor-id="le-contexte-une-ruée-vers-les-langues-africaines">Le contexte : une ruée vers les langues africaines</h2>
<p>Depuis 2022, il y a eu une prolifération remarquable d’initiatives Big Tech autour des langues africaines :</p>
<ul>
<li><strong>Microsoft LINGUA Africa</strong> (en partenariat avec la Fondation Gates et Masakhane)</li>
<li><strong>Meta MMS</strong> (Massively Multilingual Speech) — 1100+ langues dont plusieurs dizaines africaines</li>
<li><strong>Google MMS</strong> et le programme <strong>Woolaroo</strong></li>
<li><strong>OpenAI</strong> qui commence à s’y intéresser via des partenariats NGO</li>
</ul>
<p>Ces initiatives ne sont pas toutes identiques, et certaines ont produit des résultats genuinement utiles. Mais elles partagent une structure économique commune qui mérite examen critique.</p>
</section>
<section id="la-mécanique-de-lextraction" class="level2">
<h2 class="anchored" data-anchor-id="la-mécanique-de-lextraction">La mécanique de l’extraction</h2>
<p>Quand une grande entreprise technologique finance la collecte de données linguistiques en Afrique, voici ce qui se passe typiquement :</p>
<p><strong>Ce que la communauté donne :</strong> - Le temps des locuteurs (souvent bénévole ou sous-rémunéré) - L’accès à des connaissances culturelles irremplaçables - La légitimité scientifique des partenaires locaux - Les données elles-mêmes</p>
<p><strong>Ce que l’entreprise garde :</strong> - La propriété ou le contrôle effectif des modèles entraînés - Le droit de commercialiser les applications dérivées - La réputation académique associée aux publications - La capacité de déprécier l’accès aux modèles à tout moment</p>
<p>C’est une forme de <strong>néo-extractivisme numérique</strong> — différent dans ses mécanismes du colonialisme classique, mais similaire dans sa logique de captation de valeur.</p>
</section>
<section id="notre-ligne-directrice-4-questions-avant-tout-engagement" class="level2">
<h2 class="anchored" data-anchor-id="notre-ligne-directrice-4-questions-avant-tout-engagement">Notre ligne directrice : 4 questions avant tout engagement</h2>
<p>Au Chad AI Network, avant d’accepter tout financement externe (Big Tech ou autre), nous posons systématiquement ces quatre questions :</p>
<section id="qui-possède-les-données-finales" class="level3">
<h3 class="anchored" data-anchor-id="qui-possède-les-données-finales">1. Qui possède les données finales ?</h3>
<p>Les corpus linguistiques que nous collectons représentent le patrimoine culturel des communautés Laal, Sara, et des autres peuples tchadiens. La propriété de ces données ne peut pas être transférée à une entité externe.</p>
<p><strong>Notre règle</strong> : toutes les données restent sous licence CC-BY-SA ou CC-BY-NC-SA, déposées dans un dépôt pérenne (ELAR/SOAS, Zenodo) avec une copie souveraine contrôlée par la communauté.</p>
</section>
<section id="les-modèles-seront-ils-ouverts" class="level3">
<h3 class="anchored" data-anchor-id="les-modèles-seront-ils-ouverts">2. Les modèles seront-ils ouverts ?</h3>
<p>Un modèle ASR pour le Sara entraîné avec nos données, mais déployé derrière une API propriétaire, ne bénéficie pas aux communautés locales.</p>
<p><strong>Notre règle</strong> : tout modèle entraîné sur nos corpus doit être publié sous licence Apache 2.0 ou plus permissive sur HuggingFace, avec le code d’entraînement.</p>
</section>
<section id="quel-transfert-de-capacités-est-prévu" class="level3">
<h3 class="anchored" data-anchor-id="quel-transfert-de-capacités-est-prévu">3. Quel transfert de capacités est prévu ?</h3>
<p>Le financement doit inclure un volet explicite de <strong>renforcement des capacités locales</strong> : formation de chercheurs tchadiens, documentation accessible, infrastructure maintenable localement.</p>
</section>
<section id="y-a-t-il-une-clause-de-dépréciation" class="level3">
<h3 class="anchored" data-anchor-id="y-a-t-il-une-clause-de-dépréciation">4. Y a-t-il une clause de dépréciation ?</h3>
<p>Certains partenariats incluent des clauses permettant à l’entreprise de cesser l’accès aux outils développés conjointement. C’est inacceptable pour des outils destinés à la préservation linguistique sur 50+ ans.</p>
</section>
</section>
<section id="ce-que-nous-acceptons" class="level2">
<h2 class="anchored" data-anchor-id="ce-que-nous-acceptons">Ce que nous acceptons</h2>
<p>Notre position n’est pas “zéro partenariat externe”. C’est “partenariat à nos conditions”.</p>
<div style="display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin:1.5rem 0;">
  <div class="h-card" style="border-left:3px solid var(--h-green);">
    <div style="font-size:.75rem; font-weight:700; color:var(--h-green); margin-bottom:.5rem; text-transform:uppercase; letter-spacing:.06em;">✓ Acceptable</div>
    <ul style="font-size:.8rem; color:var(--h-muted); padding-left:1.2rem; margin:0; line-height:1.8;">
      <li>Compute credits (Azure, GCP) sans contrôle des données</li>
      <li>Partenariats avec fondations (Gates, Wellcome) si données ouvertes</li>
      <li>Collaborations académiques avec publications libres</li>
      <li>Masakhane (gouvernance communautaire réelle)</li>
      <li>Subventions gouvernementales (ANR, DFG, NSF)</li>
    </ul>
  </div>
  <div class="h-card" style="border-left:3px solid #B91C1C;">
    <div style="font-size:.75rem; font-weight:700; color:#B91C1C; margin-bottom:.5rem; text-transform:uppercase; letter-spacing:.06em;">✗ Refusé</div>
    <ul style="font-size:.8rem; color:var(--h-muted); padding-left:1.2rem; margin:0; line-height:1.8;">
      <li>Tout contrat cédant propriété des corpus</li>
      <li>Modèles exclusivement propriétaires</li>
      <li>Clauses de confidentialité sur les méthodes</li>
      <li>Partenariats sans volet formation locale</li>
      <li>Accords permettant la revente des données</li>
    </ul>
  </div>
</div>
</section>
<section id="la-voie-alternative-financement-diversifié" class="level2">
<h2 class="anchored" data-anchor-id="la-voie-alternative-financement-diversifié">La voie alternative : financement diversifié</h2>
<p>Notre stratégie de financement repose sur cinq piliers pour éviter la dépendance à un seul acteur :</p>
<ol type="1">
<li><strong>Fondations académiques</strong> (Masakhane Lingua Africa, ELDP, DoBeS)</li>
<li><strong>Compute grants</strong> (HuggingFace, Google TPU Research Cloud, Microsoft AFMF)</li>
<li><strong>Financements institutionnels tchadiens</strong> (CNRS-Tchad, Ministère de l’Enseignement Supérieur)</li>
<li><strong>Coopération internationale</strong> (IRD, DAAD, British Council)</li>
<li><strong>Communauté</strong> (Substack, GitHub Sponsors pour les outils open-source)</li>
</ol>
</section>
<section id="conclusion" class="level2">
<h2 class="anchored" data-anchor-id="conclusion">Conclusion</h2>
<p>La ruée vers les langues africaines par les grandes entreprises technologiques n’est pas une mauvaise nouvelle en soi. C’est une opportunité — à condition que les communautés africaines définissent les termes de l’engagement.</p>
<p>Notre travail au Chad AI Network est de construire suffisamment de capacités locales, de données ouvertes et d’infrastructure souveraine pour être en position de négociation — pas de dépendance — vis-à-vis de tout partenaire externe.</p>
<hr>
<p><em>Ces positions sont celles du Chad AI Network et engagent uniquement son fondateur. Des discussions informées et contradictoires sont les bienvenues via <a href="mailto:harane@chadainetwork.org">email</a>.</em></p>


</section>

 ]]></description>
  <category>Open Science</category>
  <category>Réflexions</category>
  <guid>https://abdelazizharane.github.io/blog/2025-03-08-financements-big-tech-langues-africaines.html</guid>
  <pubDate>Sat, 08 Mar 2025 00:00:00 GMT</pubDate>
</item>
</channel>
</rss>
