Grammalecte  Check-in [93888e7c05]

Overview
Comment:[tb] lexicon editor: ui update > search tab + info tab
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tb | multid
Files: files | file ages | folders
SHA3-256: 93888e7c057f6c75804351d2ccbf47de9e9fd9a91a2f373fd8b5f639ec8a59f2
User & Date: olr on 2018-03-21 17:06:25
Other Links: branch diff | manifest | tags
Context
2018-03-21
17:40
[graphspell][cli] select by flexion and by tags check-in: 4e94d8cfc8 user: olr tags: cli, graphspell, multid
17:06
[tb] lexicon editor: ui update > search tab + info tab check-in: 93888e7c05 user: olr tags: tb, multid
08:20
[fr][bug] conj_generator: correction: flexion vide si nCut = 0 check-in: 479b4f4cfb user: olr tags: fr, multid
Changes

Modified gc_lang/fr/tb/content/lex_editor.css from [2bf7166364] to [bcaa37e951].

84
85
86
87
88
89
90
91

























.info_label {
    width: 120px;
}
.data {
    width: 90px;
}

































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115

.info_label {
    width: 120px;
}
.data {
    width: 90px;
}

/*
    Search tab
*/

#search_table {
    width: 600px;
    height: 650px;
}

description {
    width: 200px;
}

/*
    Informations tab
*/

#tags_table {
    width: 600px;
    height: 650px;
    font-family: "Courier new", "Ubuntu Mono", Courier, Consolas, monospace;
}


Modified gc_lang/fr/tb/content/lex_editor.js from [e1b304940a] to [54d7c2964f].

470
471
472
473
474
475
476
477





























478
479


480
481
482


483
484
485


    export: function () {
        let sJSON = JSON.stringify(this.oIBDAWG.getJSON());
        oFileHandler.saveAs(sJSON);
    }
}































const oGenWordsTable = new Table("generated_words_table", ["Flexions", "Étiquettes"], [1, 1], "progress_new_words");
const oLexiconTable = new Table("lexicon_table", ["Flexions", "Lemmes", "Étiquettes"], [10, 7, 10], "progress_lexicon", "num_entries");



conj.init(helpers.loadFile("resource://grammalecte/fr/conj_data.json"));



oBinaryDict.load();
oBinaryDict.listen();
oGenerator.listen();









>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


>
>



>
>



>
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519

    export: function () {
        let sJSON = JSON.stringify(this.oIBDAWG.getJSON());
        oFileHandler.saveAs(sJSON);
    }
}


const oSearch = {

    listen: function () {
        document.getElementById("search_similar_button").addEventListener("click", () => { this.searchSimilar(); }, false);
        document.getElementById("search_regex_button").addEventListener("click", () => { this.searchRegex() }, false);
    },

    searchSimilar: function () {
        let sSimilar = document.getElementById("search_similar").value;
    },

    searchRegex: function () {
        let sFlexPattern = document.getElementById("search_flexion_pattern").value;
        let sTagsPattern = document.getElementById("search_tags_pattern").value;
    }
}


const oTagsInfo = {
    load: function () {
        let lEntry = [];
        for (let [sTag, sLabel] of _dTag) {
            lEntry.push([sTag, sLabel.trim()]);
        }
        oTagsTable.fill(lEntry);
    }
}


const oGenWordsTable = new Table("generated_words_table", ["Flexions", "Étiquettes"], [1, 1], "progress_new_words");
const oLexiconTable = new Table("lexicon_table", ["Flexions", "Lemmes", "Étiquettes"], [10, 7, 10], "progress_lexicon", "num_entries");
const oSearchTable = new Table("search_table", ["Flexions", "Lemmes", "Étiquettes"], [10, 7, 10], [10, 7, 10], "progress_search");
const oTagsTable = new Table("tags_table", ["Étiquette", "Signification"], [1, 10], "progress_lexicon");

conj.init(helpers.loadFile("resource://grammalecte/fr/conj_data.json"));


oTagsInfo.load();
oBinaryDict.load();
oBinaryDict.listen();
oGenerator.listen();
oSearch.listen();

Modified gc_lang/fr/tb/content/lex_editor.xul from [d3f3183550] to [b4635c5f8e].

28
29
30
31
32
33
34


35
36
37
38
39
40
41
    <button id="export_button" label="Exporter" />
  </hbox>

  <tabbox id="tabs" selectedIndex="0">
    <tabs>
      <tab label="&tab.editor.label;"/>
      <tab label="&tab.lexicon.label;"/>


    </tabs>

    <tabpanels>

      <!-- NEW WORD -->
      <tabpanel orient="vertical">
        







>
>







28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
    <button id="export_button" label="Exporter" />
  </hbox>

  <tabbox id="tabs" selectedIndex="0">
    <tabs>
      <tab label="&tab.editor.label;"/>
      <tab label="&tab.lexicon.label;"/>
      <tab label="&tab.search.label;"/>
      <tab label="&tab.info.label;"/>
    </tabs>

    <tabpanels>

      <!-- NEW WORD -->
      <tabpanel orient="vertical">
        
205
206
207
208
209
210
211






















































































212
213
214
215
216
217
218
219
220
221

222
223
224
225
              </listitem>
              -->
            </listbox>
          </vbox>
        </hbox>
      </tabpanel>























































































    </tabpanels>

  </tabbox>

  <script type="application/x-javascript" src="resource://grammalecte/graphspell/helpers.js" />
  <script type="application/x-javascript" src="resource://grammalecte/graphspell/str_transform.js" />
  <script type="application/x-javascript" src="resource://grammalecte/graphspell/dawg.js" />
  <script type="application/x-javascript" src="resource://grammalecte/graphspell/ibdawg.js" />
  <script type="application/x-javascript" src="resource://grammalecte/fr/conj.js" />
  <script type="application/x-javascript" src="resource://grammalecte/fr/conj_generator.js" />

  <script type="application/x-javascript" src="file_handler.js" />
  <script type="application/x-javascript" src="lex_editor.js" />

</dialog>







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>










>




207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
              </listitem>
              -->
            </listbox>
          </vbox>
        </hbox>
      </tabpanel>

      <tabpanel orient="vertical">
        <hbox>
          <vbox>
            <dialogheader title="&dialogheader.search.similar.label;" description="" />
            <hbox>
              <textbox id="search_similar" value="" />
              <button id="search_similar_button" label="Chercher" />
            </hbox>
            <spacer flex="1" />
            <dialogheader title="&dialogheader.search.regex.label;" description="" />
            <hbox>
              <label value="Flexion" />
              <spacer flex="1" />
              <textbox id="search_flexion_pattern" value="" />
            </hbox>
            <hbox>
              <label value="Étiquettes" />
              <spacer flex="1" />
              <textbox id="search_tags_pattern" value="" />
            </hbox>
            <button id="search_regex_button" label="Chercher" />
            <label value="" />
            <description>La recherche par expressions régulières peut générer un nombre gigantesque de résultats. Si vous n’entrez aucune condition, tout est affiché. Le dictionnaire de base contient environ 500 000 entrées.</description>
          </vbox>
          <vbox>
            <dialogheader title="Résultat" description="" />
            <listbox id="search_table">
              <!--
              <listhead>
                <listheader label="Flexions"/>
                <listheader label="Lemmes"/>
                <listheader label="Étiquettes"/>
              </listhead>

              <listcols>
                <listcol flex="4"/>
                <listcol flex="3"/>
                <listcol flex="4"/>
              </listcols>

              <listitem>
                <listcell label="George"/>
                <listcell label="House Painter"/>
                <listcell label="House"/>
              </listitem>
              -->
            </listbox>
          </vbox>
        </hbox>
      </tabpanel>

      <tabpanel orient="vertical">
        <hbox>
          <vbox>
            <dialogheader title="&dialogheader.info.label;" description="" />
            <description>Les modifications apportées au lexique ne sont enregistrées dans le dictionnaire qu’au moment où vous cliquez sur ‹Enregistrer› dans l’onglet ‹Lexique›.</description>
            <description>Il est inutile de purger votre lexique des doublons éventuels. Les doublons sont automatiquement supprimés lors de la création du dictionnaire.</description>
            <description>Le dictionnaire est compilé comme un graphe de mots sous la forme d’une chaîne binaire dans un fichier JSON. Cette opération peut prendre du temps et consommer beaucoup de mémoire si votre lexique contient plusieurs dizaines de milliers d’entrées.</description>
            <spacer flex="1" />
            <label value="Avertissement :" />
            <description>Il est déconseillé d’utiliser la catégorie ‹Autre› pour générer autre chose que des noms, des adjectifs, des noms propres, des verbes et des adverbes. Il n’y a aucune garantie que les étiquettes pour les autres catégories, notamment les mots grammaticaux, ne changeront pas.</description>
          </vbox>
          <vbox>
            <dialogheader title="Signification des étiquettes" description="" />
            <listbox id="tags_table">
              <!--
              <listhead>
                <listheader label="Étiquettes"/>
                <listheader label="Signification"/>
              </listhead>

              <listcols>
                <listcol flex="1"/>
                <listcol flex="10"/>
              </listcols>

              <listitem>
                <listcell label="House Painter"/>
                <listcell label="House"/>
              </listitem>
              -->
            </listbox>
          </vbox>
        </hbox>
      </tabpanel>

    </tabpanels>

  </tabbox>

  <script type="application/x-javascript" src="resource://grammalecte/graphspell/helpers.js" />
  <script type="application/x-javascript" src="resource://grammalecte/graphspell/str_transform.js" />
  <script type="application/x-javascript" src="resource://grammalecte/graphspell/dawg.js" />
  <script type="application/x-javascript" src="resource://grammalecte/graphspell/ibdawg.js" />
  <script type="application/x-javascript" src="resource://grammalecte/fr/conj.js" />
  <script type="application/x-javascript" src="resource://grammalecte/fr/conj_generator.js" />
  <script type="application/x-javascript" src="resource://grammalecte/fr/lexicographe.js" />
  <script type="application/x-javascript" src="file_handler.js" />
  <script type="application/x-javascript" src="lex_editor.js" />

</dialog>

Modified gc_lang/fr/tb/locale/en/lex_editor.dtd from [8c1160e1e9] to [0fdf104f95].

1
2
3
4





5
6
7
8
9
<!ENTITY window.title "Grammalecte · Lexical editor lexical">

<!ENTITY button.cancel.label "Close">






<!ENTITY dialogheader.newword.label "New word">
<!ENTITY dialogheader.lexicon.label "Your lexicon">

<!ENTITY tab.editor.label "Add">
<!ENTITY tab.lexicon.label "Lexicon">




>
>
>
>
>


|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!ENTITY window.title "Grammalecte · Lexical editor lexical">

<!ENTITY button.cancel.label "Close">

<!ENTITY tab.editor.label "Add">
<!ENTITY tab.lexicon.label "Lexicon">
<!ENTITY tab.search.label "Search">
<!ENTITY tab.info.label "Informations">

<!ENTITY dialogheader.newword.label "New word">
<!ENTITY dialogheader.lexicon.label "Your lexicon">
<!ENTITY dialogheader.search.similar.label "Similar spellings">
<!ENTITY dialogheader.search.regex.label "Regular expressions">
<!ENTITY dialogheader.info.label "Informations">

Modified gc_lang/fr/tb/locale/fr/lex_editor.dtd from [9672553e7e] to [f24f4ad2f9].

1
2
3
4





5
6



7
8
9
<!ENTITY window.title "Grammalecte · Éditeur lexical">

<!ENTITY button.cancel.label "Fermer">






<!ENTITY dialogheader.newword.label "Nouveau mot">
<!ENTITY dialogheader.lexicon.label "Votre lexique">




<!ENTITY tab.editor.label "Ajout">
<!ENTITY tab.lexicon.label "Lexique">




>
>
>
>
>


>
>
>

<
<
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15


<!ENTITY window.title "Grammalecte · Éditeur lexical">

<!ENTITY button.cancel.label "Fermer">

<!ENTITY tab.editor.label "Ajout">
<!ENTITY tab.lexicon.label "Lexique">
<!ENTITY tab.search.label "Recherche">
<!ENTITY tab.info.label "Informations">

<!ENTITY dialogheader.newword.label "Nouveau mot">
<!ENTITY dialogheader.lexicon.label "Votre lexique">
<!ENTITY dialogheader.search.similar.label "Graphies similaires">
<!ENTITY dialogheader.search.regex.label "Expressions régulières">
<!ENTITY dialogheader.info.label "Informations">