Skip to content

Commit

Permalink
Merge pull request #87 from buerokratt/46-show-list-of-sentences
Browse files Browse the repository at this point in the history
ISSUE-46: Show list of sentences
  • Loading branch information
alimuhammadahmer authored Jan 5, 2023
2 parents d1e9526 + 97d06d2 commit 477e61d
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions DSL.Resql/get_corpora.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT id, corpora_id, created_at, full_count, is_private, predictions, raw_text FROM list_corpora_tasks_paginated(:where_condition, :sort_condition, :page, :page_size);
1 change: 1 addition & 0 deletions DSL.Resql/get_corpora_info.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select corpora_id, source_file_name, source_file_size, created_at, trained_at from Corpora_Info order by created_at desc limit 1;
1 change: 1 addition & 0 deletions DSL.Resql/get_task.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select id, corpora_id, created_at, is_private, raw_text, sentences_annotations::text AS predictions from Corpora_Tasks where corpora_id = :corpora_id and id = :id ORDER BY created_at DESC limit 1;
7 changes: 7 additions & 0 deletions DSL.Ruuter/GET/corpora_info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
get_project:
call: http.post
args:
url: http://resql:8082/get_corpora_info
result: request_response

return_value:
11 changes: 11 additions & 0 deletions DSL.Ruuter/GET/task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
get_task:
call: http.post
args:
url: http://resql:8082/get_task
body:
id: ${parseInt(incoming.params.id)}
corpora_id: ${incoming.params.project}
result: request_response

return_value:
return: ${request_response.response.body[0]}
13 changes: 13 additions & 0 deletions DSL.Ruuter/GET/tasks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
list_task_by_corpora_id:
call: http.post
args:
url: http://resql:8082/get_corpora
body:
page: ${incoming.params.page}
page_size: ${incoming.params.page_size}
where_condition: ${incoming.params.where_condition}
sort_condition: ${incoming.params.sort_condition}
result: request_response

return:
return: ${request_response.response.body}

0 comments on commit 477e61d

Please sign in to comment.