Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NLMaps Web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simon Will
NLMaps Web
Commits
f145336a
Commit
f145336a
authored
4 years ago
by
Simon Will
Browse files
Options
Downloads
Patches
Plain Diff
Improve handling of faulty MRLs
parent
56376c43
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
nlmapsweb/processing/answering.py
+1
-1
1 addition, 1 deletion
nlmapsweb/processing/answering.py
nlmapsweb/processing/diagnosing.py
+4
-3
4 additions, 3 deletions
nlmapsweb/processing/diagnosing.py
nlmapsweb/static/js/query.js
+6
-1
6 additions, 1 deletion
nlmapsweb/static/js/query.js
with
11 additions
and
5 deletions
nlmapsweb/processing/answering.py
+
1
−
1
View file @
f145336a
...
...
@@ -20,7 +20,7 @@ def answer_query(mrl_query):
current_app
.
logger
.
info
(
'
Received py answering result
'
)
return
result
return
{
'
error
'
:
'
Unknown MRL interpretation error
'
}
return
{
'
type
'
:
'
error
'
,
'
error
'
:
'
Unknown MRL interpretation error
'
}
class
AnswerResult
(
Result
):
...
...
This diff is collapsed.
Click to expand it.
nlmapsweb/processing/diagnosing.py
+
4
−
3
View file @
f145336a
...
...
@@ -137,13 +137,14 @@ class DiagnoseResult(Result):
tokens
=
nl
.
split
(
'
'
)
custom_suggestions
=
get_suggestions
(
tokens
)
return
cls
(
success
=
True
,
nl
=
nl
,
mrl
=
mrl
,
taginfo
=
taginfo
,
tf_idf_scores
=
tf_idf_scores
,
return
cls
(
success
=
success
,
error
=
error
,
nl
=
nl
,
mrl
=
mrl
,
taginfo
=
taginfo
,
tf_idf_scores
=
tf_idf_scores
,
custom_suggestions
=
custom_suggestions
)
def
to_dict
(
self
):
return
{
'
nl
'
:
self
.
nl
,
'
mrl
'
:
self
.
mrl
,
'
taginfo
'
:
self
.
taginfo
,
'
tf_idf_scores
'
:
self
.
tf_idf_scores
,
'
custom_suggestions
'
:
self
.
custom_suggestions
'
custom_suggestions
'
:
self
.
custom_suggestions
,
'
error
'
:
self
.
error
}
This diff is collapsed.
Click to expand it.
nlmapsweb/static/js/query.js
+
6
−
1
View file @
f145336a
...
...
@@ -149,7 +149,12 @@ window.addEventListener('load', function() {
callback
(
diagnoseResult
);
},
function
(
xhr
)
{
messagesBlock
.
addMessage
(
'
Diagnosing failed.
'
,
true
);
const
diagnoseResult
=
JSON
.
parse
(
xhr
.
responseText
);
let
msg
=
'
Diagnosing failed.
'
;
if
(
diagnoseResult
.
error
)
{
msg
+=
'
'
+
diagnoseResult
.
error
;
}
messagesBlock
.
addMessage
(
msg
,
true
);
},
null
,
formData
...
...
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