OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Citation extractors have problem with hyphenated first name

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Citation extractors have problem with hyphenated first name

Postby newbies » Tue Feb 18, 2014 11:17 am

If there is an author with a hyphenated first name, citation extractors will discard the part of the name after the hyphen, for example, this name Szu-Chuan Hsieh should appear as Hsieh SC, but the extractors regard Hsieh S as correct.

Original Citation Text:
Sigdel TK, Vitalone MJ, Tran TQ, Dai H, Hsieh SC et al. (2013) A rapid noninvasive assay for the detection of renal transplant injury. Transplantation 96: 97-101.


Citation Export Preview (Vancouver Citation Output):
Sigdel TK, Vitalone MJ, Tran TQ, Dai H, Hsieh S, et al. (2013) A rapid noninvasive assay for the detection of renal transplant injury.. Transplantation 96: 97-101. doi: 10.1097/TP.0b013e318295ee5a. [View Article] [PubMed]


How can I know which extractor may have caused this error and how to fix it?

thank you for your attention to this glitch.
newbies
 
Posts: 84
Joined: Sat Feb 23, 2013 9:15 pm

Re: Citation extractors have problem with hyphenated first n

Postby asmecher » Tue Feb 18, 2014 12:10 pm

Hi newbies,

The following classes (at least) make assumptions about how to form initials, and are implemented by taking the first letter of the last name:
  • lib/pkp/plugins/citationLookup/pubmed/filter/PubmedNlm30CitationSchemaFilter.inc.php
  • lib/pkp/plugins/metadata/nlm30/filter/Nlm30CitationSchemaOpenurl10CrosswalkFilter.inc.php
  • lib/pkp/plugins/metadata/nlm30/filter/Nlm30NameSchemaPersonStringFilter.inc.php
Look for "String::substr" in each of these files. I'd suggest adding an error_log entry to identify which case in particular you're invoking, and then writing a smarter function to get initials, invoking it from each of the 3 places above instead of duplicating it each time.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8673
Joined: Wed Aug 10, 2005 12:56 pm

Re: Citation extractors have problem with hyphenated first n

Postby newbies » Tue Feb 18, 2014 7:10 pm

Thanks Alec,

I have identified the code in the files you gave, but I am not good at PHP and won't be able to modify.

1st file:
Code: Select all
$givenNames = $firstAuthor->getStatement('given-names');
                  if (is_array($givenNames)) $searchTerms .= ' '.String::substr($givenNames[0], 0, 1);
               } else {
                  $searchTerms .= $citationDescription->getStatement($nlm30Property);
               }

2nd file:
Code: Select all
foreach($givenNames as $givenName) {
               $initials[] = substr($givenName, 0, 1);
            }


3rd file
Code: Select all
foreach($givenNames as $givenName) {
            $nameVars['%initials%'] .= String::substr($givenName, 0, 1).'.';
         }
newbies
 
Posts: 84
Joined: Sat Feb 23, 2013 9:15 pm

Re: Citation extractors have problem with hyphenated first n

Postby newbies » Thu Feb 20, 2014 5:59 pm

Can anyone contribute a snip of php code to deal with hyphenated first name? thank you in advance.
newbies
 
Posts: 84
Joined: Sat Feb 23, 2013 9:15 pm

Re: Citation extractors have problem with hyphenated first n

Postby newbies » Tue Jul 22, 2014 11:43 pm

i still need to modify the code to correct the missing letter in first name. This problem also occurs to citation export.

Here is a piece of code in the citationFormat tpl file

Code: Select all
{$firstName|escape|truncate:1:"":true}


Can anyone help modify the code to allow it to extract first name "Zong-Tong" into "ZT" instead of "Z"?

Thank you.
newbies
 
Posts: 84
Joined: Sat Feb 23, 2013 9:15 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 6 guests