-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Proof of concept: Suggest similar person to rename them #262
Draft
matiasdelellis
wants to merge
16
commits into
master
Choose a base branch
from
find-similar
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
493fd25
Suggest similar person to rename them
matiasdelellis 333d649
Add a "deviation" setting to control the suggestions.
matiasdelellis e73d272
ot show any message to the user if the suggestion is disabled
matiasdelellis 200d3c8
Add Relation table, and fill after create clusters
matiasdelellis 1dc82a3
Migrate suggestions to proposed as relation
matiasdelellis 3431b13
Add Relation controller and use it
matiasdelellis 218439c
Add an true 'I am not sure' button, that not reject completely the pr…
matiasdelellis 18b209e
Fix query to find Relations between two persons.
matiasdelellis d95067e
Also search inverted condition when find relations
matiasdelellis db8a672
Some changes to optimize the filling of relations and print some info…
matiasdelellis e726cff
Use array as NxN array to optimize search for relations.
matiasdelellis a578af5
Proof of concept on improving clustering according to relation.
matiasdelellis f7a85f9
Doh. Also don't compare a good face with a bad one!
matiasdelellis 776de52
Suggest all proposals, even if they already have the same name.
matiasdelellis 0b22b79
Also, dont suggest persons/faces with less than minimum confidence.
matiasdelellis 8189e17
Take into account state when find first relations
matiasdelellis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,21 +48,21 @@ class Relation extends Entity { | |
* | ||
* @var int | ||
* */ | ||
protected $face1; | ||
public $face1; | ||
|
||
/** | ||
* Face id of a face of a person related with $face1 | ||
* | ||
* @var int | ||
* */ | ||
protected $face2; | ||
public $face2; | ||
|
||
/** | ||
* State of two face relation. These are proposed, and can be accepted | ||
* as as the same person, or rejected. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe add as comment - "Rejected relations are never proposed again" |
||
* | ||
* @var int | ||
* */ | ||
protected $state; | ||
public $state; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OOooh, I liiiike this idea!:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the other hand, now that I thinj... this will affect cluster creation. So, we might end up with those faces in same bucket. Which is OK, but next execution will "split" those faces into two cluster again. And now user will have to again accept merges.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, consider to keep those two system ("automatic cluster creation" and "manual approvals" decouples, as coupled they can lead to unintended feedback loops
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess now you understand why I insisted on implementing the relations tables with faces, and not with persons. 😅
In what circumstances do you suppose it will be splited again?
At this point, we only add or avoid adding new edges and they will be processed just like always by chinese_whispers. These will be repeated between all executions, therefore it will be as stable as until today.
When joining multiple clusters, can change the main face in the resulting cluster, but since we talk about face relations, these are still valid and we use them again in all the executions beyond the resulting clusters.
In any case, when the main faces change, new face relations will be created. In the example in my last comment, 44 clusters were merged, and 4 just new relations were created.
I am concerned that this table grows a lot, but it seems that it is little, and in any case, we can eliminate the faces that were not accepted before adding the new ones.
I don't quite understand what you mean, but maybe the previous comments will clarify it.
The only worrying point is that we need something like undo, in case the user accepts any wrong face by mistake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. So, let's see how this plays out!:)