Skip to content

Commit 7c050b9

Browse files
ftyersjonorthwash
authored andcommitted
fix indexing / help / and hide labels
1 parent f2f93e6 commit 7c050b9

File tree

6 files changed

+15
-7
lines changed

6 files changed

+15
-7
lines changed

client/corpus.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,8 @@ class Corpus {
425425

426426
// get the index to start at
427427
const index = this.index || 0;
428+
429+
console.log('parse() INDEX', index);
428430

429431
// iterate over all the pieces, get a list of affected indices
430432
const sents = splitted.map((split, i) => {

notatrix/data/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ module.exports = {
1717
SD: require("./sd"),
1818
sd: require("./sd"),
1919

20-
corpora: require("./corpora"),
20+
// corpora: require("./corpora"),
2121

2222
};

notatrix/src/nx/corpus.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,13 @@ class Corpus extends NxBaseClass {
260260
parse(string) {
261261
const splitted = split(string, this.options); // might throw errors
262262
const index = this.index || 0;
263+
console.log('parse() ' + index);
263264

264265
splitted.forEach((split, i) => {
265266
// console.log(i, split);
266-
this.insertSentence(index + i, split, false);
267+
//this.insertSentence(index + i, split, false);
268+
this.pushSentence(split);
269+
console.log('pushSentence() ' + i);
267270
});
268271

269272
return this;
@@ -272,6 +275,7 @@ class Corpus extends NxBaseClass {
272275
static fromString(string, options) {
273276
const corpus = new Corpus(options);
274277
corpus.parse(string);
278+
corpus.index = 0;
275279
return corpus;
276280
}
277281

notatrix/src/nx/sentence.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ class Sentence extends NxBaseClass {
220220
}
221221

222222
attach() {
223+
console.log('attach()');
223224
this.iterate(token => {
224225
(token._heads || []).forEach((dependency, i) => {
225226
if (i)

server/public/css/style.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -876,17 +876,18 @@ td .parse-error {
876876
#label-container {
877877

878878
background-color: #fff;
879-
display: flex;
879+
/* display: flex;*/
880880
padding: 0;
881881
overflow-x: auto;
882-
882+
display: none;
883883
}
884884

885885
#labels-horiz {
886886
list-style: none;
887887
margin: 0 0.5em;
888888
padding: 0;
889-
display: flex;
889+
/*display: flex;*/
890+
display: none;
890891
}
891892

892893
#label-controller .label-text {
@@ -1559,4 +1560,4 @@ only screen and (max-width: 760px),
15591560
padding-left: 120px !important;
15601561
color: black;
15611562
}
1562-
}
1563+
}

server/public/html/help.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ <h4>Editing tokens</h4>
5353
</tr>
5454
<tr>
5555
<td>Merge two tokens into a supertoken</td>
56-
<td>Left click on a token, then press <kbd>c</kbd>, then select with an arrow, which neighbor you want to merge with it. </td>
56+
<td>Left click on a token, then press <kbd>s</kbd>, then select with an arrow, which neighbor you want to merge with it. </td>
5757
</tr>
5858
</table>
5959

0 commit comments

Comments
 (0)