Skip to content

Commit

Permalink
fix indexing / help / and hide labels
Browse files Browse the repository at this point in the history
  • Loading branch information
ftyers committed Jun 10, 2021
1 parent 90e55e4 commit e951f72
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
2 changes: 2 additions & 0 deletions client/corpus.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ class Corpus {

// get the index to start at
const index = this.index || 0;

console.log('parse() INDEX', index);

// iterate over all the pieces, get a list of affected indices
const sents = splitted.map((split, i) => {
Expand Down
2 changes: 1 addition & 1 deletion notatrix/data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ module.exports = {
SD: require("./sd"),
sd: require("./sd"),

corpora: require("./corpora"),
// corpora: require("./corpora"),

};
6 changes: 5 additions & 1 deletion notatrix/src/nx/corpus.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,13 @@ class Corpus extends NxBaseClass {
parse(string) {
const splitted = split(string, this.options); // might throw errors
const index = this.index || 0;
console.log('parse() ' + index);

splitted.forEach((split, i) => {
// console.log(i, split);
this.insertSentence(index + i, split, false);
//this.insertSentence(index + i, split, false);
this.pushSentence(split);
console.log('pushSentence() ' + i);
});

return this;
Expand All @@ -272,6 +275,7 @@ class Corpus extends NxBaseClass {
static fromString(string, options) {
const corpus = new Corpus(options);
corpus.parse(string);
corpus.index = 0;
return corpus;
}

Expand Down
1 change: 1 addition & 0 deletions notatrix/src/nx/sentence.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ class Sentence extends NxBaseClass {
}

attach() {
console.log('attach()');
this.iterate(token => {
(token._heads || []).forEach((dependency, i) => {
if (i)
Expand Down
9 changes: 5 additions & 4 deletions server/public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -876,17 +876,18 @@ td .parse-error {
#label-container {

background-color: #fff;
display: flex;
/* display: flex;*/
padding: 0;
overflow-x: auto;

display: none;
}

#labels-horiz {
list-style: none;
margin: 0 0.5em;
padding: 0;
display: flex;
/*display: flex;*/
display: none;
}

#label-controller .label-text {
Expand Down Expand Up @@ -1559,4 +1560,4 @@ only screen and (max-width: 760px),
padding-left: 120px !important;
color: black;
}
}
}
2 changes: 1 addition & 1 deletion server/public/html/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h4>Editing tokens</h4>
</tr>
<tr>
<td>Merge two tokens into a supertoken</td>
<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>
<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>
</tr>
</table>

Expand Down

0 comments on commit e951f72

Please sign in to comment.