Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GrammaColor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pédagogies Multimodales
GrammaColor
Commits
ff1f07d4
Commit
ff1f07d4
authored
Aug 27, 2020
by
Sylvain Coulange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add mandarin prototype
parent
fe2ad659
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
3 deletions
+17
-3
grammacolorapp/__pycache__/views.cpython-36.pyc
grammacolorapp/__pycache__/views.cpython-36.pyc
+0
-0
grammacolorapp/views.py
grammacolorapp/views.py
+3
-2
static/js/coloriser.js
static/js/coloriser.js
+1
-1
static/styles/styles.css
static/styles/styles.css
+7
-0
templates/coloriser.html
templates/coloriser.html
+6
-0
No files found.
grammacolorapp/__pycache__/views.cpython-36.pyc
View file @
ff1f07d4
No preview for this file type
grammacolorapp/views.py
View file @
ff1f07d4
...
...
@@ -3,6 +3,7 @@ from django.http import JsonResponse
import
re
,
json
,
spacy
nlpFr
=
spacy
.
load
(
'fr_core_news_md'
)
nlpZh
=
spacy
.
load
(
'zh_core_web_md'
)
def
home
(
request
):
return
render
(
request
,
'coloriser.html'
)
...
...
@@ -14,8 +15,8 @@ def runSpacy(request):
if
lang
==
"fr"
:
nlpText
=
nlpFr
(
text
)
el
se
:
nlpText
=
"WHAT LANGUAGE IS THAT?"
el
if
lang
==
"zh"
:
nlpText
=
nlpZh
(
text
)
outText
=
[]
...
...
static/js/coloriser.js
View file @
ff1f07d4
...
...
@@ -11,7 +11,7 @@ async function runSpacy() {
//document.getElementById('loader').style.display = "block";
var
inText
=
document
.
getElementById
(
'
inText
'
).
value
;
var
lang
=
'
fr
'
//
document.getElementById('choixLang').value;
var
lang
=
document
.
getElementById
(
'
choixLang
'
).
value
;
// ON EMBALLE TOUT ÇA
var
colis
=
{
...
...
static/styles/styles.css
View file @
ff1f07d4
...
...
@@ -6,6 +6,13 @@ body {
text-align
:
center
;
}
.choixLang
{
position
:
absolute
;
top
:
15px
;
right
:
15px
;
background-color
:
white
;
}
/* .inText {
color: white;
background-color: black;
...
...
templates/coloriser.html
View file @
ff1f07d4
...
...
@@ -10,6 +10,12 @@
<script
src=
"https://code.jquery.com/jquery-3.1.0.min.js"
></script>
</head>
<body>
<div
class=
"choixLang"
>
<select
id=
"choixLang"
onchange=
"selectLang(this.value)"
>
<option
value=
"fr"
>
Français
</option>
<option
value=
"zh"
>
中文
</option>
</select>
</div>
<h1>
GrammaColor (proto)
</h1>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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