Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
grew_doc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
grew
grew_doc
Commits
e2fce855
Commit
e2fce855
authored
Nov 24, 2019
by
Bruno Guillaume
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add clustering features for search functions
parent
a3bb2c48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
6 deletions
+27
-6
content/grew_server.md
content/grew_server.md
+27
-6
No files found.
content/grew_server.md
View file @
e2fce855
...
...
@@ -79,15 +79,16 @@ This service returns the list of existing samples in a given project.
### The `eraseSample` service
This service is used to remove a sample. If the sample does not exist, nothing happens
This service is used to remove a sample. If the sample does not exist, nothing happens
.
*
`(<string> project_id, <string> sample_id)`
### The `renameSample` service
An error is returned either if
`sample_id`
does not exist or if
`new_sample_id`
already exists in
`project_id`
.
*
`(<string> project_id, <string> sample_id, <string> new_sample_id)`
An error is returned either if
`sample_id`
does not exist or if
`new_sample_id`
already exists in
`project_id`
.
## Sentences
...
...
@@ -142,10 +143,30 @@ An error is returned either if `sample_id` does not exist or if `new_sample_id`
### The `searchPatternInSentences` service
*
`(<string> project_id, <string> pattern)`
returns a list of dict
`{'sample_id':…, 'sent_id':…, 'nodes':…, 'edges':…}`
This service returns occurrences of some pattern in a project.
Each occurrence is described by a dict
`{'sample_id':…, 'sent_id':…, 'nodes':…, 'edges':…}`
.
*
`(<string> project_id, <string> pattern)`
returns a list of occurrences.
*
:new:
`(<string> project_id, <string> pattern, <string> clusters)`
where
`clusters`
is a list of cluster keys, separated by
`;`
.
This returns nested dictionaries (the depth being equals to the length of the cluster key list).
The set of occurrences of the
`pattern`
in
`project_id`
are clustered with the first key of the list;
each clusters is further clustered recursively with the remaining keys.
For instance:
*
If the length of the cluster keys list is 1, the behaviour is similar the the
*clustering*
feature available in
**Grew-match**
.
*
Data presented in
**Relations tables**
in
**Grew match**
can be obtained (for the
`obj`
relation in the example) with the arguments:
* `pattern`: `pattern { G -[obj]-> D }`
* `clusters`: `G.upos; D.upos`
### The `searchPatternInGraphs` service
*
`(<string> project_id, <string> pattern)`
returns a list of dict
`{'sample_id':…, 'sent_id':…, 'user_id':…, 'nodes':…, 'edges':…}`
This service returns occurrences of some pattern in a project, for a given user.
Each occurrence is described by a dict
`{'sample_id':…, 'sent_id':…, 'user_id':…, 'nodes':…, 'edges':…}`
.
*
`(<string> project_id, <string> pattern)`
returns a list of occurrences.
*
:new:
`(<string> project_id, <string> pattern, <string> clusters)`
Nested dictionaries are returned with the same structure as in the case of
`searchPatternInSentences`
above.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment