Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
LeireA committed Jan 21, 2022
1 parent 8eecabb commit 168dda0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions frontend/components/token-classifier/results/TextSpan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
import ClickOutside from "v-click-outside";
import "assets/icons/check";
import "assets/icons/cross";
import { substring } from 'stringz';
import { substring } from "stringz";

export default {
directives: {
Expand Down Expand Up @@ -114,10 +114,15 @@ export default {
return this.spans[this.spanId];
},
text() {
return substring(this.record.raw_text, this.spans[this.spanId].start, this.spans[this.spanId].end)
return substring(
this.record.raw_text,
this.spans[this.spanId].start,
this.spans[this.spanId].end
);
},
whiteSpace() {
return substring(this.record.raw_text,
return substring(
this.record.raw_text,
this.spans[this.spanId].end,
this.spans[this.spanId + 1] ? this.spans[this.spanId + 1].start : ""
);
Expand Down
2 changes: 1 addition & 1 deletion frontend/models/TokenClassification.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import { ObservationDataset, USER_DATA_METADATA_KEY } from "./Dataset";
import { BaseRecord, BaseSearchQuery, BaseSearchResults } from "./Common";
import { indexOf, length } from 'stringz';
import { indexOf, length } from "stringz";

class TokenClassificationRecord extends BaseRecord {
tokens;
Expand Down

0 comments on commit 168dda0

Please sign in to comment.