Quantcast

citeproc-js bug in handling lists of mixed authors?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

citeproc-js bug in handling lists of mixed authors?

Chris Maloney
Hi,

We've encountered a problem that I suspect is a bug in citeproc-js. I'm attaching the citeproc-json file. Note how there are a lot of authors, some of which have family/given names, and some of which are specified with "literal".

The output that I'm getting has the order of the authors all wrong, for all of the three styles that we're using. It seems that the literal authors are causing the processor to break. The outputs are below (sans some formatting).

Is this a known bug, or is there something I’m missing?


american-medical-association:

Vv V, Ww W, Xx X, et al. with Aa A, Bb B, Cc C et al., Literal J, Kk K, Ll L, Mm M et al., Literal U. Stuff and nonsense. My Favorite Journal. 2015;24(2):582-596. doi:10.1234/mfj/1234.

modern-language-association:

Vv, V et al. with Aa, A, B Bb, et al., Literal J and Kk, K, L Ll et al., Literal U. “Stuff and Nonsense.” My Favorite Journal 24.2 (2015): 582–596. PMC. Web. 6 Feb. 2015.

apa:

Vv, V., Ww, W., Xx, X., Yy, Y., Zz, Z., Aaa, A., … Fff, F. with Aa, A., Bb, B., Cc, C., Dd, D., Ee, E., Ff, F., … Ii, I., Literal J and Kk, K., Ll, L., Mm, M., Nn, N., Oo, O., Pp, P., … Tt, T., Literal U. (2015). Stuff and nonsense. My Favorite Journal, 24(2), 582–596. doi:10.1234/mfj/1234

--
Chris Maloney
NIH/NLM/NCBI (Contractor)
Building 45, 4AN36D-12
301-594-2842


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel

4275071.json (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: citeproc-js bug in handling lists of mixed authors?

Sebastian Karcher
FWIW, while Zotero does import/export single-field authors as literal
to CSL JSON when using export, it looks like it passes them on to
citeproc-js just as family with an empty given (or at least that's
what ends up embeded in documents).

Odd. Maybe Frank can shed light on this.

Though I'm confused about the JSON you attached and the output you're
getting--I only see 5 authors total (3 regular 2 literal) in the JSON,
so that couldn't possibly produce what you have.

On Fri, Feb 6, 2015 at 8:41 PM, Maloney, Christopher (NIH/NLM/NCBI)
[C] <[hidden email]> wrote:

> Hi,
>
> We've encountered a problem that I suspect is a bug in citeproc-js. I'm attaching the citeproc-json file. Note how there are a lot of authors, some of which have family/given names, and some of which are specified with "literal".
>
> The output that I'm getting has the order of the authors all wrong, for all of the three styles that we're using. It seems that the literal authors are causing the processor to break. The outputs are below (sans some formatting).
>
> Is this a known bug, or is there something I’m missing?
>
>
> american-medical-association:
>
> Vv V, Ww W, Xx X, et al. with Aa A, Bb B, Cc C et al., Literal J, Kk K, Ll L, Mm M et al., Literal U. Stuff and nonsense. My Favorite Journal. 2015;24(2):582-596. doi:10.1234/mfj/1234.
>
> modern-language-association:
>
> Vv, V et al. with Aa, A, B Bb, et al., Literal J and Kk, K, L Ll et al., Literal U. “Stuff and Nonsense.” My Favorite Journal 24.2 (2015): 582–596. PMC. Web. 6 Feb. 2015.
>
> apa:
>
> Vv, V., Ww, W., Xx, X., Yy, Y., Zz, Z., Aaa, A., … Fff, F. with Aa, A., Bb, B., Cc, C., Dd, D., Ee, E., Ff, F., … Ii, I., Literal J and Kk, K., Ll, L., Mm, M., Nn, N., Oo, O., Pp, P., … Tt, T., Literal U. (2015). Stuff and nonsense. My Favorite Journal, 24(2), 582–596. doi:10.1234/mfj/1234
>
> --
> Chris Maloney
> NIH/NLM/NCBI (Contractor)
> Building 45, 4AN36D-12
> 301-594-2842
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> xbiblio-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>



--
Sebastian Karcher, PhD
Department of Political Science
Northwestern University

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: citeproc-js bug in handling lists of mixed authors?

fbennett
In reply to this post by Chris Maloney
Chris,

I think you're seeing this, which dates back to the early development
of the processor:

    http://citationstylist.org/docs/citeproc-js-csl.html#cs-institution-extension

When the "literal" element is used, the processor interprets it as an
institution. Authors listed before an institution name are grouped
with it in the rendered author list, as affiliated to the institution.
This works out nicely but for one detail - unaffiliated authors. To
capture that information in the simple list structure accepted by the
processor, unaffiliated authors are taken from the end of the list,
after the last institution. This is obviously confusing, since they
render at the beginning of the list in a citation, followed by "with"
to set them off from the author/institution groups that follow.

If you want institutional authors to be treated as first-class authors
in the list, just send them as a "family" element, with no "given".
That's what Zotero does - their intention with "single-field entry" in
the UI had not been to treat them as institutional authors, and they
were concerned about user confusion. (In the MLZ variant that I
maintain, single-field entries are sent to the processor as "literal",
and are treated as institutions.)

It is unfortunate that the reversal of position can be alarming - but
on the other hand, we had to turn backflips in CSL to cope with the
scientists' convention of placing the principle investigator at the
end of an author list. Sometimes there isn't quite enough bandwidth in
a schema.

Anyway, I'm pretty sure that's what's going on with those. (I'll now
brace myself for the onslaught of rotten tomatoes.)

Frank




On Sat, Feb 7, 2015 at 11:41 AM, Maloney, Christopher (NIH/NLM/NCBI)
[C] <[hidden email]> wrote:

> Hi,
>
> We've encountered a problem that I suspect is a bug in citeproc-js. I'm attaching the citeproc-json file. Note how there are a lot of authors, some of which have family/given names, and some of which are specified with "literal".
>
> The output that I'm getting has the order of the authors all wrong, for all of the three styles that we're using. It seems that the literal authors are causing the processor to break. The outputs are below (sans some formatting).
>
> Is this a known bug, or is there something I’m missing?
>
>
> american-medical-association:
>
> Vv V, Ww W, Xx X, et al. with Aa A, Bb B, Cc C et al., Literal J, Kk K, Ll L, Mm M et al., Literal U. Stuff and nonsense. My Favorite Journal. 2015;24(2):582-596. doi:10.1234/mfj/1234.
>
> modern-language-association:
>
> Vv, V et al. with Aa, A, B Bb, et al., Literal J and Kk, K, L Ll et al., Literal U. “Stuff and Nonsense.” My Favorite Journal 24.2 (2015): 582–596. PMC. Web. 6 Feb. 2015.
>
> apa:
>
> Vv, V., Ww, W., Xx, X., Yy, Y., Zz, Z., Aaa, A., … Fff, F. with Aa, A., Bb, B., Cc, C., Dd, D., Ee, E., Ff, F., … Ii, I., Literal J and Kk, K., Ll, L., Mm, M., Nn, N., Oo, O., Pp, P., … Tt, T., Literal U. (2015). Stuff and nonsense. My Favorite Journal, 24(2), 582–596. doi:10.1234/mfj/1234
>
> --
> Chris Maloney
> NIH/NLM/NCBI (Contractor)
> Building 45, 4AN36D-12
> 301-594-2842
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> xbiblio-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: citeproc-js bug in handling lists of mixed authors?

Chris Maloney
In reply to this post by Sebastian Karcher
Yes, sorry, I attached the wrong file.  Here is the one that produced the
output I quoted.

--
Chris Maloney
NIH/NLM/NCBI (Contractor)
Building 45, 4AN36D-12
301-594-2842







"Sebastian Karcher" wrote:

>FWIW, while Zotero does import/export single-field authors as literal
>to CSL JSON when using export, it looks like it passes them on to
>citeproc-js just as family with an empty given (or at least that's
>what ends up embeded in documents).
>
>Odd. Maybe Frank can shed light on this.
>
>Though I'm confused about the JSON you attached and the output you're
>getting--I only see 5 authors total (3 regular 2 literal) in the JSON,
>so that couldn't possibly produce what you have.
>
>On Fri, Feb 6, 2015 at 8:41 PM, Maloney, Christopher (NIH/NLM/NCBI)
>[C] <[hidden email]> wrote:
>> Hi,
>>
>> We've encountered a problem that I suspect is a bug in citeproc-js. I'm
>>attaching the citeproc-json file. Note how there are a lot of authors,
>>some of which have family/given names, and some of which are specified
>>with "literal".
>>
>> The output that I'm getting has the order of the authors all wrong, for
>>all of the three styles that we're using. It seems that the literal
>>authors are causing the processor to break. The outputs are below (sans
>>some formatting).
>>
>> Is this a known bug, or is there something I’m missing?
>>
>>
>> american-medical-association:
>>
>> Vv V, Ww W, Xx X, et al. with Aa A, Bb B, Cc C et al., Literal J, Kk K,
>>Ll L, Mm M et al., Literal U. Stuff and nonsense. My Favorite Journal.
>>2015;24(2):582-596. doi:10.1234/mfj/1234.
>>
>> modern-language-association:
>>
>> Vv, V et al. with Aa, A, B Bb, et al., Literal J and Kk, K, L Ll et
>>al., Literal U. “Stuff and Nonsense.” My Favorite Journal 24.2 (2015):
>>582–596. PMC. Web. 6 Feb. 2015.
>>
>> apa:
>>
>> Vv, V., Ww, W., Xx, X., Yy, Y., Zz, Z., Aaa, A., … Fff, F. with Aa, A.,
>>Bb, B., Cc, C., Dd, D., Ee, E., Ff, F., … Ii, I., Literal J and Kk, K.,
>>Ll, L., Mm, M., Nn, N., Oo, O., Pp, P., … Tt, T., Literal U. (2015).
>>Stuff and nonsense. My Favorite Journal, 24(2), 582–596.
>>doi:10.1234/mfj/1234
>>
>> --
>> Chris Maloney
>> NIH/NLM/NCBI (Contractor)
>> Building 45, 4AN36D-12
>> 301-594-2842
>>
>>
>>
>>-------------------------------------------------------------------------
>>-----
>> Dive into the World of Parallel Programming. The Go Parallel Website,
>> sponsored by Intel and developed in partnership with Slashdot Media, is
>>your
>> hub for all things parallel software development, from weekly thought
>> leadership blogs to news, videos, case studies, tutorials and more.
>>Take a
>> look and join the conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> xbiblio-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>>
>
>
>
>--
>Sebastian Karcher, PhD
>Department of Political Science
>Northwestern University
>
>--------------------------------------------------------------------------
>----
>Dive into the World of Parallel Programming. The Go Parallel Website,
>sponsored by Intel and developed in partnership with Slashdot Media, is
>your
>hub for all things parallel software development, from weekly thought
>leadership blogs to news, videos, case studies, tutorials and more. Take a
>look and join the conversation now. http://goparallel.sourceforge.net/
>_______________________________________________
>xbiblio-devel mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/xbiblio-devel

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel

4275071.testcase.json (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: citeproc-js bug in handling lists of mixed authors?

Chris Maloney
Frank,

Thanks for your detailed explanation.

I think we can adjust our output to conform to these conventions. (And,
anyway, I’m out of tomatoes at the moment!)

I created this issue,
https://bitbucket.org/fbennett/citeproc-js/issue/172/please-update-the-cite
proc-js-manual-with, to suggest that you update the citeproc-js manual
with this info — that seems to be the closest thing to a human-readable
description of the schema, and there’s no mention there of this
interpretation of the “literal” values.


--
Chris Maloney
NIH/NLM/NCBI (Contractor)
Building 45, 4AN36D-12
301-594-2842

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: citeproc-js bug in handling lists of mixed authors?

Chris Maloney
Frank,

I read the section that you linked to,
http://citationstylist.org/docs/citeproc-js-csl.html#cs-institution-extensi
on, and I see that it says that this extension is enabled by default. Is
there any way to turn it off? (I’m running citeproc-js via citeproc-java).
I don’t see any mention of how to turn on/off extensions in the
Integrator’s Manual
(http://gsl-nagoya-u.net/http/pub/citeproc-doc.html#instantiation-csl-engin
e).

Thanks!

Chris Maloney

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: citeproc-js bug in handling lists of mixed authors?

fbennett
Chris,

In the current citeproc-js code, the only way of controlling
institution treatment is in the input data. That's not good, and I
would like to fix it (and the documentation) for better control and
clarity.

It's a problem specific to citeproc-js, and I have some questions
about the requirements, so let's take the discussion over to the
citeproc-js issue tracker:

    https://bitbucket.org/fbennett/citeproc-js/issues?status=new&status=open

Frank


On Wed, Feb 11, 2015 at 4:53 AM, Maloney, Christopher (NIH/NLM/NCBI)
[C] <[hidden email]> wrote:

> Frank,
>
> I read the section that you linked to,
> http://citationstylist.org/docs/citeproc-js-csl.html#cs-institution-extensi
> on, and I see that it says that this extension is enabled by default. Is
> there any way to turn it off? (I’m running citeproc-js via citeproc-java).
> I don’t see any mention of how to turn on/off extensions in the
> Integrator’s Manual
> (http://gsl-nagoya-u.net/http/pub/citeproc-doc.html#instantiation-csl-engin
> e).
>
> Thanks!
>
> Chris Maloney
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> xbiblio-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: citeproc-js bug in handling lists of mixed authors?

Chris Maloney
Okay, thanks,
I created #173 - Fix institutional authors jiggery-pokery
https://bitbucket.org/fbennett/citeproc-js/issue/173/fix-institutional-auth
ors-jiggery-pokery

--
Chris Maloney
NIH/NLM/NCBI (Contractor)
Building 45, 4AN36D-12
301-594-2842







"Frank Bennett" wrote:

>Chris,
>
>In the current citeproc-js code, the only way of controlling
>institution treatment is in the input data. That's not good, and I
>would like to fix it (and the documentation) for better control and
>clarity.
>
>It's a problem specific to citeproc-js, and I have some questions
>about the requirements, so let's take the discussion over to the
>citeproc-js issue tracker:
>
>    
>https://bitbucket.org/fbennett/citeproc-js/issues?status=new&status=open
>
>Frank
>
>
>On Wed, Feb 11, 2015 at 4:53 AM, Maloney, Christopher (NIH/NLM/NCBI)
>[C] <[hidden email]> wrote:
>> Frank,
>>
>> I read the section that you linked to,
>>
>>http://citationstylist.org/docs/citeproc-js-csl.html#cs-institution-exten
>>si
>> on, and I see that it says that this extension is enabled by default. Is
>> there any way to turn it off? (I’m running citeproc-js via
>>citeproc-java).
>> I don’t see any mention of how to turn on/off extensions in the
>> Integrator’s Manual
>>
>>(http://gsl-nagoya-u.net/http/pub/citeproc-doc.html#instantiation-csl-eng
>>in
>> e).
>>
>> Thanks!
>>
>> Chris Maloney
>>
>>
>>-------------------------------------------------------------------------
>>-----
>> Dive into the World of Parallel Programming. The Go Parallel Website,
>> sponsored by Intel and developed in partnership with Slashdot Media, is
>>your
>> hub for all things parallel software development, from weekly thought
>> leadership blogs to news, videos, case studies, tutorials and more.
>>Take a
>> look and join the conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> xbiblio-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>
>--------------------------------------------------------------------------
>----
>Dive into the World of Parallel Programming. The Go Parallel Website,
>sponsored by Intel and developed in partnership with Slashdot Media, is
>your
>hub for all things parallel software development, from weekly thought
>leadership blogs to news, videos, case studies, tutorials and more. Take a
>look and join the conversation now. http://goparallel.sourceforge.net/
>_______________________________________________
>xbiblio-devel mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/xbiblio-devel

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Loading...