Skip to content

Commit

Permalink
Merge branch 'main' into ISSUE-59
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jan 12, 2023
2 parents 7e04b7b + 6e46fb6 commit a927c4b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions DSL.Resql/list_regex.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select Regex_Entity.id, Regex_Entity.entity, Regex_Entity.regex from Regex_Entity join (select Regex_Entity."id", max(Regex_Entity."created_at") as most_recent_record from Regex_Entity group by id) p ON (Regex_Entity.id = p.id and Regex_Entity.created_at = p.most_recent_record) where Regex_Entity.active = True;
8 changes: 8 additions & 0 deletions DSL.Ruuter/GET/regex.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
list_regex:
call: http.post
args:
url: http://resql:8082/list_regex
result: request_response

return_value:
return: ${request_response.response.body}
2 changes: 1 addition & 1 deletion Docker_Project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ https://github.com/buerokratt/Data-Anonymizer/issues/69

### View list of Regex patterns added by user

https://github.com/buerokratt/Data-Anonymizer/issues/86
https://github.com/buerokratt/Data-Anonymizer/issues/60

Add [Ruuter DSL File](Ruuter/DSL/GET/regex.yml) and [Resql Query](Resql/templates/production/list_regex.sql) to list regex patterns.

Expand Down
16 changes: 16 additions & 0 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,19 @@ https://github.com/buerokratt/Data-Anonymizer/blob/main/DSL.Ruuter/POST/annotate
```
curl -H "Content-Type: application/json" -X "POST" "http://localhost:8080/annotate?project=097afbed-761e-4ede-b7d4-97cafdadc488" --data '{"id":932021,"annotated_text":"text","sentences_annotations":"[{\"value\":{\"start\":44,\"end\":48,\"text\":\"2343\",\"labels\":[\"Aadress\"]},\"id\":\"AFPMDbFSpq\",\"from_name\":\"label\",\"to_name\":\"text\",\"type\":\"labels\",\"origin\":\"manual\"}]","annotate_existing_task":false,"project":"097afbed-761e-4ede-b7d4-97cafdadc488"}'
```

### View list of Regex patterns added by user

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

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

```
curl -X "POST" "http://localhost:8082/list_regex"
```

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

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

0 comments on commit a927c4b

Please sign in to comment.