Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Looking for advice? Join the
Matrix channel for GitLab users in Bielefeld
!
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
b427a5e6
Commit
b427a5e6
authored
4 years ago
by
Stephan Porada
Browse files
Options
Downloads
Patches
Plain Diff
Use matches instead of one match in match context
parent
af50da49
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
web/app/static/js/nopaque.Results.js
+1
-0
1 addition, 0 deletions
web/app/static/js/nopaque.Results.js
web/app/static/js/nopaque.lists.js
+8
-6
8 additions, 6 deletions
web/app/static/js/nopaque.lists.js
with
9 additions
and
6 deletions
web/app/static/js/nopaque.Results.js
+
1
−
0
View file @
b427a5e6
...
@@ -22,6 +22,7 @@ class Data {
...
@@ -22,6 +22,7 @@ class Data {
this
[
"
cpos_lookup
"
]
=
{};
// object contains all this key value pair
this
[
"
cpos_lookup
"
]
=
{};
// object contains all this key value pair
this
[
"
text_lookup
"
]
=
{};
// same as above for all text ids
this
[
"
text_lookup
"
]
=
{};
// same as above for all text ids
this
[
"
match_count
"
]
=
matchCount
;
this
[
"
match_count
"
]
=
matchCount
;
this
[
"
corpus_type
"
]
=
"
subcorpus
"
}
}
addData
(
jsonData
)
{
addData
(
jsonData
)
{
...
...
This diff is collapsed.
Click to expand it.
web/app/static/js/nopaque.lists.js
+
8
−
6
View file @
b427a5e6
...
@@ -214,6 +214,8 @@ class ResultsList extends List {
...
@@ -214,6 +214,8 @@ class ResultsList extends List {
this
.
contextData
=
response
.
payload
;
this
.
contextData
=
response
.
payload
;
this
.
contextData
[
"
query
"
]
=
results
.
data
.
query
;
this
.
contextData
[
"
query
"
]
=
results
.
data
.
query
;
this
.
contextData
[
"
context_id
"
]
=
this
.
contextId
;
this
.
contextData
[
"
context_id
"
]
=
this
.
contextId
;
this
.
contextData
[
"
match_count
"
]
=
this
.
contextData
.
matches
.
length
this
.
contextData
[
"
corpus_type
"
]
=
"
sub-subcorpus
"
Object
.
assign
(
this
.
contextData
,
results
.
metaData
);
Object
.
assign
(
this
.
contextData
,
results
.
metaData
);
contextResultsElement
=
document
.
getElementById
(
"
context-results
"
);
contextResultsElement
=
document
.
getElementById
(
"
context-results
"
);
modalExpertModeSwitchElement
=
document
.
getElementById
(
"
inspect-display-options-form-expert_mode_inspect
"
);
modalExpertModeSwitchElement
=
document
.
getElementById
(
"
inspect-display-options-form-expert_mode_inspect
"
);
...
@@ -226,13 +228,13 @@ class ResultsList extends List {
...
@@ -226,13 +228,13 @@ class ResultsList extends List {
// python range like function from MDN
// python range like function from MDN
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Sequence_generator_(range)
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Sequence_generator_(range)
const
range
=
(
start
,
stop
,
step
)
=>
Array
.
from
({
length
:
(
stop
-
start
)
/
step
+
1
},
(
_
,
i
)
=>
start
+
(
i
*
step
));
const
range
=
(
start
,
stop
,
step
)
=>
Array
.
from
({
length
:
(
stop
-
start
)
/
step
+
1
},
(
_
,
i
)
=>
start
+
(
i
*
step
));
lc
=
range
(
this
.
contextData
.
match
.
lc
[
0
],
this
.
contextData
.
match
.
lc
[
1
],
1
)
lc
=
range
(
this
.
contextData
.
match
es
[
0
]
.
lc
[
0
],
this
.
contextData
.
match
es
[
0
]
.
lc
[
1
],
1
)
c
=
range
(
this
.
contextData
.
match
.
c
[
0
],
this
.
contextData
.
match
.
c
[
1
],
1
)
c
=
range
(
this
.
contextData
.
match
es
[
0
]
.
c
[
0
],
this
.
contextData
.
match
es
[
0
]
.
c
[
1
],
1
)
rc
=
range
(
this
.
contextData
.
match
.
rc
[
0
],
this
.
contextData
.
match
.
rc
[
1
],
1
)
rc
=
range
(
this
.
contextData
.
match
es
[
0
]
.
rc
[
0
],
this
.
contextData
.
match
es
[
0
]
.
rc
[
1
],
1
)
}
else
{
}
else
{
lc
=
this
.
contextData
.
match
.
lc
;
lc
=
this
.
contextData
.
match
es
[
0
]
.
lc
;
c
=
this
.
contextData
.
match
.
c
;
c
=
this
.
contextData
.
match
es
[
0
]
.
c
;
rc
=
this
.
contextData
.
match
.
rc
;
rc
=
this
.
contextData
.
match
es
[
0
]
.
rc
;
}
}
// create sentence strings as tokens
// create sentence strings as tokens
tokenHTMLArray
=
[];
tokenHTMLArray
=
[];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment