Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 5d283a8d authored by Sylvain Coulange's avatar Sylvain Coulange
Browse files

modification du dictionnaire d'anglais (ajout Britfone + restructuration)

parent 5e42a96f
......@@ -21,11 +21,11 @@ pinyin2apiFile = "../phon2graph/data/pinyin2api.json" # MANDARIN
api2classFile = "../phon2graph/data/api2class.json" # MANDARIN
dicFile = "../wikiphon/dico_frwiktionary-20200301_v2.json"
dicFileEn = "../wikiphon/dico_enWikiCmu.json"
dicFileEn = "../wikiphon/dico_enWikiCmuBritfone.json"
dicFileZh = "../wikiphon/dico_zhCCDict_20201206_v1.json"
logFile = "../logs/dico_frwiktionary-20200301_v2.log"
logFileEn = "../logs/dico_enWiktionary-20200704_v1.log" # ENGLISH
logFileEn = "../logs/dico_enWikiCmuBritfone.log" # ENGLISH
logBugFile = "../logs/wikicolor-bug.log"
logBugFileEn = "../logs/wikicolorEn-bug.log" # ENGLISH
......@@ -225,10 +225,8 @@ def traitement(mot, lang, liaison): # LIAISON : avec le caractere liaison en arg
transList = word2trans[mot]
elif lang == "en":
transList = []
for loc,transs in word2trans[mot].items():
for trans in transs:
if len(trans)>0 and trans[0] == "/":
transList.append((trans.replace("/",""),loc))
for trans, locs in word2trans[mot].items():
transList.append((trans,locs))
result = []
############ partie d'appel de la fonction denasalisation
......
var loc2stand = {
"UK-Britfone":"UK",
"UK":"UK",
"RP":"UK",
"Scotland":"UK",
......
......@@ -461,19 +461,28 @@ function showAlignPop(tok) {
var tab = '<table class="tableAlign">';
for (i=0; i<dicoTok[tok].length; i++) {
var stand = "";
if (loc2stand[dicoTok[tok][i][1]] == "UK"){
stand = "static/im/flag-uk.png";
} else if (loc2stand[dicoTok[tok][i][1]] == "US"){
stand = "static/im/flag-us.png";
} else if (loc2stand[dicoTok[tok][i][1]] == "AU"){
stand = "static/im/flag-au.png";
} else if (loc2stand[dicoTok[tok][i][1]] == "CA"){
stand = "static/im/flag-ca.png";
} else if (loc2stand[dicoTok[tok][i][1]] == "NZ"){
stand = "static/im/flag-nz.png";
}
tab = tab + "<tr onmousedown='selectAlign(\""+ tok + "\"," + i +")' onmouseup='supprAlignPopDiv();' title='"+dicoTok[tok][i][1]+": ["+dicoTok[tok][i][2]+"] "+dicoTok[tok][i][3]+"'><td><img style='width:35px' src='"+ stand +"'/></td><td>"+dicoTok[tok][i][0]+"</td></tr>";
var stand = "";
var locOK = []; // in order not to put the same flag twice
for (loc in dicoTok[tok][i][1]){
var locMeta = loc2stand[dicoTok[tok][i][1][loc]];
if (locMeta == "UK" && !locOK.includes(locMeta)){
stand += "<img style='width:35px' src='static/im/flag-uk.png'/>";
locOK.push(locMeta);
} else if (locMeta == "US" && !locOK.includes(locMeta)){
stand += "<img style='width:35px' src='static/im/flag-us.png'/>";
locOK.push(locMeta);
} else if (locMeta == "AU" && !locOK.includes(locMeta)){
stand += "<img style='width:35px' src='static/im/flag-au.png'/>";
locOK.push(locMeta);
} else if (locMeta == "CA" && !locOK.includes(locMeta)){
stand += "<img style='width:35px' src='static/im/flag-ca.png'/>";
locOK.push(locMeta);
} else if (locMeta == "NZ" && !locOK.includes(locMeta)){
stand += "<img style='width:35px' src='static/im/flag-nz.png'/>";
locOK.push(locMeta);
}
}
tab = tab + "<tr onmousedown='selectAlign(\""+ tok + "\"," + i +")' onmouseup='supprAlignPopDiv();' title='"+dicoTok[tok][i][1]+": ["+dicoTok[tok][i][2]+"] "+dicoTok[tok][i][3]+"'><td>"+dicoTok[tok][i][0]+"</td><td>"+ stand +"</td></tr>";
}
tab = tab + "</table>";
alignPopDiv.innerHTML = tab;
......
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