Skip to content

Commit 65e07ea

Browse files
committed
corrected terminology: MWT not MTW
1 parent 847baaa commit 65e07ea

22 files changed

+177
-176
lines changed

CHANGES.md

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Changes
2+
## Version 2.15.1
3+
* corrected confusion: ConlluEditor deals with MWT (multiword tokens) and not with MTWs...
4+
25
## Version 2.15.0
36
* added a script to find similar or identical sentences in a single or multiple CoNLL-U files
47

@@ -72,7 +75,7 @@
7275
* new default for saving: without the option `--saveAfter` the conllu file is saved whenever a new sentence is chosen (next, prec, ...)
7376
the old behaviour (save every modification immediately) can be achieved using the option `--saveAfter 1`
7477
* shortcuts can be defined for two keys
75-
* `mod compose startid length [form]` optional form of the new MTW
78+
* `mod compose startid length [form]` optional form of the new MWT
7679

7780
## Version 2.9.1
7881
* correction: replace `\n` in `MISC:SpacesAfter=` by space in `# text = ` metadata line
@@ -92,20 +95,20 @@
9295

9396
## Version 2.8.0
9497
* add `--compare` option to Docker image
95-
* make `MISC` autocompletion work when editing MTW
96-
* new command to transform existing word in MTW
98+
* make `MISC` autocompletion work when editing MWT
99+
* new command to transform existing word in MWT
97100
* new tests
98101

99102
## Version 2.7.5
100103
* Warning improved
101-
* bug corrected in MTW creation (delete Space(s)After from MTW member tokens and add value from last memeber token to the MTW token
102-
* put concatenated forms of created MTW to the FORM column of the MTW
104+
* bug corrected in MWT creation (delete Space(s)After from MWT member tokens and add value from last memeber token to the MWT token
105+
* put concatenated forms of created MWT to the FORM column of the MWT
103106

104107
## Version 2.7.4
105108
* Error if edited file is not controlled under git AND there is already a backup-file (.2) in order to avoid overwriting the output of a preceding editing
106109

107110
## Version 2.7.3
108-
* bug corrected when inserting new MTW and serializing MTWs with Space(s)After to CoNLL-U
111+
* bug corrected when inserting new MWT and serializing MWTs with Space(s)After to CoNLL-U
109112

110113
## Version 2.7.2
111114
* search: find word on multiple criteria
@@ -137,7 +140,7 @@
137140

138141
## Version 2.4.3
139142
* multi word token larger, bug for variable size corrected
140-
* fixing issue #7 (if two words overlapping with a MTW are joined, the MTW will be deleted)
143+
* fixing issue #7 (if two words overlapping with a MWT are joined, the MWT will be deleted)
141144
* fixing issue #6 (joining/splitting sentences sets correctly `# text =` metadata)
142145
* new tests, tests updates
143146

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The editor provides the following functionalities:
1414
* search: forms, lemmas, UPOS, XPOS, deprels, sentences IDs and comments, sequences of any of these,
1515
searching for subtrees, importing subtrees from current sentence, sd-parse support
1616
* edit non-CoNLL-U columns in a subset of [CoNLL-U plus files](http://universaldependencies.org/ext-format.html)
17-
* create multitoken words from existing words or add a MTW to contract two ore more existing words
17+
* create multiword tokens from existing words or add a MWT to contract two ore more existing words
1818
* git support
1919
* export of dependency graphs as svg or LaTeX (for the [tikz-dependency](https://ctan.org/pkg/tikz-dependency) package or
2020
the [doc/deptree.sty](doc/deptree.sty) class, see [documentation](doc/deptree-doc.pdf))
@@ -25,7 +25,7 @@ The editor provides the following functionalities:
2525
* adding Translit= values to the MISC column (transliterating the FORM column) see section [Transliteration](#transliteration)
2626
* finding similar or identical sentence in a list of CoNLL-U files, see section [Find Similar Sentences](#find-similar-sentences)
2727

28-
Current version: 2.15.0 (see [change history](CHANGES.md))
28+
Current version: 2.15.1 (see [change history](CHANGES.md))
2929

3030
ConlluEditor can also be used as front-end to display the results of dependency parsing in the same way as the editor.
3131
* dependency tree/dependency hedge
@@ -312,13 +312,13 @@ tree/graph to open a dialogue which allows to edit or delete the token (i.e. the
312312
### Commands to be used with `modify` button:
313313

314314
* `split id [splitpos]` split a word in two (it will be copied to a new node and attached to the same head). If `splitpos` is given, the characters of Form and Lemma left of splitpos will remain in the original word, the rest will be the new word
315-
* `join id` merge word with id with the following. If the merged word overlap in any way with a multitoken word (MTW), the MTW will be deleted
315+
* `join id` merge word with id with the following. If the merged word overlap in any way with a multiword token (MWT), the existing MWT will be deleted
316316
* `insert id form [lemma [upos [xpos]]]` add a new word after word with id
317-
* `delete id` delete word with id. Any overlapping MTW will also be deleted
317+
* `delete id` delete word with id. Any overlapping MWT will also be deleted
318318
* `sentsplit id` split current sentence at word id (id will be in the second sentence). Dependency and Enhanced Dependency relations between the words before and after the split will be deleted.
319319
* `sentjoin` merge current sentence with following
320-
* `compose id length` create a multitoken word (MTW). The inserted `n-m` line will contain the form of the word with `id`. In order to edit or delete a multitoken word, click on the multitoken bar at the bottom of the dependency tree or graph. Setting an end value of 0 deletes the multitoken word.
321-
* `tomtw id form1 form2 [form3 ...]` Transform an existing word into a MTW. The new MTW keeps the form of the word transformed. All other columns are copied to the first member word, except the form which is `form1` from the command line. `form2` etc are used to initialize the form (and lemma) column of the other members of the MTW. All members are initially attached to the first member using the fixed depedency relation.
320+
* `compose id length` create a multiword token (MWT). The inserted `n-m` line will contain the form of the word with `id`. In order to edit or delete a multiword token, click on the multiword bar at the bottom of the dependency tree or graph. Setting an end value of 0 deletes the multiword token.
321+
* `tomwt id form1 form2 [form3 ...]` Transform an existing word into a MWT. The new MWT keeps the form of the word transformed. All other columns are copied to the first member word, except the form which is `form1` from the command line. `form2` etc are used to initialize the form (and lemma) column of the other members of the MWT. All members are initially attached to the first member using the fixed depedency relation.
322322
* `emptyinsert id form [lemma [upos [xpos]]]` add a new empty word after word with `id`. The new empty word gets the id `id.1`, if it is the first empty word at thihs position. If there is already an empty word, the new one will have the id `id.2` etc.
323323
* `emptydelete id.subid` delete empty word with id `id.subid`.
324324

doc/deptree-doc.pdf

135 Bytes
Binary file not shown.

doc/deptree-doc.tex

+6-6
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ \section{Customisation}
140140
\item \verb:\setwordfont{\sf}: font for word nodes (form and POS, unless the latter is overriden)
141141
\item \verb:\setposfont{\sf}: font for POS in word nodes
142142
\item \verb:\setbottomwordfont{\sf}: font for words on the bottom line
143-
\item \verb:\setmtwfont{\it\scriptsize}: font for multiword token (bottom line)
144-
\item \verb:\setmtwlabelcolor{blue!10}: background colour for multiword token
143+
\item \verb:\setmwtfont{\it\scriptsize}: font for multiword token (bottom line)
144+
\item \verb:\setmwtlabelcolor{blue!10}: background colour for multiword token
145145
\end{itemize}
146146

147147
The \verb:set*font: commands accept any font command, including new
@@ -161,8 +161,8 @@ \section{Customisation}
161161
\setwordfont{\large\sf}
162162
\setposfont{\rm\small}
163163
\setbottomwordfont{\footnotesize\sf}
164-
\setmtwfont{\it\scriptsize}
165-
\setmtwlabelcolor{blue!10}
164+
\setmwtfont{\it\scriptsize}
165+
\setmwtlabelcolor{blue!10}
166166
\end{verbatim}
167167
\caption{customization}\label{def2}
168168
\end{figure}
@@ -177,8 +177,8 @@ \section{Customisation}
177177
\setwordfont{\large\sf}
178178
\setposfont{\rm\small}
179179
\setbottomwordfont{\footnotesize\sf}
180-
\setmtwfont{\it\scriptsize}
181-
\setmtwlabelcolor{blue!10}
180+
\setmwtfont{\it\scriptsize}
181+
\setmwtlabelcolor{blue!10}
182182

183183

184184

doc/deptree.sty

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
\def\@deprelcolor{black} % line
99
\def\@depreltextcolor{black} % text
1010
\def\@deprellabelcolor{gray} % frame
11-
\def\@mtwlabelcolor{black!7} % frame
11+
\def\@mwtlabelcolor{black!7} % frame
1212
\def\@deprelbgcolor{black!5}
1313
\def\@depreltextfont{\footnotesize}
1414
\def\@wordfont{}
1515
\def\@wordcolor{black}
1616
\def\@bottomwordfont{\small}
1717
\def\@posfont{}
18-
\def\@mtwfont{\scriptsize}
18+
\def\@mwtfont{\scriptsize}
1919
% define styles for arrows, words and dep labels
2020
\tikzstyle{dottedline} = [draw, dashed, color=gray]
2121
\tikzstyle{line} = [draw, very thick, color=\@deprelcolor, -latex']
@@ -69,8 +69,8 @@
6969
rounded corners]
7070

7171
\tikzstyle{wglabel} = [draw=black,
72-
font=\@mtwfont,
73-
fill=\@mtwlabelcolor,
72+
font=\@mwtfont,
73+
fill=\@mwtlabelcolor,
7474
rounded corners]
7575

7676

@@ -85,8 +85,8 @@
8585
\def\setwordcolor#1{\def\@wordcolor{#1}}
8686
\def\setbottomwordfont#1{\def\@bottomwordfont{#1}}
8787
\def\setposfont#1{\def\@posfont{#1}}
88-
\def\setmtwfont#1{\def\@mtwfont{#1}}
89-
\def\setmtwlabelcolor#1{\def\@mtwlabelcolor{#1}}
88+
\def\setmwtfont#1{\def\@mwtfont{#1}}
89+
\def\setmwtlabelcolor#1{\def\@mwtlabelcolor{#1}}
9090

9191
\def\@bottom{0}
9292
\def\setbottom#1{\def\@bottom{#1}}

gui/edit.js

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** This library is under the 3-Clause BSD License
22
3-
Copyright (c) 2018-2021, Orange S.A.
3+
Copyright (c) 2018-2022, Orange S.A.
44
55
Redistribution and use in source and binary forms, with or without modification,
66
are permitted provided that the following conditions are met:
@@ -28,7 +28,7 @@
2828
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
3030
@author Johannes Heinecke
31-
@version 2.14.2 as of 29th December 2021
31+
@version 2.15.1 as of 8th February 2022
3232
*/
3333

3434

@@ -319,7 +319,7 @@ function getServerInfo() {
319319
function extractLast(term) {
320320
return split(term).pop();
321321
}
322-
// use class here to make MISC-autocompletion work in editMTW and wordedit
322+
// use class here to make MISC-autocompletion work in editMWT and wordedit
323323
$(".classmisc") //$("#cmisc")
324324
.on("keydown", function(event) {
325325
if (event.keyCode === $.ui.keyCode.TAB && $(this).autocomplete("instance").menu.active) {
@@ -693,7 +693,7 @@ function getWordLengthsOfTree(item, maxlen) {
693693
}
694694

695695
var conllwords = {}; // all words of current sentence
696-
var mtws = {}; // all multitoke words of current sentence
696+
var mwts = {}; // all multiword tokens of current sentence
697697
var clickedNodes = [];
698698
var unprocessedkeystrokes = []; // process multi key shortcuts
699699
var deprels = [];
@@ -1103,25 +1103,25 @@ function ModifyTree(evt) {
11031103
$("#enhdeprelEdit").modal();
11041104
} else if (id[0] == "mwe") {
11051105
//alert("MT MWE: " + id + " " + target);
1106-
$("#currentMTWfrom").val(id[1]);
1107-
$("#currentMTWto").val(id[2]);
1108-
$("#currentMTWform").val(id[3]);
1106+
$("#currentMWTfrom").val(id[1]);
1107+
$("#currentMWTto").val(id[2]);
1108+
$("#currentMWTform").val(id[3]);
11091109

11101110
var mc = "";
11111111

1112-
if (mtws[id[1]].misc != undefined) {
1113-
for (e = 0; e < mtws[id[1]].misc.length; ++e) {
1114-
var mch = mtws[id[1]].misc[e];
1112+
if (mwts[id[1]].misc != undefined) {
1113+
for (e = 0; e < mwts[id[1]].misc.length; ++e) {
1114+
var mch = mwts[id[1]].misc[e];
11151115
if (e > 0)
11161116
mc += "#"; //\n";
11171117
mc += mch.name + "=" + mch.val;
11181118
}
11191119
} else
11201120
mc = "_";
1121-
$("#currentMTWmisc").val(mc)
1121+
$("#currentMWTmisc").val(mc)
11221122

11231123

1124-
$("#editMTW").modal();
1124+
$("#editMWT").modal();
11251125

11261126
$("#mods").val("");
11271127

@@ -1438,11 +1438,11 @@ function formatPhrase(item) {
14381438
}
14391439

14401440
// create similar table for MWE
1441-
mtws = {};
1441+
mwts = {};
14421442
for (wid in conllwords) {
14431443
cw = conllwords[wid];
14441444
if (cw.mwe != undefined) {
1445-
mtws[wid] = cw.mwe;
1445+
mwts[wid] = cw.mwe;
14461446
}
14471447
}
14481448
}
@@ -1622,15 +1622,15 @@ $(document).ready(function () {
16221622

16231623
});
16241624

1625-
/* delete clicked MTW form */
1625+
/* delete clicked MWT form */
16261626
$('#editMWtoken').click(function () {
1627-
misc = $("#currentMTWmisc").val(); //.replace(/\n+/, ",");
1628-
sendmodifs({"cmd": "mod editmtw "
1629-
+ $("#currentMTWfrom").val()
1630-
+ " " + $("#currentMTWto").val()
1631-
+ " " + $("#currentMTWform").val()
1627+
misc = $("#currentMWTmisc").val(); //.replace(/\n+/, ",");
1628+
sendmodifs({"cmd": "mod editmwt "
1629+
+ $("#currentMWTfrom").val()
1630+
+ " " + $("#currentMWTto").val()
1631+
+ " " + $("#currentMWTform").val()
16321632
+ " " + misc});
1633-
$('#editMTW').modal('hide');
1633+
$('#editMWT').modal('hide');
16341634
});
16351635

16361636

0 commit comments

Comments
 (0)