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

Old tags not going away #80

Open
keithnewman14 opened this issue Aug 7, 2012 · 4 comments
Open

Old tags not going away #80

keithnewman14 opened this issue Aug 7, 2012 · 4 comments

Comments

@keithnewman14
Copy link
Member

There was already some discussion of a similar issue, so I'm not sure how feasible it is, but with both the wikipedia/geonames-fetching tags and the manual entry tags, if you type something and erase it, the tag stays.

For example, typing in "Egypt" returns the tags

  • Egypt
  • Ancient Egypt
  • Egypt national football team

But if you then erase the word "Egypt" and just type in "China," your tags are now:

  • Egypt
  • Ancient Egypt
  • Egypt national football team
  • People's Republic of China
  • China

even though there is now no mention of "Egypt" in your annotation. Some of this error can be circumvented with the accept/reject/neutral toggle, but, particularly with manual entry, it poses the potential issue of creating a half-finished tag that can't be removed (i.e. if someone pauses partway through typing "Mesopotamia," you could end up with 3 tags, "Meso," "Mesopot" and "Mesopotamia."

@slhck
Copy link
Member

slhck commented Aug 7, 2012

I believe we've briefly talked about this, but haven't explicitly mentioned it here. That is indeed a valid issue.

  • I guess a very simple solution would be to remove all rejected tags after X attempts of polling new tags from the view (but keep them in the database for evaluation). That way, if a user really felt that a tag was not matching, this tag would be eliminated automatically. Simply set a local variable that counts the request and on the fifth or so hides the tags. Note that the tags are stored as JavaScript objects in the tagging view, including their name and everything. I use this to check if newly arrived tags are already present or not.
  • You could offer more control by allowing the user to clear all neutral and rejected tags. Just create a small link below that says "Clear neutral and rejected tags" or whatever. This would simply hide them all. Attach a .click() listener from the tagging view to do that.
  • Check the responses — if I'm correct we should just get more and more tags if the user entered more text, including the old tags that have already been listed below. If the user now replaces the entire text, we should get a completely new set of tags. We can just remove every neutral or rejected tag from the view that doesn't appear in the last tag query result. Does that make sense?

@keithnewman14
Copy link
Member Author

I'm having trouble accessing the tags array from within the tagging_view.js file. Even when tags have been generated, self.tags remains empty (currently trying to do the second option with the button).

@slhck
Copy link
Member

slhck commented Aug 7, 2012

Could be a bug.

I unfortunately don't have the time to sit down and debug this myself, but at some point the tags must be added to the list of tags for the JS to check whether they're already there.

if (self.tags[label] === undefined) {

If that didn't work, you'd get duplicate tags all over the place, so self.tags must be defined and filled with tags.

@keithnewman14
Copy link
Member Author

I was able to fix it with the manual entry by adding:

$("#modal-annotation-tags").empty();

at the beginning of the keyup function and then removing the

if (self.tags[label] === undefined) {}

conditional. I realizes this forces a reload of all of the tags, but because the manual entry doesn't require any queries, it's still quite fast, and it then eliminates the need for users to accept or reject tags (because if they're manually entering tags, they should only be entering ones they consider accept-worthy anyway).

Edit: for reference, I have 2 tagging views, the original TaggingVIew and a ManualTaggingView that I created so I could make any changes that were needed and not have to worry about having a bunch of conditionals.

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

No branches or pull requests

2 participants