defining label algorithms #41

Open
bdarcus opened this Issue Apr 14, 2011 · 5 comments

Comments

Projects
None yet
2 participants
Owner

bdarcus commented Apr 14, 2011

Re: this thread:

http://forums.zotero.org/discussion/5239/first-letter-of-author-as-citation/

My druthers ATM would be defining a simple global attribute with pre-defined key-generation values, rather than some complex, but flexible, syntax.

Member

fbennett commented Apr 15, 2011

There is a simple mechanism for this in citeproc-js:

https://bitbucket.org/bdarcus/citeproc-test/src/3f42e7972ce3/processor-tests/humans/disambiguate_CitationLabelInData.txt

For the default label, it trawls through the list of possible creator variables, and grabs the first word of the first family name or "literal" name that it sees, and a returns the two as a combined string. If the calling application supplies a fixed value for the CSL citation-label variable, that is used instead. If there are conflicts, it will append a year-suffix to the label in either case.

The code has been in there for awhile (I wrote it after the last discussion we had about this), but it's still green. But with a little tuning it might serve.

Member

fbennett commented May 4, 2011

I've extended this in citeproc-js to permit the configuration of the output of citation-label via a processor option. A description of the syntax is here:

http://groups.google.com/group/citeproc-js/browse_thread/thread/266385fef533694b

An example format is here:

https://www.zotero.org/trac/browser/extension/branches/trunk-multilingual/defaults/preferences/zotero.js#L114

Owner

bdarcus commented May 4, 2011

Maybe I'm just tired, but I don't understand the explanation.

Also, we never settled on which approach to take: this one, or my suggestion.

Member

fbennett commented May 4, 2011

This is just a trial implementation, meant to stimulate discussion, not to preempt it. (There are two issues: how to define the content of the label; and how to express that definition in CSL. This is an attempt to do the former.)

The syntax I've used is meant to be simple. As examples, if we have the specification string "Aaa00:AaAA:00:AAA:00", then the following input will produce the matching trigraphs:

citation info: Billy Moodlepot, 1959
trigraph: Moo59

citation info: Bernard Smith & Gilbert Hichinpost, 1973
trigraph: SmH73

citation info: Wikus Junker, Harry Spoonfiddle, Clarke Quent, 2003
trigraph: JSQ03

citation info: Silvan Gobsmack, Hilary Nimblefoot, Adrian Buchwalt, Etienne Fogbottom, 2004
trigraph: GNB04

Also, we never settled on which approach to take: this one, or my suggestion.

You can take this as a suggestion that I think a more flexible syntax would be appropriate. If stability is an objective, it would make sense to avoid building in fixed parameters that need to go through a prolonged review process before they become available to users.

(It would be good to get someone who actually uses these styles to work with the syntax to see if it covers the need. My notion in implementing it is to tempt people to work with it and give us feedback.)

Owner

bdarcus commented May 4, 2011

OK; got it.

Yes, feedback from potential users would be good.
On May 3, 2011 11:50 PM, "fbennett" <
reply@reply.github.com>
wrote:

This is just a trial implementation, meant to stimulate discussion, not to
preempt it. (There are two issues: how to define the content of the label;
and how to express that definition in CSL. This is an attempt to do the
former.)

The syntax I've used is meant to be simple. As examples, if we have the
specification string "Aaa00:AaAA:00:AAA:00", then the following input will
produce the matching trigraphs:

citation info: Billy Moodlepot, 1959
trigraph: Moo59

citation info: Bernard Smith & Gilbert Hichinpost, 1973
trigraph: SmH73

citation info: Wikus Junker, Harry Spoonfiddle, Clarke Quent, 2003
trigraph: JSQ03

citation info: Silvan Gobsmack, Hilary Nimblefoot, Adrian Buchwalt,
Etienne Fogbottom, 2004
trigraph: GNB04

(It would be good to get someone who actually uses these styles work with
the syntax to see if it covers the need. My notion in implementing it is to
tempt people to work with it and give us feedback.)

Reply to this email directly or view it on GitHub:

#41 (comment)

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