参考文献的作者数变成6
This commit is contained in:
@@ -874,8 +874,8 @@ class Preaccept extends Base
|
||||
|
||||
$title = trim((string)($summary['title'] ?? ''));
|
||||
$jouraRaw = trim((string)($summary['joura'] ?? ''));
|
||||
// 姓全写 + 名首字母,超过 3 个作者取前 3 个 + et al
|
||||
$authorCitation = $svc->getAuthorsCitation($summary['raw'] ?? [], 3);
|
||||
// 姓全写 + 名首字母,作者数超过 6 个才取前 3 个 + et al
|
||||
$authorCitation = $svc->getAuthorsCitation($summary['raw'] ?? []);
|
||||
$dateno = trim((string)($summary['dateno'] ?? ''));
|
||||
$doilink = trim((string)($summary['doilink'] ?? ''));
|
||||
if ($doilink === '') {
|
||||
|
||||
@@ -1005,12 +1005,10 @@ class Production extends Base
|
||||
|
||||
public function prgeAuthor($author)
|
||||
{
|
||||
$a = explode(',', $author);
|
||||
if (count($a) < 7) {
|
||||
return $author . '.';
|
||||
} else {
|
||||
return trim($a[0]) . ', ' . trim($a[1]) . ', ' . trim($a[2]) . ', et al.';
|
||||
}
|
||||
//作者不超过 6 个全部列出,超过则只列前 3 个加 et al
|
||||
$formatted = \app\common\AuthorListFormatter::format($author);
|
||||
|
||||
return $formatted === '' ? '' : rtrim($formatted, '.') . '.';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -82,14 +82,8 @@ class References extends Base
|
||||
if(!empty($aRefer['doilink'])){
|
||||
$sAuthor = empty($aRefer['author']) ? '' : trim(trim($aRefer['author']),'.');
|
||||
if(!empty($sAuthor)){
|
||||
$aAuthor = explode(',', $sAuthor);
|
||||
if(count($aAuthor) > 3){
|
||||
$sAuthor = implode(',', array_slice($aAuthor, 0,3));
|
||||
$sAuthor .= ', et al';
|
||||
}
|
||||
if(count($aAuthor) <= 3 ){
|
||||
$sAuthor = implode(',', $aAuthor);
|
||||
}
|
||||
//作者不超过 6 个全部列出,超过则只列前 3 个加 et al
|
||||
$sAuthor = \app\common\AuthorListFormatter::format($sAuthor);
|
||||
}
|
||||
//文章标题
|
||||
$sTitle = empty($aRefer['title']) ? '' : trim(trim($aRefer['title']),'.');
|
||||
@@ -116,14 +110,8 @@ class References extends Base
|
||||
if($aRefer['refer_type'] == 'book'){
|
||||
$sAuthor = empty($aRefer['author']) ? '' : trim(trim($aRefer['author']),'.');
|
||||
if(!empty($sAuthor)){
|
||||
$aAuthor = explode(',', $sAuthor);
|
||||
if(count($aAuthor) > 3){
|
||||
$sAuthor = implode(',', array_slice($aAuthor, 0,3));
|
||||
$sAuthor .= ', et al';
|
||||
}
|
||||
if(count($aAuthor) <= 3 ){
|
||||
$sAuthor = implode(',', $aAuthor);
|
||||
}
|
||||
//作者不超过 6 个全部列出,超过则只列前 3 个加 et al
|
||||
$sAuthor = \app\common\AuthorListFormatter::format($sAuthor);
|
||||
}
|
||||
//文章标题
|
||||
$sTitle = empty($aRefer['title']) ? '' : trim(trim($aRefer['title']),'.');
|
||||
@@ -1214,7 +1202,7 @@ class References extends Base
|
||||
$sSysMessagePrompt = '请完成以下任务:
|
||||
1. 根据提供的DOI号,查询该文献的AMA引用格式;
|
||||
2. 按照以下规则调整AMA引用格式:
|
||||
- 第三个作者名字后添加 et al.;
|
||||
- 作者不超过6个时全部列出;超过6个时只保留前3个作者,并在第三个作者名字后添加 et al.;
|
||||
- DOI前加上"Available at: ";
|
||||
- DOI信息格式调整为"https://doi.org/+真实DOI"(替换真实DOI为文献实际DOI).
|
||||
3. 严格按照以下JSON结构返回结果,仅返回JSON数据,不要额外文字,包含字段:doilink(url格式)、title(标题)、author(作者数组)、joura(出版社名称)、dateno(年;卷(期):起始页-终止页),is_ai_check(默认1)
|
||||
|
||||
Reference in New Issue
Block a user