I am implementing a messaging system, which requires broadcast to group feature. Instead of a relatively clunky habtm group structure, I am using tags. Form a usability standpoint, it would be helpful to avoid redundant tags. Like, friend vs friends OR client vs. clients. Is it practical to filter tags, before entry, to avoid duplicate tags like plural vs. singular? -- Posted via http://www.ruby-forum.com/.
Lon Baker wrote:> I am implementing a messaging system, which requires broadcast to group > feature. > > Instead of a relatively clunky habtm group structure, I am using tags. > Form a usability standpoint, it would be helpful to avoid redundant > tags. Like, friend vs friends OR client vs. clients. > > Is it practical to filter tags, before entry, to avoid duplicate tags > like plural vs. singular?You could a like search: Tag.find(:first, :conditions => [''name % ?'',params[:tag]] Or could create a method like: def Tag.find_with_plurals(tag) t = Tag.find_by_name(tag) if t.nil? t = Tag.find_by_name(tag.pluralize) end if t.nil? t = Tag.create(:name => tag) end return t end Thats untested, so it may not work as is, but it gives you a basic idea. joey__ -- Posted via http://www.ruby-forum.com/.
>Instead of a relatively clunky habtm group structure, I am using tags. >Form a usability standpoint, it would be helpful to avoid redundant >tags. Like, friend vs friends OR client vs. clients. > >Is it practical to filter tags, before entry, to avoid duplicate tags >like plural vs. singular?Before entry? You might look at the auto_complete function to suggest existing tags. One bit of advice: be careful assuming that tags are a "usable" replacement for a habtm relationship. "friend" and "friends" may seem redundant to you, but to a user, those are clearly very different concepts. I wouldn''t tag a portrait photo of my buddy Bob with "friends" in Flickr if I had the choice. Would you also try to assume thinks like "myfriends" is redundant with "friends"? The best tagging implementations don''t impose any kinds of restrictions on the text. If what you need is a traditional categorization system, there are good examples of usable ways of managing those. -- Posted with http://DevLists.com. Sign up and save your time!
Andrew Otwell wrote:>>Instead of a relatively clunky habtm group structure, I am using tags. >>Form a usability standpoint, it would be helpful to avoid redundant >>tags. Like, friend vs friends OR client vs. clients. >> >>Is it practical to filter tags, before entry, to avoid duplicate tags >>like plural vs. singular? > > Before entry? You might look at the auto_complete function to suggest > existing tags. > > One bit of advice: be careful assuming that tags are a "usable" > replacement for a habtm relationship. "friend" and "friends" may seem > redundant to you, but to a user, those are clearly very different > concepts. I wouldn''t tag a portrait photo of my buddy Bob with "friends" > in Flickr if I had the choice. Would you also try to assume thinks like > "myfriends" is redundant with "friends"? The best tagging > implementations don''t impose any kinds of restrictions on the text. If > what you need is a traditional categorization system, there are good > examples of usable ways of managing those.Thats a good idea, with the autocomplete. Or you could modify the method to return an array, and say did you mean ''list of tags'', then they could choose a pre-exisitng tag, or make a new one. -- Posted via http://www.ruby-forum.com/.
Andrew Otwell wrote:> Before entry? You might look at the auto_complete function to suggest > existing tags. > > One bit of advice: be careful assuming that tags are a "usable" > replacement for a habtm relationship. "friend" and "friends" may seem > redundant to you, but to a user, those are clearly very different > concepts. I wouldn''t tag a portrait photo of my buddy Bob with "friends" > in Flickr if I had the choice. Would you also try to assume thinks like > "myfriends" is redundant with "friends"? The best tagging > implementations don''t impose any kinds of restrictions on the text. If > what you need is a traditional categorization system, there are good > examples of usable ways of managing those.I attempt to apply tagging in a collaborative business environment. Allow a freeform environment for users to define "groups" of existing contact records, without imposing a rigid pre-defined group metaphor. But, the obvious issue being, one user might enter friend vs another user entering friends, within the same shared data set. The auto-complete field is helpful, but may not prevent errors in entry completely. The idea is more of an experiment, and after some real usage may or may not be handy. Thanks for all the helpful suggestions! -- Posted via http://www.ruby-forum.com/.
> > I attempt to apply tagging in a collaborative business environment. > Allow a freeform environment for users to define "groups" of existing > contact records, without imposing a rigid pre-defined group metaphor. > > But, the obvious issue being, one user might enter friend vs another > user entering friends, within the same shared data set. > > The auto-complete field is helpful, but may not prevent errors in entry > completely. > > The idea is more of an experiment, and after some real usage may or may > not be handy.I think you should try the rails Inflections module.Rails itself uses pluaralization and that could be of help to you.Also IMHO I think you should only use the pluralization to record somewhere on your system that friends and friend are related.A user should be allowed to tag either friend or friends but what ever computation you do based on those tags shouldnt produce very different results. Vivek -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060215/5057e45a/attachment.html