Commit 6f3d6284 authored by Quentin David's avatar Quentin David
Browse files

Lot of new things

parent aab7e9fe
<template> <template>
<v-container flex fill-height>
<v-tabs grow <v-tabs grow
v-model="tab" v-model="tab"
> >
...@@ -11,31 +12,53 @@ ...@@ -11,31 +12,53 @@
<v-tabs-items v-model="tab" class="my-4" vertical> <v-tabs-items v-model="tab" class="my-4" vertical>
<v-tab-item> <v-tab-item>
<v-card outlined height=100px> <v-card outlined height=8em>
<v-card-text <v-card-text
class="justify-center text-center" class="justify-center text-center"
> Sélection d'un fichier local </v-card-text> >
<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-card>
</v-tab-item> </v-tab-item>
<v-tab-item> <v-tab-item>
<InputText /> <InputText />
</v-tab-item> </v-tab-item>
<v-tab-item> <v-tab-item>
<v-card outlined height=100px> <v-card outlined height=8em>
<v-card-text <v-card-text>
class="justify-center text-center" <v-select :items="test_profile_corpus"
> Sélection de corpus de profil </v-card-text> 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-card>
</v-tab-item> </v-tab-item>
<v-tab-item> <v-tab-item>
<v-card outlined height=100px> <v-card outlined height=8em>
<v-card-text <v-card-text
class="justify-center text-center" class="justify-center text-center"
> Sélection de corpus partagé </v-card-text> >
<v-select :items="test_common_corpus"
label="Choisissez le corpus que vous voulez traiter"
outlined
>
</v-select>
</v-card-text>
</v-card> </v-card>
</v-tab-item> </v-tab-item>
</v-tabs-items> </v-tabs-items>
</v-tabs> </v-tabs>
</v-container>
</template> </template>
<script> <script>
import InputText from '@/components/DefineCorpus/InputText'; import InputText from '@/components/DefineCorpus/InputText';
...@@ -51,6 +74,8 @@ ...@@ -51,6 +74,8 @@
], ],
selected: null, selected: null,
test: { "fr": false, "en": false}, 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: { components: {
InputText, InputText,
......
...@@ -8,17 +8,24 @@ ...@@ -8,17 +8,24 @@
</v-card-title> </v-card-title>
<v-form class="px-12"> <v-form class="px-12">
<v-row>
<v-col cols="6">
<v-select <v-select
class="my-5" class="my-5"
v-model="lang_select" v-model="lang_select"
:items="languages" :items="languages"
label="Langue du corpus" label="Langue du corpus"
required required
outlined
max-width=80%
></v-select> ></v-select>
</v-col>
<v-divider/> <v-divider/>
<v-card outlined class="px-10 py-4 mb-5"> <v-col cols="6">
<v-card-title class="subtitle-2">Métadonnées (facultatif)</v-card-title> <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 <v-text-field
class="mt-0" class="mt-0"
v-model="author" v-model="author"
...@@ -36,9 +43,42 @@ ...@@ -36,9 +43,42 @@
v-model="type" v-model="type"
label="Type de document" label="Type de document"
></v-text-field> ></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-card>
</v-col>
</v-row>
</v-form> </v-form>
</v-card> </v-card>
</template> </template>
<script> <script>
...@@ -50,6 +90,26 @@ ...@@ -50,6 +90,26 @@
author: '', author: '',
date: '', date: '',
type: '', 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> </script>
\ No newline at end of file
<template> <template>
<v-container> <v-container class="my-5">
<v-card outlined class="my-5 px-6"> <v-card outlined class="my-5 px-6">
<v-card-title class="justify-center py-6"> <v-card-title class="justify-center py-6">
<h1 class="display-3">Choix du corpus</h1> <h1 class="display-3">Choix du corpus</h1>
......
<template> <template>
<v-textarea <v-textarea
hide-details
outlined outlined
height=8em
auto-grow auto-grow
clearable clearable
label="Entrez votre texte ici" label="Entrez votre texte ici"
......
<template> <template>
<v-container> <v-card outlined>
<v-card outlined class="my-5">
<v-card-text> <v-card-text>
<v-row> <v-row>
<v-col <v-col
v-for="module in modules" v-for="module in modules"
:key="module.name"> :key="module.name">
<!-- align="centger" for col <v-btn
@click="checkModule(module)"
>
{{ module.name }}
</v-btn> -->
<v-card <v-card
outlined outlined
elevation="2" elevation="2"
...@@ -25,23 +19,19 @@ ...@@ -25,23 +19,19 @@
<!-- CANDY ! --> <!-- CANDY ! -->
<v-card-actions> <v-card-actions>
<v-btn text <v-btn text
>
Add
</v-btn>
<v-btn
@click="checkModule(module)" @click="checkModule(module)"
text
> >
Parameters</v-btn> Ajouter à la chaîne
</v-btn>
<v-spacer/> <v-spacer/>
<v-btn icon @click="show_desc = !show_desc"> <v-btn icon @click="show_desc[module.name] = !show_desc[module.name]">
<v-icon> <v-icon>
fa-question-circle fa-question-circle
</v-icon> </v-icon>
</v-btn> </v-btn>
</v-card-actions> </v-card-actions>
<v-expand-transition> <v-expand-transition>
<div v-show="show_desc"> <div v-show="show_desc[module.name]">
<v-divider/> <v-divider/>
<v-card-text> <v-card-text>
{{ module.description }} {{ module.description }}
...@@ -57,44 +47,27 @@ ...@@ -57,44 +47,27 @@
v-show="chosen_module" v-show="chosen_module"
elevation="3" elevation="3"
color="grey lighten-3" color="grey lighten-3"
class="mt-2" class="mt-2 pb-2"
> >
<v-card-title> <v-card-title>
Paramètre pour {{ chosen_module.name }} Paramètre pour {{ chosen_module.name }}
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
Paramètre: {{ chosen_module.parameters }} <ModuleParametersForm :parameters="chosen_module.parameters"/>
</v-card-text> </v-card-text>
<v-card-actions> <v-card-actions class="ml-2">
<v-btn>Ajouter à la chaîne</v-btn> <v-btn>
<v-icon left>fa-plus-circle</v-icon>
Ajouter à la chaîne
</v-btn>
</v-card-actions> </v-card-actions>
</v-card> </v-card>
</v-slide-y-transition> </v-slide-y-transition>
<!-- <div
id="round-box"
class="mt-5 pa-5 grey lighten-2"
v-if="chosen_module"
transition="slide-y-transition"
>
<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-text>
</v-card> </v-card>
</v-container>
</template> </template>
<script> <script>
import ModuleParametersForm from '@/components/DefineTreatment/ModuleParametersForm'
export default { export default {
data:() => ({ data:() => ({
modules: modules:
...@@ -110,9 +83,45 @@ export default { ...@@ -110,9 +83,45 @@ export default {
{ name: "SDMC", { name: "SDMC",
description: "Outil de fouille de motifs", description: "Outil de fouille de motifs",
parameters: parameters:
[
{
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)"
},
{ {
"Parameter 2": "This is parameter 1", 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", { name:"Néoveille",
description: "Détecteur de néologismes", description: "Détecteur de néologismes",
...@@ -130,8 +139,12 @@ export default { ...@@ -130,8 +139,12 @@ export default {
} }
], ],
chosen_module: undefined, chosen_module: undefined,
show_desc: false, show_desc: {
"Morfetik": false,
"SDMC": false,
"Néoveille": false,
"Modulix": false,
},
}), }),
methods:{ methods:{
checkModule: function(module) { checkModule: function(module) {
...@@ -142,6 +155,9 @@ export default { ...@@ -142,6 +155,9 @@ export default {
this.chosen_module = module; this.chosen_module = module;
} }
} }
},
components: {
ModuleParametersForm,
} }
} }
</script> </script>
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
<v-card-title class="justify-center py-6"> <v-card-title class="justify-center py-6">
<h1 class="display-3">Choix des modules</h1> <h1 class="display-3">Choix des modules</h1>
</v-card-title> </v-card-title>
<DefinePipeline/> <DefinePipeline class="my-5" />
<ModuleChain class="my-5"/>
</v-card> </v-card>
<v-btn block color="success"> Lancer le traitement </v-btn> <v-btn block color="success"> Lancer le traitement </v-btn>
</v-container> </v-container>
...@@ -12,10 +13,12 @@ ...@@ -12,10 +13,12 @@
<script> <script>
import DefinePipeline from '@/components/DefineTreatment/DefinePipeline' import DefinePipeline from '@/components/DefineTreatment/DefinePipeline'
import ModuleChain from '@/components/DefineTreatment/ModuleChain'
export default { export default {
name: 'Treatment', name: 'Treatment',
components: { components: {
DefinePipeline, DefinePipeline,
ModuleChain,
}, },
} }
</script> </script>
\ No newline at end of file
<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
<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"
:items="param.items"
outlined
multiple
>
</v-select>
</div>
<div v-if="param.type=='Int-2'" class="mb-0">
<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]">