Page 1 of 1

API Question: "Special:GenreParserInfo"

Posted: Sat Mar 19, 2011 12:56 pm
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!

Re: API Question: "Special:GenreParserInfo"

Posted: Sat Mar 19, 2011 11:31 pm
by imslp
The API system has undergone an overhaul; the new genretags function should address your problem. See the IMSLP:API page.

Re: API Question: "Special:GenreParserInfo"

Posted: Sun Mar 20, 2011 2:35 am
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.