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

Add /removeDuplicates API call #8

Open
stain opened this issue Oct 12, 2015 · 1 comment
Open

Add /removeDuplicates API call #8

stain opened this issue Oct 12, 2015 · 1 comment
Milestone

Comments

@stain
Copy link
Contributor

stain commented Oct 12, 2015

As discussed in openphacts/ops-search#14 there is a need for a new API call, say /removeDuplicates that takes a list of URIs, then removes any duplicates - making the first one listed survive.

A URI X is only a duplicate of Y if X==Y both ways with the given lens.

This is needed for ops-search, and can wait until after Open PHACTS 2.0.

@stain stain added this to the 2.2 milestone Oct 12, 2015
@Christian-B
Copy link
Member

If there are any lens which use one way justifications but not the inverse (IE partial one way lens) the simplest approach may be to create a sub lens which only has the justifications that are symmetric or where the lens also includes the inverse justification.

So for example if the lens includes the justifications "is_stereoundefined_parent_of then" the sub lens would only include that if the lens also included "has_stereoundefined_parent."

The IMS know which justifications have inverses (and what the inverse is) and which are symmetric as it needed this to load the linksets in both directions.

So the sub lens could be automatically created at startup time.

Then this test can just test one way using the sub lens with the knowledge the other way applies too.

Now that you are working just one way you map the first URI - remove any mapping from the list and then check the next remaining one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants