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

Lot of new things

parent aab7e9fe
<template>
<v-container flex fill-height>
<v-tabs grow
v-model="tab"
>
......@@ -11,31 +12,53 @@
<v-tabs-items v-model="tab" class="my-4" vertical>
<v-tab-item>
<v-card outlined height=100px>
<v-card outlined height=8em>
<v-card-text
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-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 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=100px>
<v-card outlined height=8em>
<v-card-text
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-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,
......
......@@ -8,17 +8,24 @@
</v-card-title>
<v-form class="px-12">
<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-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"
......@@ -36,9 +43,42 @@
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
<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>
......
<template>
<v-textarea
hide-details
outlined
height=8em
auto-grow
clearable
label="Entrez votre texte ici"
......
<template>
<v-container>
<v-card outlined class="my-5">
<v-card outlined>
<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"
......@@ -25,23 +19,19 @@
<!-- CANDY ! -->
<v-card-actions>
<v-btn text
>
Add
</v-btn>
<v-btn
@click="checkModule(module)"
text
>
Parameters</v-btn>
Ajouter à la chaîne
</v-btn>
<v-spacer/>
<v-btn icon @click="show_desc = !show_desc">
<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">
<div v-show="show_desc[module.name]">
<v-divider/>
<v-card-text>
{{ module.description }}
......@@ -57,44 +47,27 @@
v-show="chosen_module"
elevation="3"
color="grey lighten-3"
class="mt-2"
class="mt-2 pb-2"
>
<v-card-title>
Paramètre pour {{ chosen_module.name }}
</v-card-title>
<v-card-text>
Paramètre: {{ chosen_module.parameters }}
<ModuleParametersForm :parameters="chosen_module.parameters"/>
</v-card-text>
<v-card-actions>
<v-btn>Ajouter à la chaîne</v-btn>
<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>
<!-- <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>
</v-container>
</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:
[
{
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",
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>
......
......@@ -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
<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]">
<p> {{ param.description }} </p>
</div>
</v-expand-transition>
<v-row>
<v-col class="py-0">
<v-text-field
:label="param.items[0]"
outlined
></v-text-field>
</v-col>
<v-col class="py-0">
<v-text-field
:label="param.items[1]"
outlined
></v-text-field>
</v-col>
</v-row>
</div>
<div v-if="param.type=='Int'">
<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-text-field
label="Entrez un nombre"
outlined
></v-text-field>
</div>
</div>
</v-form>
</template>
<script>
export default {
data: () => ({
show_desc: {},
}),
props: ['parameters'],
methods: {
showHideDescription: function (param_name) {
if (this.show_desc[param_name] === undefined) {
this.$set(this.show_desc,param_name,true);
}
else {
this.show_desc[param_name] = !this.show_desc[param_name];
}
}
}
}
</script>
<template>
<v-container fluid>
<v-row no-gutters max-height="200px">
<v-col cols="3" max-height="auto">
<v-sheet color="grey">
<v-treeview
:items="items"
color="white"
activatable
>
</v-treeview>
</v-sheet>
</v-col>
<v-col cols="6">
<v-sheet color="primary" height="30em">
<div
class="pa-5"
>
Lorem ipsum dolor, sit amet consectetur adipisicing elit.
Quaerat, quam! Ipsam et eum beatae cupiditate exercitationem,
fugit porro nihil nostrum, nesciunt,
fuga natus reiciendis facilis mollitia! Ea iste ex quisquam?
</div>
</v-sheet>
</v-col>
<v-col cols="3">
<v-sheet color="grey">
<v-treeview
:items="items"
color="white"
activatable
>
</v-treeview>
</v-sheet>
</v-col>
</v-row>
</v-container>
</template>
<script>
export default {
data: () => ({
items: [
{
id: 1,
name: 'Applications :',
children: [
{ id: 2, name: 'Calendar : app' },
{ id: 3, name: 'Chrome : app' },
{ id: 4, name: 'Webstorm : app' },
],
},
{
id: 5,
name: 'Documents :',