Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jorge Garcia flores
ChêneTAL
Commits
6f3d6284
Commit
6f3d6284
authored
Aug 12, 2020
by
Quentin David
Browse files
Lot of new things
parent
aab7e9fe
Changes
14
Hide whitespace changes
Inline
Side-by-side
src/components/DefineCorpus/AddCorpus.vue
View file @
6f3d6284
<
template
>
<v-tabs
grow
v-model=
"tab"
>
<v-tab
v-for=
"item in tab_items"
:key=
"item.tab"
<v-container
flex
fill-height
>
<v-tabs
grow
v-model=
"tab"
>
{{
item
.
tab
}}
</v-tab>
<v-tab
v-for=
"item in tab_items"
:key=
"item.tab"
>
{{
item
.
tab
}}
</v-tab>
<v-tabs-items
v-model=
"tab"
class=
"my-4"
vertical
>
<v-tab-item>
<v-card
outlined
height=
100px
>
<v-card-text
class=
"justify-center text-center"
>
Sélection d'un fichier local
</v-card-text>
</v-card>
</v-tab-item>
<v-tab-item>
<InputText
/>
</v-tab-item>
<v-tab-item>
<v-card
outlined
height=
100px
>
<v-card-text
class=
"justify-center text-center"
>
Sélection de corpus de profil
</v-card-text>
</v-card>
</v-tab-item>
<v-tab-item>
<v-card
outlined
height=
100px
>
<v-card-text
class=
"justify-center text-center"
>
Sélection de corpus partagé
</v-card-text>
</v-card>
</v-tab-item>
</v-tabs-items>
</v-tabs>
<v-tabs-items
v-model=
"tab"
class=
"my-4"
vertical
>
<v-tab-item>
<v-card
outlined
height=
8em
>
<v-card-text
class=
"justify-center text-center"
>
<v-file-input
label=
"Choisissez un ou plusieurs fichiers"
multiple
hint=
"Formats acceptés: PDF, TXT, ...."
persistent-hint
small-chips
>
</v-file-input>
</v-card-text>
</v-card>
</v-tab-item>
<v-tab-item>
<InputText
/>
</v-tab-item>
<v-tab-item>
<v-card
outlined
height=
8em
>
<v-card-text>
<v-select
:items=
"test_profile_corpus"
label=
"Choisissez le corpus que vous voulez traiter"
hint=
"Vous pouvez définir vos corpus dans votre profil"
persistent-hint
outlined
>
</v-select>
</v-card-text>
</v-card>
</v-tab-item>
<v-tab-item>
<v-card
outlined
height=
8em
>
<v-card-text
class=
"justify-center text-center"
>
<v-select
:items=
"test_common_corpus"
label=
"Choisissez le corpus que vous voulez traiter"
outlined
>
</v-select>
</v-card-text>
</v-card>
</v-tab-item>
</v-tabs-items>
</v-tabs>
</v-container>
</
template
>
<
script
>
import
InputText
from
'
@/components/DefineCorpus/InputText
'
;
...
...
@@ -51,6 +74,8 @@
],
selected
:
null
,
test
:
{
"
fr
"
:
false
,
"
en
"
:
false
},
test_profile_corpus
:
[
"
My_Corpus1
"
,
"
À la recherche du temps perdu
"
,
"
Libé_1980_2010
"
],
test_common_corpus
:
[
"
CommonCorpus1
"
,
"
LIPN_Articles
"
,
"
Sequoia
"
]
}),
components
:
{
InputText
,
...
...
src/components/DefineCorpus/CorpusOptions.vue
View file @
6f3d6284
...
...
@@ -8,37 +8,77 @@
</v-card-title>
<v-form
class=
"px-12"
>
<v-select
class=
"my-5"
v-model=
"lang_select"
:items=
"languages"
label=
"Langue du corpus"
required
></v-select>
<v-row>
<v-col
cols=
"6"
>
<v-select
class=
"my-5"
v-model=
"lang_select"
:items=
"languages"
label=
"Langue du corpus"
required
outlined
max-width=
80%
></v-select>
</v-col>
<v-divider/>
<v-card
outlined
class=
"px-10 py-4 mb-5"
>
<v-card-title
class=
"subtitle-2"
>
Métadonnées (facultatif)
</v-card-title>
<v-text-field
class=
"mt-0"
v-model=
"author"
label=
"Auteur"
></v-text-field>
<v-col
cols=
"6"
>
<v-card
outlined
class=
"px-5 py-4 mb-5"
>
<v-card-title
class=
"subtitle-2"
>
Métadonnées (facultatif)
</v-card-title>
<v-card-text>
<v-text-field
class=
"mt-0"
v-model=
"author"
label=
"Auteur"
></v-text-field>
<v-text-field
class=
"pt-0 mt-0"
v-model=
"date"
label=
"Date"
></v-text-field>
<v-text-field
class=
"pt-0 mt-0"
v-model=
"date"
label=
"Date"
></v-text-field>
<v-text-field
class=
"mt-0 pt-0"
v-model=
"type"
label=
"Type de document"
></v-text-field>
</v-card>
</v-form>
<v-text-field
class=
"mt-0 pt-0"
v-model=
"type"
label=
"Type de document"
></v-text-field>
<v-row
v-for=
"metadata in additional_metadata"
:key=
"metadata.id"
>
<v-col>
<v-text-field
class=
"mt-0 pt-0"
label=
"Nom de la métadonnée"
v-model=
"metadata.name"
></v-text-field>
</v-col>
<v-col>
<v-text-field
class=
"mt-0 pt-0"
label=
"Valeur de la métadonnée"
v-model=
"metadata.value"
></v-text-field>
</v-col>
<v-col
cols=
"1"
>
<v-btn
icon
@
click=
"delete_metadata(metadata.id)"
>
<v-icon>
fa-times
</v-icon>
</v-btn>
</v-col>
</v-row>
</v-card-text>
<v-card-actions>
<v-btn
elevation=
"6"
@
click=
"add_metadata()"
>
<v-icon>
mdi-plus
</v-icon>
Ajouter une métadonnée
</v-btn>
</v-card-actions>
</v-card>
</v-col>
</v-row>
</v-form>
</v-card>
</
template
>
<
script
>
...
...
@@ -50,6 +90,26 @@
author
:
''
,
date
:
''
,
type
:
''
,
additional_metadata_id
:
0
,
additional_metadata
:
[],
}),
methods
:
{
add_metadata
:
function
()
{
this
.
additional_metadata_id
+=
1
;
this
.
additional_metadata
.
push
({
id
:
this
.
additional_metadata_id
,
name
:
""
,
value
:
""
})
},
delete_metadata
:
function
(
metadata_id
)
{
var
index
=
null
;
for
(
var
i
=
0
;
i
<
this
.
additional_metadata
.
length
;
i
++
)
{
if
(
this
.
additional_metadata
[
i
].
id
==
metadata_id
)
{
index
=
i
;
}
}
if
(
index
!==
null
)
{
this
.
additional_metadata
.
splice
(
index
,
1
);
}
}
},
}
</
script
>
\ No newline at end of file
src/components/Corpus.vue
→
src/components/
DefineCorpus/Define
Corpus.vue
View file @
6f3d6284
<
template
>
<v-container>
<v-container
class=
"my-5"
>
<v-card
outlined
class=
"my-5 px-6"
>
<v-card-title
class=
"justify-center py-6"
>
<h1
class=
"display-3"
>
Choix du corpus
</h1>
...
...
src/components/DefineCorpus/InputText.vue
View file @
6f3d6284
<
template
>
<v-textarea
hide-details
outlined
height=
8em
auto-grow
clearable
label=
"Entrez votre texte ici"
...
...
src/components/DefineTreatment/DefinePipeline.vue
View file @
6f3d6284
<
template
>
<v-container>
<v-card
outlined
class=
"my-5"
>
<v-card-text>
<v-row>
<v-col
v-for=
"module in modules"
:key=
"module.name"
>
<!-- align="centger" for col
<v-btn
@
click=
"checkModule(module)"
>
{{
module
.
name
}}
</v-btn>
-->
<v-card
outlined
elevation=
"2"
>
<v-card-title>
{{
module
.
name
}}
</v-card-title>
<v-card-subtitle>
{{
module
.
description
}}
</v-card-subtitle>
<!-- CANDY ! -->
<v-card-actions>
<v-btn
text
>
Add
</v-btn>
<v-btn
@
click=
"checkModule(module)"
text
>
Parameters
</v-btn>
<v-spacer/>
<v-btn
icon
@
click=
"show_desc = !show_desc"
>
<v-icon>
fa-question-circle
</v-icon>
</v-btn>
</v-card-actions>
<v-expand-transition>
<div
v-show=
"show_desc"
>
<v-divider/>
<v-card-text>
{{
module
.
description
}}
</v-card-text>
</div>
</v-expand-transition>
</v-card>
</v-col>
</v-row>
<v-slide-y-transition>
<v-card
v-if=
"chosen_module"
v-show=
"chosen_module"
elevation=
"3"
color=
"grey lighten-3"
class=
"mt-2"
<v-card
outlined
>
<v-card-text>
<v-row>
<v-col
v-for=
"module in modules"
:key=
"module.name"
>
<v-card
outlined
elevation=
"2"
>
<v-card-title>
Paramètre pour
{{
chosen_
module
.
name
}}
{{
module
.
name
}}
</v-card-title>
<v-card-text>
Paramètre:
{{
chosen_module
.
parameters
}}
</v-card-text>
<v-card-subtitle>
{{
module
.
description
}}
</v-card-subtitle>
<!-- CANDY ! -->
<v-card-actions>
<v-btn>
Ajouter à la chaîne
</v-btn>
<v-btn
text
@
click=
"checkModule(module)"
>
Ajouter à la chaîne
</v-btn>
<v-spacer/>
<v-btn
icon
@
click=
"show_desc[module.name] = !show_desc[module.name]"
>
<v-icon>
fa-question-circle
</v-icon>
</v-btn>
</v-card-actions>
<v-expand-transition>
<div
v-show=
"show_desc[module.name]"
>
<v-divider/>
<v-card-text>
{{
module
.
description
}}
</v-card-text>
</div>
</v-expand-transition>
</v-card>
</v-slide-y-transition>
<!--
<div
id=
"round-box"
class=
"mt-5 pa-5 grey lighten-2"
v-if=
"chosen_module"
transition=
"slide-y-transition"
</v-col>
</v-row>
<v-slide-y-transition>
<v-card
v-if=
"chosen_module"
v-show=
"chosen_module"
elevation=
"3"
color=
"grey lighten-3"
class=
"mt-2 pb-2"
>
<
h3
class=
"display-1 mb-10"
>
Paramètre pour
{{
chosen_module
.
name
}}
</
h3
>
<
p
>
Paramètre:
{{
chosen_module
.
parameters
}}
</
p
>
<v-
btn
class=
"mt-5"
>
Ajouter à la chaîne
</v-btn>
</div>
--
>
</v-
card-text>
</v-card>
</v-c
ontainer
>
<
v-card-title
>
Paramètre pour
{{
chosen_module
.
name
}}
</
v-card-title
>
<
v-card-text
>
<ModuleParametersForm
:parameters=
"
chosen_module.parameters
"
/>
</
v-card-text
>
<v-
card-actions
class=
"ml-2"
>
<v-btn>
<v-icon
left
>
fa-plus-circle
</v-icon
>
Ajouter à la chaîne
</v-btn>
</v-card-actions
>
</v-card>
</v-
slide-y-transition>
</v-card
-text
>
</v-c
ard
>
</
template
>
<
script
>
import
ModuleParametersForm
from
'
@/components/DefineTreatment/ModuleParametersForm
'
export
default
{
data
:()
=>
({
modules
:
...
...
@@ -110,9 +83,45 @@ export default {
{
name
:
"
SDMC
"
,
description
:
"
Outil de fouille de motifs
"
,
parameters
:
{
"
Parameter 2
"
:
"
This is parameter 1
"
,
}
[
{
label
:
"
Type de motifs calculés
"
,
name
:
"
motif_type
"
,
type
:
"
List-Mono
"
,
items
:
[
"
Forme du mot seul
"
,
"
Lemme du mot seul
"
,
"
Catégorie syntaxique du mot seul
"
,
"
Catégorie syntaxique et lemme du mot
"
],
default_value
:
"
Lemme du mot seul
"
},
{
label
:
"
Représentation condensée des motifs
"
,
name
:
"
motif_representation
"
,
type
:
"
List-Mono
"
,
items
:
[
"
Fermés (tous les motifs)
"
,
"
Fermés (sans sous-motifs de même fréquence)
"
,
"
Maximaux (en ôtant les sous-motifs)
"
],
default_value
:
"
Fermés (tous les motifs)
"
},
{
label
:
"
Gap
"
,
name
:
"
gap
"
,
description
:
"
Nombre d'items que l'extracteur peut ignorer entre deux items d'un motif extrait
"
,
type
:
"
Int-2
"
,
items
:
[
"
Minimal
"
,
"
Maximal
"
],
default_value
:
[
"
0
"
,
"
10
"
],
},
{
label
:
"
Support minimal absolu
"
,
name
:
"
minimal_absolute_support
"
,
description
:
"
Nombre d'occurrence minimal d'un motif dans le corpus pour être extrait
"
,
type
:
"
Int
"
,
default
:
[
"
100
"
]
},
{
label
:
"
Appartenance d'une ou plusieurs catégories
"
,
name
:
"
categories
"
,
type
:
"
List-Poly
"
,
items
:
[
"
Nom
"
,
"
Verbe
"
,
"
Adjectif
"
,
"
Adverbe
"
],
}
],
},
{
name
:
"
Néoveille
"
,
description
:
"
Détecteur de néologismes
"
,
...
...
@@ -130,8 +139,12 @@ export default {
}
],
chosen_module
:
undefined
,
show_desc
:
false
,
show_desc
:
{
"
Morfetik
"
:
false
,
"
SDMC
"
:
false
,
"
Néoveille
"
:
false
,
"
Modulix
"
:
false
,
},
}),
methods
:{
checkModule
:
function
(
module
)
{
...
...
@@ -142,6 +155,9 @@ export default {
this
.
chosen_module
=
module
;
}
}
},
components
:
{
ModuleParametersForm
,
}
}
</
script
>
...
...
src/components/Treatment.vue
→
src/components/
DefineTreatment/Define
Treatment.vue
View file @
6f3d6284
...
...
@@ -4,7 +4,8 @@
<v-card-title
class=
"justify-center py-6"
>
<h1
class=
"display-3"
>
Choix des modules
</h1>
</v-card-title>
<DefinePipeline/>
<DefinePipeline
class=
"my-5"
/>
<ModuleChain
class=
"my-5"
/>
</v-card>
<v-btn
block
color=
"success"
>
Lancer le traitement
</v-btn>
</v-container>
...
...
@@ -12,10 +13,12 @@
<
script
>
import
DefinePipeline
from
'
@/components/DefineTreatment/DefinePipeline
'
import
ModuleChain
from
'
@/components/DefineTreatment/ModuleChain
'
export
default
{
name
:
'
Treatment
'
,
components
:
{
DefinePipeline
,
ModuleChain
,
},
}
</
script
>
\ No newline at end of file
src/components/DefineTreatment/ModuleChain.vue
0 → 100644
View file @
6f3d6284
<
template
>
<v-card
outlined
>
<v-timeline
class=
"ma-5"
dense
>
<v-timeline-item
icon=
"mdi-arrow-down"
>
</v-timeline-item>
<v-timeline-item
icon=
"fa-cubes"
fill-dot
>
<v-card
outlined
elevation=
"6"
>
<v-row
align=
"center"
>
<v-col>
<v-card-title>
Morfetik
</v-card-title>
</v-col>
<v-col
class=
"text-right mr-3"
>
<v-btn
icon
>
<v-icon>
fa-times-circle
</v-icon>
</v-btn>
</v-col>
</v-row>
<v-card-text>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Doloribus vel voluptatibus dolore explicabo delectus rerum possimus nemo rem.
Beatae, dolorum. Aliquid quas doloremque est, dolorem earum voluptatem dignissimos omnis velit!
</v-card-text>
</v-card>
</v-timeline-item>
<v-timeline-item
icon=
"mdi-arrow-down"
>
</v-timeline-item>
<v-timeline-item
icon=
"fa-cubes"
fill-dot
>
<v-card
outlined
elevation=
"6"
>
<v-row
align=
"center"
>
<v-col>
<v-card-title>
Morfetik
</v-card-title>
</v-col>
<v-col
class=
"text-right mr-3"
>
<v-btn
icon
>
<v-icon>
fa-times-circle
</v-icon>
</v-btn>
</v-col>
</v-row>
<v-card-text>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Doloribus vel voluptatibus dolore explicabo delectus rerum possimus nemo rem.
Beatae, dolorum. Aliquid quas doloremque est, dolorem earum voluptatem dignissimos omnis velit!
</v-card-text>
</v-card>
</v-timeline-item>
</v-timeline>
</v-card>
</
template
>
\ No newline at end of file
src/components/DefineTreatment/ModuleParametersForm.vue
0 → 100644
View file @
6f3d6284
<
template
>
<v-form>
<div
v-for=
"param in parameters"
:key=
"param.name"
max-width=
"50px"
>
<div
v-if=
"param.type=='List-Mono'"
>
<h3
class=
"mb-2"
>
{{
param
.
label
}}
<v-btn
icon
v-if=
"param.description !==undefined"
@
click=
"showHideDescription(param.name)"
>
<v-icon>
mdi-help-circle
</v-icon>
</v-btn>
</h3>
<v-expand-transition>
<div
v-show=
"show_desc[param.name]"
>
<p>
{{
param
.
description
}}
</p>
</div>
</v-expand-transition>
<v-select
label=
"Entrez un élément parmi la liste"
:items=
"param.items"
outlined
>
</v-select>
</div>
<div
v-if=
"param.type=='List-Poly'"
>
<h3
class=
"mb-2"
>
{{
param
.
label
}}
<v-btn
icon
v-if=
"param.description !==undefined"
@
click=
"showHideDescription(param.name)"
>
<v-icon>
mdi-help-circle
</v-icon>
</v-btn>
</h3>
<v-expand-transition>
<div
v-show=
"show_desc[param.name]"
>
<p>
{{
param
.
description
}}
</p>
</div>
</v-expand-transition>
<v-select
label=
"Entrez un ou plusieurs éléments parmi la liste"