API Question: "Special:GenreParserInfo"

Any posts related to the categorization and standardization of IMSLP

Moderators: vinteuil, Davydov

Post Reply
gardano
forum adept
Posts: 62
Joined: Wed Mar 02, 2011 8:08 pm
notabot: 42
notabot2: Human

API Question: "Special:GenreParserInfo"

Post by gardano »

Hi Folks,
I'm working with the API, and need a good way to display Tags. I've found the Special:GenreParserInfo page, which includes a table captioned "Tags", which has the headings "Tag Name", "# of", and a 3rd column with tag descriptions. It's almost exactly what I need.

The tag descriptions have a semicolon-separated list of descriptions that don't seem to be in any particular order. For instance, "fl ob vn vc hpd" has "Scores featuring the flute; Scores featuring the oboe; Scores featuring the violin; Scores featuring the cello; Scores featuring the harpsichord; For 5 players; For flute, oboe, violin, cello, harpsichord". However, there is no "default" tag description. For me, the default tag description for "fl ob vn vc hpd" would be "For flute, oboe, violin, cello, harpsichord".

I can't parse the string for the word "For" (which was my first thought), because there are several of the strings that begin that way.

Ideally, I'd need a way to dereference "vn" to "Violin", "fl" to "Flute", etc -- that is, to separate the tags and dereference each separately. But the tag description column for "fl" has "For 1 player; For flute; Scores featuring the flute", which doesn't suit my needs.

I can see that there's been an awesome amount of work on this table. I'm very impressed!

Perhaps the Special:GenreParserInfo page isn't the right place for me to be looking. Any suggestions?

Thanks!
imslp
Site Admin
Posts: 1642
Joined: Thu Jan 01, 1970 12:00 am

Re: API Question: "Special:GenreParserInfo"

Post by imslp »

The API system has undergone an overhaul; the new genretags function should address your problem. See the IMSLP:API page.
gardano
forum adept
Posts: 62
Joined: Wed Mar 02, 2011 8:08 pm
notabot: 42
notabot2: Human

Re: API Question: "Special:GenreParserInfo"

Post by gardano »

Very excellent!

I grabbed it, and can parse it using a standard JSON library. This is exactly what I need!

Thanks very much for the excellent work.

imslp wrote:The API system has undergone an overhaul; the new genretags function should address your problem. See the IMSLP:API page.
Post Reply