Commit f4144bc6 authored by Sylvain Coulange's avatar Sylvain Coulange

ajout bicolore pour pronoms adverbiaux

parent b0547d2d
......@@ -52,6 +52,7 @@ async function runSpacy() {
else if (data.outText[i].text == " ") result = result + "<span style='"+ stylesCommuns +"'> </span>";
// bicolores → soulignage
// déterminants prépositionnels (du des...)
else if (data.outText[i].tag.slice(0,7)== "ADP_DET") {
result = result
+ '<span style="color:'+ pos["DET"].color +';'
......@@ -61,6 +62,16 @@ async function runSpacy() {
+'">'+ data.outText[i].text + '</span>';
}
// pronoms adverbiaux (en et y)
else if (data.outText[i].text.lower() == "en" || data.outText[i].text.lower() == "y" && data.outText[i].pos == "PRON") {
result = result
+ '<span style="color:'+ pos["PRON"].color +';'
+ stylesCommuns
+ stylesUnderline + 'text-decoration-color:' + pos["ADV"].color
+'" title="'+ data.outText[i].tag
+'">'+ data.outText[i].text + '</span>';
}
// tout le reste
else result = result
+ '<span style="color:'+ col +';'
......
......@@ -8,7 +8,7 @@ pos = {
"DET": { "color":"#f3eb20", "nom":"", "forme":"" },
"INTJ": { "color":"#8a9092", "nom":"", "forme":"" },
"NOUN": { "color":"#980086", "nom":"", "forme":"" },
"NUM": { "color":"", "nom":"", "forme":"" },
"NUM": { "color":"#f3eb20", "nom":"", "forme":"" },
"PART": { "color":"", "nom":"", "forme":"" },
"PRON": { "color":"#a56026", "nom":"", "forme":"" },
"PROPN": { "color":"#a56026", "nom":"", "forme":"" },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment