Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pédagogies Multimodales
wikicolor
Commits
12faee28
Commit
12faee28
authored
Aug 07, 2022
by
Sylvain Coulange
🌼
Browse files
màj addStats
parent
fe1e633e
Changes
2
Hide whitespace changes
Inline
Side-by-side
colorapp/textPhonographer.py
View file @
12faee28
...
...
@@ -83,7 +83,7 @@ def getLenDic(lang):
##### MISE EN MÉMOIRE DES DICTIONNAIRES (seulement les transcriptions+regions)
def
makeWord2trans
(
alemDic
):
query
=
alemDic
.
find
().
limit
(
10000
)
query
=
alemDic
.
find
()
#
.limit(10000)
word2trans
=
{}
cpt
=
0
for
q
in
query
:
...
...
@@ -110,13 +110,13 @@ print("Mise en mémoire de dicoFr...")
word2transFr
=
makeWord2trans
(
dicoFr
)
print
(
"Nombre d'entrées dans AlemDic-dicoFr :"
,
getLenDic
(
'fr'
))
#
print("Mise en mémoire de dicoEn...")
#
word2transEn = makeWord2trans(dicoEn)
#
print("Nombre d'entrées dans AlemDic-dicoEn :", getLenDic(('en')))
print
(
"Mise en mémoire de dicoEn..."
)
word2transEn
=
makeWord2trans
(
dicoEn
)
print
(
"Nombre d'entrées dans AlemDic-dicoEn :"
,
getLenDic
((
'en'
)))
#
print("Mise en mémoire de dicoZh...")
#
word2transZh = makeWord2trans(dicoZh)
#
print("Nombre d'entrées dans AlemDic-dicoZh :", getLenDic('zh'))
print
(
"Mise en mémoire de dicoZh..."
)
word2transZh
=
makeWord2trans
(
dicoZh
)
print
(
"Nombre d'entrées dans AlemDic-dicoZh :"
,
getLenDic
(
'zh'
))
########################################
######### LECTURE DES FICHIERS #########
...
...
colorapp/views.py
View file @
12faee28
...
...
@@ -9,12 +9,12 @@ import json, spacy, subprocess, re
print
(
'Chargement des modèles de langue...'
)
print
(
'fr_core_news_md...'
)
nlpFr
=
spacy
.
load
(
'fr_core_news_md'
)
#
print('en_core_web_sm...')
#
nlpEn = spacy.load("en_core_web_sm")
#
print('zh_core_web_sm...')
#
nlpZh = spacy.load("zh_core_web_sm")
#
print('OK.')
#
logFile = "../logs/dico_frwiktionary-20200301_v2.log"
print
(
'en_core_web_sm...'
)
nlpEn
=
spacy
.
load
(
"en_core_web_sm"
)
print
(
'zh_core_web_sm...'
)
nlpZh
=
spacy
.
load
(
"zh_core_web_sm"
)
print
(
'OK.'
)
logFile
=
"../logs/dico_frwiktionary-20200301_v2.log"
## RÉCUPÉRATION DE LA LISTE DES EXCEPTIONS POUR L'ANGLAIS
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment