Pubmed translator

I'm a new Zotero user and have migrated my exisiting database (over 4000 references)from Reference Manager. I mainly use zotero to import references from Pubmed along with PDFs, whenever available. The implementation of this feature in Zotero is far superior to the clumsy way in which RefMan managed this. Sincere thanks to all of the developers!

My question concerns the Pubmed translator. I've noticed that the full name of authors is captured as opposed to initials only (first and middle). My imported database only used initials. As a result, it becomes difficult to search within my database for publications by specific authors without having to make multiples attempt using several variants (eg Johnson M.J. vs Johnson Mark J). Is there a way to customize the author info captured by the Pubmed translator so as to avoid importing full names?

Any suggestions would be greatly appreciated.
  • First, I don't think this is a good idea, but...

    Technically you can customize the translator yourself. PubMed does serve initials along with full names, so this would not be too hard. You can find the translator in your Zotero data directory (NCBI PubMed). You would have to change line 201 by changing 'FirstName' inside ZU.xpathText to 'Initials'.

    You can see a sample file that Zotero is parsing here. You may also want to split the initials up, since the letters are joined together.

    If you end up modifying the translator you will want to change the translatorID (top of file) to another unique string, change priority to a lower value, and change the file name.

    Having said that, this would only be helpful if you are looking for authors using a quoted string. I.e.
    "M. J. Johnson"
    Otherwise the initials will be matching any single letter within the record. Furthermore for searches, if you quote the query string, first names come before last. Lastly, if you do quote the string, it will be sensitive to spaces and periods between/after initials.
  • Thanks for the quick response. The suggested change worked perfectly. One aditional question; how can I have the initials followed by a period (eg M.J. Johnson).

    I understand your concern, however when I limit my search to "title,creator,year", the use of initials is most effective in my hands. I have tried quoted strings, but have found that there is no advantage to this. Also, each and every one of my author entries is split (i.e. one entry: Johnson; the other: M.J.), as opposed to the Last name and initials being in a single field. Perhaps this is why I can get away without the use of quoted strings? Lastly, in my hands, initials do not pick up any single letter within the record.
  • One aditional question; how can I have the initials followed by a period (eg M.J. Johnson).
    that's a bit more involved. So far, you have just changed which field of the pubmed record Zotero parses. Adding the periods requires you to manually change the input. The idea would be to run a .replace(/([A-Z])/, "$1. ") on the first name field of the record.
    What's your level of comfort with javascript?
  • This has been my first experience in touching anything related to javascrip, so comfort level = uncomfortable. In other words, though I appreciate your suggestion, I haven't slightest clue on how to implement this change. Could the I'm suggesting be of broader interest? In truth, full first names are never used for bibliographic journal styles in my field (neuroscience), only initials are listed.
  • Please reconsider your needs. For example, what if you have an article by John Adam Smith, and Jane Alice Smith and other articles with each of them listed individually among a group of authors? How would you know which author to cite or how best to disambiguate the names? While the journals may only want authors' family names with initials, it is possible to have a Zotero database with full author information and the output to your manuscript as family name and initials. Also, depending upon the citation style, Zotero can provide initials that are punctuated or not.

    That doesn't solve your problem of complex search strategies. I believe that you should consider searching your Zotero db by author last name and select the articles you need from that less-specific search. There will be a longer list to examine but you will be less likely to overlook an article of importance. Further, I've found that many times (using your Mark James Johnson example) the PubMed record will contain only the family name and _one_ initial, M. Johnson. This is the case even when on the journal page the author's name is listed as Mark James Johnson. LWW is particularly guilty of sending abbreviated metadata to bibliographic services but other publishers also do this.
  • I agree with DWL and we're certainly not going to throw out data on Zotero import, but the point of open source software is that you can tinker with it as you please, so, after
    line 208 add:
    if (firstName){
    firstName = firstName.replace(/([A-Z])/g, "$1. ").trim();
    }


    Obviously I haven't tested this broadly, but in generally this should work.
  • Worked like a charm. Many thanks, I appreciate your time.

    DWL, I agree,at times I have relaxed my search strategies to make sure I'm not missing out. However, in this instance, I was concerned with finding specific entries in my db. I may have found a compromise; the use of a wildcard seems to work quite well in narrowing search results.

    Thanks again
  • edited October 31, 2012
    .
Sign In or Register to comment.