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 categories for tags #333

Open
alanfgh opened this issue Jun 22, 2014 · 11 comments
Open

Add categories for tags #333

alanfgh opened this issue Jun 22, 2014 · 11 comments
Labels
enhancement Issue that describes a problem that requires a change in the current functionalities of Tatoeba. unclear The issue, its scope or the goal are not clearly identified

Comments

@alanfgh
Copy link
Contributor

alanfgh commented Jun 22, 2014

CK has suggested adding categories for tags:

http://a4esl.com/temporary/tatoeba/tags/

We also have "utility" tags (e.g., "@check", "@delete"). We use the convention that such tags start with "@". Other "prefix conventions": tags that list an author start with "by" and ones that list a source start with "from". While the ability to sort tags by name (mentioned in another issue ticket) will make it easier to group these tags, displaying only a single category at a time will be more difficult. For this reason, adding an enum to represent these categories would be a good idea. We undoubtedly want there to be fewer categories than 128, so a TINYINT would probably be sufficient.

We should make it possible to choose categories via the UI, but for a first pass, we could set some values via SQL statements (e.g., set all tags beginning with "by " to category "author"). It would be good to have an "unassigned" default category.

@alanfgh alanfgh self-assigned this Jun 22, 2014
@jiru jiru added the enhancement Issue that describes a problem that requires a change in the current functionalities of Tatoeba. label Sep 25, 2014
@ckjpn
Copy link

ckjpn commented Mar 22, 2016

I re-uploaded the demo here.

http://tatoeba.ueuo.com/display_all_tags.html

I had to take a lot of the tatoeba support stuff offline, since it was slowing down my server.

@RyckRichards
Copy link
Member

RyckRichards commented Mar 22, 2016 via email

@alanfgh
Copy link
Contributor Author

alanfgh commented Feb 24, 2017

This issue should not be assigned to me anymore.

@ckjpn
Copy link

ckjpn commented Feb 25, 2017

I would be willing to start categorizing tags.

I think I would need the following.

  • a field added into the database called "category".
  • a way for me to submit a category for each tag.
  • for someone to set up a page similar to what I have at http://tatoeba.ueuo.com/display_all_tags.html.
    ** I think this page should be a table that is sortable.
  • by default, all tags not yet categorized should be labeled "uncategorized", or perhaps "z-uncategorized" so that an alphabetical sort of the categories puts that tag at or near the bottom.

This is how the data in that page looks. (tag number, tag name, number of sentences, category)

"1218 less than 8 words 139537 length",
"5295 male name 58383 name",
"138 location 17821 function",
"5296 female name 12933 name",
"4070 present simple 11452 grammar",
"5305 names of 2 people 9614 pattern",

Javascript writes the table and a jQuery plugin is used for the sorting. (Show the source of the page to see how it's done.)

If the above data was written to a file named "tags.js" in the downloads folder, I think it could easily be imported into an HTML page like my demo page. That's not the ideal way, but while in the process of doing this, it would allow people to easily see the progress. The main problem with this is that the .js file would likely be cached on a visitor's computer, so the data might not be the most up-to-date. Perhaps, though, a setting on the server could change this, so the file wouldn't be cached very long.

Perhaps as a starter, TRANG or someone can create the field "category" and import all the categories I've already identified.

I can easily change that data to something like the following if it's not obvious how to do that.
Tag number + tab + category name (I would assume that internally categories would be identified by number.)

1218 length
5295 name
138 function
5296 name
4070 grammar
5305 pattern

@jiru jiru added the unclear The issue, its scope or the goal are not clearly identified label Mar 4, 2019
@ckjpn
Copy link

ckjpn commented Nov 1, 2019

I've noticed that this is tagged "unclear."

Here's a demo of what I mean.

I re-uploaded this page to the following URL on 2021-02-21, since the previous server is offline.

http://tatoeba.ueuo.com/stats-190323-tags.html

This would allow grouping "grammar" tags together, "function" tags together, etc.

@trang
Copy link
Member

trang commented Nov 1, 2019

I think the "unclear" label is meant for things like:

  • What categories do we want exactly?
  • What would be the process for adding a new category? For deleting a category? For renaming a category?
  • How do we decide which tag belongs to which category?

@ckjpn
Copy link

ckjpn commented Nov 3, 2019

For starters, perhaps a few of the categories that I've suggested would work, and everything else could be put a "category not yet chosen" category, much like you haver "unknown" for languages that haven't yet been added to tatoeba.org.

@ckjpn
Copy link

ckjpn commented Dec 26, 2019

I noticed that this is still tagged "unclear."
What other questions do you have?

@trang
Copy link
Member

trang commented Dec 28, 2019

The questions I listed above still have no clear answer...

@ckjpn
Copy link

ckjpn commented Dec 28, 2019

What categories do we want exactly?

I suggest we start with some of the ones I have on the demo page, and expand to include more as we need them.

What would be the process for adding a new category? For deleting a category? For renaming a category?

I think you could likely make a page accessible for admins to do this.
What would be needed is a way to search for the tag, and then have a field for that tag's category, hopefully with auto complete like tags are done now.

How do we decide which tag belongs to which category?

I've already suggested a few in the demo. Tags that can't yet easily be categorized could get a default tag, maybe "not in any category yet."

@jiru
Copy link
Member

jiru commented Apr 20, 2020

Note that the meaning of the "unclear" label is explained more in detail on the wiki.

In terms of UI, I had this idea from Hetzner’s console, they also have label feature that uses a key/value pattern:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue that describes a problem that requires a change in the current functionalities of Tatoeba. unclear The issue, its scope or the goal are not clearly identified
Projects
None yet
Development

No branches or pull requests

5 participants