Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE-46: Show list of sentences #87

Merged
merged 5 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,51 @@ https://github.com/buerokratt/Data-Anonymizer/issues/59
https://github.com/buerokratt/Data-Anonymizer/blob/main/DSL.Resql/insert_regex.sql

```

```

https://github.com/buerokratt/Data-Anonymizer/blob/main/DSL.Ruuter/POST/regex.yml

```

```

### Show list of sentences

https://github.com/buerokratt/Data-Anonymizer/issues/46

https://github.com/buerokratt/Data-Anonymizer/blob/main/DSL.Resql/get_corpora.sql

```
curl -H "Content-Type: application/json" -X "POST" "http://localhost:8082/get_corpora" --data '{"where_condition": "corpora_id = '\''c25d0570-dc99-46d6-afb7-80ad46439b3c'\''", "sort_condition": "Corpora_Tasks.\"id\" DESC", "page": "1", "page_size": "30"}'
```

https://github.com/buerokratt/Data-Anonymizer/blob/main/DSL.Ruuter/GET/tasks.yml

```
curl "http://localhost:8080/tasks?page=1&page_size=30&where_condition=corpora_id%20=%20%27c25d0570-dc99-46d6-afb7-80ad46439b3c%27&sort_condition=Corpora_Tasks."id"+DESC"
```

https://github.com/buerokratt/Data-Anonymizer/blob/main/DSL.Resql/get_task.sql

```
curl -H "Content-Type: application/json" -X "POST" "http://localhost:8082/get_task" --data '{"corpora_id": "c25d0570-dc99-46d6-afb7-80ad46439b3c", "id": 931986}'
```

https://github.com/buerokratt/Data-Anonymizer/blob/main/DSL.Ruuter/GET/task.yml

```
curl "http://localhost:8080/task?id=931986&project=c25d0570-dc99-46d6-afb7-80ad46439b3c"
```

https://github.com/buerokratt/Data-Anonymizer/blob/main/DSL.Resql/get_corpora_info.sql

```
curl -H "Content-Type: application/json" -X "POST" "http://localhost:8082/get_corpora_info"
```

https://github.com/buerokratt/Data-Anonymizer/blob/main/DSL.Ruuter/GET/corpora_info.yml

```
curl "http://localhost:8080/corpora_info"
```