wiki
This commit is contained in:
File diff suppressed because it is too large
Load Diff
10000
fra_wikipedia_2021_10K-sentences.txt
Normal file
10000
fra_wikipedia_2021_10K-sentences.txt
Normal file
File diff suppressed because it is too large
Load Diff
@@ -84,7 +84,7 @@ body > main {
|
|||||||
<footer class="container">
|
<footer class="container">
|
||||||
<form id="formulaire" action="question.php" method="post" role="group">
|
<form id="formulaire" action="question.php" method="post" role="group">
|
||||||
<textarea id="question" name="question" placeholder="Ma question" required></textarea>
|
<textarea id="question" name="question" placeholder="Ma question" required></textarea>
|
||||||
<button id="bouton_envoyer" type="submit">Envoyer</button>
|
<button id="bouton_envoyer" type="submit">?</button>
|
||||||
</form>
|
</form>
|
||||||
</footer>
|
</footer>
|
||||||
<dialog id="boite_synthese_vocale">
|
<dialog id="boite_synthese_vocale">
|
||||||
@@ -190,6 +190,8 @@ body > main {
|
|||||||
if (bouton_envoyer.disabled == true) return;
|
if (bouton_envoyer.disabled == true) return;
|
||||||
|
|
||||||
bouton_envoyer.disabled = true;
|
bouton_envoyer.disabled = true;
|
||||||
|
let bouton_envoyer_innerHTML = bouton_envoyer.innerHTML;
|
||||||
|
bouton_envoyer.innerHTML = "";
|
||||||
bouton_envoyer.setAttribute("aria-busy", true)
|
bouton_envoyer.setAttribute("aria-busy", true)
|
||||||
const formulaireData = new FormData(formulaire);
|
const formulaireData = new FormData(formulaire);
|
||||||
const citation = document.createElement('article');
|
const citation = document.createElement('article');
|
||||||
@@ -206,7 +208,7 @@ body > main {
|
|||||||
method: formulaire.method,
|
method: formulaire.method,
|
||||||
body: formulaireData
|
body: formulaireData
|
||||||
});
|
});
|
||||||
paragraphe.setAttribute('aria-busy', 'false');
|
paragraphe.setAttribute('aria-busy', 'true');
|
||||||
const reponse = await requete.text();
|
const reponse = await requete.text();
|
||||||
paragraphe.setAttribute('aria-busy', 'false');
|
paragraphe.setAttribute('aria-busy', 'false');
|
||||||
|
|
||||||
@@ -233,6 +235,7 @@ body > main {
|
|||||||
conversation.scrollTop = conversation.scrollHeight;
|
conversation.scrollTop = conversation.scrollHeight;
|
||||||
bouton_envoyer.disabled = false;
|
bouton_envoyer.disabled = false;
|
||||||
bouton_envoyer.setAttribute("aria-busy", false);
|
bouton_envoyer.setAttribute("aria-busy", false);
|
||||||
|
bouton_envoyer.innerHTML = bouton_envoyer_innerHTML;
|
||||||
question.focus()
|
question.focus()
|
||||||
}, t);
|
}, t);
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ $suivants = [];
|
|||||||
$total = [];
|
$total = [];
|
||||||
|
|
||||||
// Lire le fichier fra_mixed_2009_100K-sentences.txt
|
// Lire le fichier fra_mixed_2009_100K-sentences.txt
|
||||||
$fichier = fopen("fra_mixed_2009_10K-sentences.txt", "r");
|
$fichier = fopen("fra_wikipedia_2021_10K-sentences.txt", "r");
|
||||||
if ($fichier) {
|
if ($fichier) {
|
||||||
while (($phrase = fgets($fichier)) !== false) {
|
while (($phrase = fgets($fichier)) !== false) {
|
||||||
$antepenultieme = "";
|
$antepenultieme = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user