frederickwang99 commited on
Commit
ad674f8
1 Parent(s): 99ed059

updated readme

Browse files
Files changed (1) hide show
  1. README.md +908 -3
README.md CHANGED
@@ -1,3 +1,908 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+
5
+ # SoAyBench
6
+
7
+ > by WangYC
8
+
9
+ We've based SoAyBench creation on AMiner. To really understand how well LLMs can use SoAPI, we need to make AMiner's basic SoAPIs available for LLMs to use. We also need a test set made up of academic (question, solution, answer) triplets for checking how they're doing. The tricky part is, academic data keeps changing fast – stuff like info on scholars and their publications. So, keeping a test set with fixed answers is tough.
10
+
11
+ To tackle this, what we've done is clone AMiner's SoAPIs as they were at a certain moment (Sep 15th 2023). This way, we've got a static version of the service. From there, we create a matching test set that doesn't change.
12
+
13
+ [toc]
14
+
15
+ ## Dataset Overview
16
+
17
+ You can find 44 jsonl files in SoAyBench.
18
+
19
+ Each of the jsonl file contains 18 lines.
20
+
21
+ Each line is a query-answer data like :
22
+
23
+ ```json
24
+ {
25
+ "Query": "Query in Chinese",
26
+ "Query_en": "Query in English",
27
+ "Answer": "Answer to the Query",
28
+ "Base_Question_zh": "Template query in Chinese",
29
+ "Base_Question_en": "Template query in English",
30
+ "Inputs": "Information which serves as the inputs of the APIs",
31
+ "Outputs": "The key of the answer at the API's response",
32
+ "Entity_Information": "Information that is filled into the template query"
33
+ }
34
+ ```
35
+
36
+ For example:
37
+
38
+ ```json
39
+ {
40
+ "Query": "Mutual Information领域的Jean Barbier的代表作的pdf链接是?",
41
+ "Query_en": "What is the PDF link of the representative work of Jean Barbier in Mutual Information field?",
42
+ "Answer": "//static.aminer.cn/misc/pdf/NIPS/2018/5b3d98cc17c44a510f801b5c.pdf", "Base_Question_zh": "XX领域的XXX的代表作的pdf链接是?",
43
+ "Base_Question_en": "What is the PDF link of the representative work of XXX in XX field?",
44
+ "Inputs": "name, interest",
45
+ "Outputs": "pdf_link",
46
+ "Entity_Information":
47
+ {
48
+ "name": "Jean Barbier",
49
+ "organization": "International Centre for Theoretical Physics",
50
+ "interest": "Mutual Information"
51
+ }
52
+ }
53
+ ```
54
+
55
+ ## How to use AMiner APIs that is included in SoAyBench?
56
+
57
+ In addition to providing a substantial amount of QA data, SoAyBench also includes a set of SoAPI services, encompassing a total of 7 APIs from AMiner. SoAy has filtered and wrapped the input and output of the original APIs into 7 functions.
58
+
59
+ You can find this details in https://github.com/RUCKBReasoning/SoAy/model.py
60
+
61
+ You can try all these APIs with SoAy/api_test.py
62
+
63
+ ```python
64
+ class aminer_soay:
65
+ def __init__(self):
66
+ self.addr = 'https://soay.aminer.cn/'
67
+
68
+ def searchPersonComp(self, **kwargs):
69
+ personList = []
70
+ addr = self.addr + 'searchPerson'
71
+ headers = {
72
+ 'Content-Type' : 'application/json'
73
+ }
74
+ searchKeyWordList = []
75
+ if 'name' in kwargs:
76
+ searchKeyWordList.append({
77
+ "operate": "0",
78
+ "wordType": 4,
79
+ "keyword": kwargs['name'],
80
+ "advanced": True,
81
+ "needTranslate": True
82
+ })
83
+ if 'interest' in kwargs:
84
+ searchKeyWordList.append({
85
+ "operate": "0",
86
+ "wordType": 2,
87
+ "keyword": kwargs['interest'],
88
+ "advanced": True,
89
+ "needTranslate": True
90
+ })
91
+ if 'organization' in kwargs:
92
+ searchKeyWordList.append({
93
+ "operate": "0",
94
+ "wordType": 5,
95
+ "keyword": kwargs['organization'],
96
+ "advanced": True,
97
+ "needTranslate": True
98
+ })
99
+ json_content = json.dumps({
100
+ "sort": [{'asc': False, 'field' : 'n_citation'}],
101
+ "searchKeyWordList": searchKeyWordList,
102
+ "needDetails" : True
103
+ })
104
+ response = requests.post(
105
+ url=addr,
106
+ headers = headers,
107
+ data = json_content
108
+ )
109
+ result = response.json()
110
+ for each in result['data']['hitList']:
111
+ # print(each)
112
+ try:
113
+ personList.append(
114
+ {
115
+ 'person_id' : each['id'],
116
+ 'name' : each['name'],
117
+ 'interests' : [each['interests'][i]['t'] for i in range(min(len(each['interests']), 10))],
118
+ # 'nation': each['nation'],
119
+ 'num_citation' : each['ncitation'],
120
+ 'num_pubs': each['npubs'],
121
+ 'organization' : each['contact']['affiliation']
122
+ }
123
+ )
124
+ except:
125
+ continue
126
+ return personList
127
+
128
+ def searchPublication(self, publication_info):
129
+ addr = self.addr + 'searchPublication'
130
+ pubList = []
131
+ headers = {
132
+ 'Content-Type' : 'application/json'
133
+ }
134
+ json_content = json.dumps({
135
+ "query" : publication_info,
136
+ 'needDetails' : True,
137
+ 'page' : 0,
138
+ 'size' : 10,
139
+ "sort": [{'asc': False, 'field' : 'n_citation'}],
140
+ })
141
+ response = requests.post(
142
+ url=addr,
143
+ headers = headers,
144
+ data = json_content
145
+ )
146
+ result = response.json()
147
+ for each in result['data']['hitList']:
148
+ try:
149
+ pubList.append({
150
+ 'pub_id' : each['id'],
151
+ 'title' : each['title'],
152
+ 'year' : each['year']
153
+ })
154
+ except:
155
+ continue
156
+
157
+ return pubList
158
+
159
+ def getPublication(self, pub_id):
160
+ addr = self.addr + 'getPublication'
161
+ addr = wrapUrlParameter(addr, id = pub_id)
162
+ # addr = addr + '?AppCode=' + self.appcode + '&id=' + id
163
+ response = requests.get(url = addr)
164
+ result = response.json()['data'][0]['pub']
165
+ info_dict = {}
166
+ try:
167
+ info_dict['abstract'] = result['abstract']
168
+ except:
169
+ info_dict['abstract'] = 'paper abstract'
170
+ author_list = []
171
+ for each in result['authors']:
172
+ try:
173
+ author_list.append({'person_id' : each['id'], 'name' : each['name']})
174
+ except:
175
+ continue
176
+ if author_list != []:
177
+ info_dict['author_list'] = author_list
178
+ try:
179
+ info_dict['num_citation'] = result['num_citation']
180
+ except:
181
+ pass
182
+ try:
183
+ info_dict['year'] = result['year']
184
+ except:
185
+ pass
186
+ try:
187
+ info_dict['pdf_link'] = result['pdf']
188
+ except:
189
+ pass
190
+ try:
191
+ info_dict['venue'] = result['venue']
192
+ except:
193
+ pass
194
+ return info_dict
195
+
196
+ def getPersonInterest(self, person_id):
197
+ addr = self.addr + 'getPersonInterest'
198
+ addr = wrapUrlParameter(addr, id = person_id)
199
+ # addr = addr + '?AppCode=' + self.appcode + '&id=' + id
200
+ response = requests.get(url = addr)
201
+ try:
202
+ result = response.json()['data'][0]['data']['data']['data']
203
+ except:
204
+ return []
205
+ interest_list = [result[i]['t'] for i in range(len(result))]
206
+ return interest_list
207
+
208
+ def getCoauthors(self, person_id):
209
+ addr = self.addr + 'getCoauthors'
210
+ addr = wrapUrlParameter(addr, id = person_id)
211
+ response = requests.get(url=addr)
212
+ result = response.json()['data'][0]['data']['crs']
213
+ coauthorsList = []
214
+ for each in result:
215
+ try:
216
+ coauthorsList.append({
217
+ 'person_id' : each['id'],
218
+ 'name' : each['name'],
219
+ 'relation' : each['relation']
220
+ })
221
+ except:
222
+ continue
223
+ # coauthorsList = [{'person_id' : result[i]['id'], 'relation' : result[i]['relation']} for i in range(min(len(result), 10))]
224
+ return coauthorsList
225
+
226
+ def getPersonPubs(self, person_id):
227
+ addr = self.addr + 'getPersonPubs'
228
+ addr = wrapUrlParameter(addr, id = person_id, offset = 0, size = 10, order = 'citation')
229
+ response = requests.get(url=addr)
230
+ result = response.json()['data'][0]['data']['pubs']
231
+ pub_list = []
232
+ for each in result:
233
+ try:
234
+ pub_list.append({
235
+ # 'abstract' : result[i]['abstract'],
236
+ 'pub_id' : each['id'],
237
+ 'title' : each['title'],
238
+ 'num_citation' : each['ncitation'],
239
+ 'year' : each['year'],
240
+ 'authors_name_list' : [each['authors'][j]['name']for j in range(len(each['authors']))]
241
+ })
242
+ except:
243
+ continue
244
+ return pub_list
245
+
246
+ def getPersonBasicInfo(self, person_id):
247
+ addr = self.addr + 'getPersonBasicInfo'
248
+ addr = wrapUrlParameter(addr, id = person_id)
249
+
250
+ response = requests.get(url=addr)
251
+ result = response.json()['data'][0]['data']
252
+ # print(response)
253
+ info_dic = {
254
+ 'person_id' : person_id,
255
+ 'name' : result['name'],
256
+ 'gender' : result['gender'],
257
+ 'organization' : result['aff'],
258
+ 'position' : result['position'],
259
+ 'bio' : result['bio'],
260
+ 'education_experience' : result['edu'],
261
+ 'email' : result['email']
262
+ # 'ncitation' : result['num_citation']
263
+ }
264
+ return info_dic
265
+
266
+ ```
267
+
268
+ ## Original Service
269
+
270
+ We list all the original AMiner APIs below, which you can use to create new applications.
271
+
272
+ ### searchPerson
273
+
274
+ #### Information
275
+
276
+ **Path:** /soay.aminer.cn/searchPerson
277
+
278
+ **Method:** POST
279
+
280
+ **Description:**
281
+
282
+ Examples:
283
+ 1.Basic Searching
284
+
285
+ ```
286
+ {
287
+ "query": "jiawei han",
288
+ "needDetails": true,
289
+ "page": 0,
290
+ "size": 10
291
+ }
292
+ ```
293
+
294
+ 2.Complecated Searching
295
+
296
+ ```
297
+ {
298
+ "searchKeyWordList": [
299
+ {
300
+ "operate": "0",
301
+ "wordType": 5,
302
+ "keyword": "University of Illinois at Urbanan",
303
+ "advanced": true
304
+ },
305
+ {
306
+ "operate": "0",
307
+ "wordType": 4,
308
+ "keyword": "jiawei han",
309
+ "advanced": true
310
+ }
311
+ ],
312
+ "filters": [
313
+ {
314
+ "boolOperator": "3",
315
+ "type": "term",
316
+ "field": "gender",
317
+ "value": "male"
318
+ }
319
+ ],
320
+ "page": 0,
321
+ "size": 10,
322
+ "needDetails": true,
323
+ "aggregations": [
324
+ {
325
+ "field": "gender",
326
+ "type": "terms",
327
+ "size": 2
328
+ },
329
+ {
330
+ "field": "nation",
331
+ "type": "terms",
332
+ "size": 10
333
+ },
334
+ {
335
+ "field": "lang",
336
+ "type": "terms",
337
+ "size": 10
338
+ },
339
+ {
340
+ "field": "h_index",
341
+ "type": "range",
342
+ "rangeList": [
343
+ {
344
+ "from": 0,
345
+ "to": 10
346
+ },
347
+ {
348
+ "from": 11,
349
+ "to": 20
350
+ },
351
+ {
352
+ "from": 21,
353
+ "to": 30
354
+ },
355
+ {
356
+ "from": 31,
357
+ "to": 40
358
+ },
359
+ {
360
+ "from": 41,
361
+ "to": 50
362
+ },
363
+ {
364
+ "from": 51,
365
+ "to": 60
366
+ },
367
+ {
368
+ "from": 61,
369
+ "to": 99999
370
+ }
371
+ ],
372
+ "size": 1
373
+ }
374
+ ]
375
+ }
376
+ ```
377
+
378
+ #### Parameters
379
+
380
+ **Headers**
381
+
382
+ | Name | Value | Necessary | Example | Note |
383
+ | ------------ | ---------------- | --------- | ------- | ---- |
384
+ | Content-Type | application/json | Y | | |
385
+
386
+ **Body**
387
+
388
+ | Name | Type | Necessary | Default | Note | Others |
389
+ | --------------------- | --------- | --------- | ------- | ------------------------------------------------------------ | ----------------- |
390
+ | aggregations | object [] | N | | 聚合配置 | item type: object |
391
+ | ├─ field | string | N | | 属性: h_index-h指数; lang-语言; nation-国家和地区; gender-性别; | |
392
+ | ├─ order | object | N | | 聚合排序参数(termstype,filed不为_key及_count时为要排序的子聚合的路径) | |
393
+ | ├─ asc | boolean | Y | | 升序排序 | |
394
+ | ├─ field | string | Y | | 字段 | |
395
+ | ├─ rangeList | object [] | N | | 分段列表(rangtype) | item type: object |
396
+ | ├─ from | number | N | | 起始,gte | |
397
+ | ├─ to | number | N | | 截止,lte | |
398
+ | ├─ size | number | N | | 聚合结果大小(termstype) | |
399
+ | ├─ subAggregationList | object [] | N | | 子聚合参数列表 | item type: object |
400
+ | ├─ type | string | N | | type(terms,range,max,min,avg) | |
401
+ | filters | object [] | N | | 过滤配置 | item type: object |
402
+ | ├─ boolOperator | number | N | | bool操作type: 0-must;(参与分数计算,如无特殊需求,不推荐使用) 1-should; 2-mustNot; 3-filter;(不参与分数计算,推荐) | |
403
+ | ├─ field | string | N | | 过滤字段: h_index-h指数; lang-语言; nation-国家和地区; gender-性别; | |
404
+ | ├─ rangeOperator | string | N | | 判断符(rangetype使用:gt-大于;gte-大于等于;lt-小于;lte-小于等于;eq-等于) | |
405
+ | ├─ type | string | N | | type: term-关键词过滤; terms-多关键词过滤; range-数值范围过滤; | |
406
+ | ├─ value | object | N | | 过滤值 | |
407
+ | ├─ valueList | string [] | N | | 多关键词过滤列表(termstype使用) | item type: string |
408
+ | ├─ | | N | | | |
409
+ | needDetails | boolean | N | | 查询属性 | |
410
+ | page | number | N | | 分页(起始页为0) | |
411
+ | query | string | N | | 通用查询词 | |
412
+ | searchKeyWordList | object [] | N | | 高级搜索词列表 | item type: object |
413
+ | ├─ advanced | boolean | N | | 是否高级搜索 | |
414
+ | ├─ fieldMap | object | N | | 字段映射及字段权重(如无特殊需求,参数请勿添加此字段) | |
415
+ | ├─ keyword | string | Y | | 关键词 | |
416
+ | ├─ language | number | N | | 词语言(如无特殊需求,参数请勿添加此字段) | |
417
+ | ├─ needTranslate | boolean | N | | 是否翻译(非必填,默认为false) | |
418
+ | ├─ operate | number | Y | | 搜索运算type: 0-并且; 1-或者; 2-且非; | |
419
+ | ├─ segmentationWord | boolean | N | | 是否分词(非必填,默认为false) | |
420
+ | ├─ userInput | boolean | N | | 是否用户输入(非必填,默认为true) | |
421
+ | ├─ weight | number | N | | 词权重(如无特殊需求,参数请勿添加此字段) | |
422
+ | ├─ wordType | number | Y | | 词type: 0-术语; 4-作者; 5-组织; | |
423
+ | size | number | Y | | 页长(最小为1) | |
424
+ | sort | object [] | N | | 排序 | item type: object |
425
+ | ├─ asc | boolean | Y | | 升序排序 | |
426
+ | ├─ field | string | Y | | 字段: h_index-h指数; activity-学术活跃度; rising_star-领域新星; n_citation-引用数; n_pubs-论文数; | |
427
+
428
+ #### Return
429
+
430
+ | name | type | necessary | default | notes | Other Information |
431
+ | ----------------- | --------- | --------- | ------- | ------------------------------------------------------------ | ----------------- |
432
+ | code | number | Y | | 错误码 | |
433
+ | success | boolean | Y | | 接口成功信息 | |
434
+ | data | object | Y | | Return | |
435
+ | ├─ hitList | object [] | N | | 命中列表 | item type: object |
436
+ | ├─ id | string | Y | | id | |
437
+ | ├─ name | string | N | | 英文姓名 | |
438
+ | ├─ nameZh | string | N | | 中文姓名 | |
439
+ | ├─ gender | string | N | | 性别 | |
440
+ | ├─ org | string | N | | 组织 | |
441
+ | ├─ orgZh | string | N | | 中文组织 | |
442
+ | ├─ interests | string [] | N | | 研究兴趣 | item type: string |
443
+ | ├─ | | N | | | |
444
+ | ├─ avatar | string | N | | 头像 | |
445
+ | ├─ language | string | N | | 语言( "chinese" "english" "french" "german" "greek" "japanese" "unknown" "korean" "indian" "hindi" "italian" "spanish" "dutch" "russian" "swedish" "arabic" "portuguese" "hebrew" "bengali" "turkish") | |
446
+ | ├─ location | string | N | | | |
447
+ | ├─ nation | string | N | | 国家或地区 | |
448
+ | ├─ activity | number | N | | | |
449
+ | ├─ contact | object | N | | 人为标注信息 | |
450
+ | ├─ gindex | number | N | | | |
451
+ | ├─ hindex | number | N | | | |
452
+ | ├─ npubs | number | N | | 论文数 | |
453
+ | ├─ ncitation | number | N | | 引用数 | |
454
+ | ├─ hitsTotal | number | N | | 命中数 | |
455
+ | ├─ aggregationMap | object | N | | 聚合信息 | |
456
+ | msg | string | Y | | 接口成功说明 | |
457
+
458
+ ### searchPublication
459
+
460
+ #### Information
461
+
462
+ **Path:** /soay.aminer.cn/searchPublication
463
+
464
+ **Method:** POST
465
+
466
+ **Description:**
467
+
468
+ Examples:
469
+ 1.Basic Searching
470
+
471
+ ```
472
+ {
473
+ "query": "data mining",
474
+ "needDetails": true,
475
+ "page": 0,
476
+ "size": 10
477
+ }
478
+ ```
479
+
480
+ 2.Complecated Searching
481
+
482
+ ```
483
+ {
484
+ "needDetails": true,
485
+ "page": 0,
486
+ "size": 20,
487
+ "aggregations": [
488
+ {
489
+ "field": "keywords.keyword",
490
+ "size": 20,
491
+ "type": "terms"
492
+ },
493
+ {
494
+ "field": "authors.orgid",
495
+ "size": 20,
496
+ "type": "terms"
497
+ },
498
+ {
499
+ "field": "year",
500
+ "size": 100,
501
+ "type": "terms"
502
+ }
503
+ ],
504
+ "filters": [
505
+ {
506
+ "boolOperator": 3,
507
+ "type": "term",
508
+ "value": "data structure",
509
+ "field": "keywords.keyword"
510
+ }
511
+ ],
512
+ "searchKeyWordList": [
513
+ {
514
+ "advanced": true,
515
+ "keyword": "jiawei han",
516
+ "operate": "0",
517
+ "wordType": 4
518
+ },
519
+ {
520
+ "advanced": true,
521
+ "keyword": "Mining frequent patterns without candidate generation",
522
+ "operate": "0",
523
+ "wordType": 1
524
+ }
525
+ ]
526
+ }
527
+ ```
528
+
529
+ #### Parameters
530
+
531
+ **Headers**
532
+
533
+ | name | 参数值 | necessary | examples | notes |
534
+ | ------------ | ---------------- | --------- | -------- | ----- |
535
+ | Content-Type | application/json | Y | | |
536
+
537
+ **Body**
538
+
539
+ | name | type | necessary | default | notes | Other Information |
540
+ | --------------------- | --------- | --------- | ------- | ------------------------------------------------------------ | ----------------- |
541
+ | aggregations | object [] | N | | 聚合配置 | item type: object |
542
+ | ├─ field | string | N | | 属性: keywords.keyword-关键词; authors.orgid-作者机构id; year-发表年份; | |
543
+ | ├─ order | object | N | | 聚合排序参数(termstype,filed不为_key及_count时为要排序的子聚合的路径) | |
544
+ | ├─ asc | boolean | Y | | 升序排序 | |
545
+ | ├─ field | string | Y | | 字段 | |
546
+ | ├─ rangeList | object [] | N | | 分段列表(rangtype) | item type: object |
547
+ | ├─ from | number | N | | 起始,gte | |
548
+ | ├─ to | number | N | | 截止,lte | |
549
+ | ├─ size | number | N | | 聚合结果大小(termstype) | |
550
+ | ├─ subAggregationList | object [] | N | | 子聚合参数列表 | item type: object |
551
+ | ├─ type | string | N | | type(terms,range,max,min,avg) | |
552
+ | filters | object [] | N | | 过滤配置 | item type: object |
553
+ | ├─ boolOperator | number | N | | bool操作type: 0-must;(参与分数计算,且与should互斥,如无特殊需求,不推荐使用) 1-should; 2-mustNot; 3-filter;(不参与分数计算,推荐) | |
554
+ | ├─ field | string | N | | 过滤字段: keywords.keyword-关键词; authors.orgid-作者机构id; year-发表年份; | |
555
+ | ├─ rangeOperator | string | N | | 判断符(rangetype使用:gt-大于;gte-大于等于;lt-小于;lte-小于等于;eq-等于) | |
556
+ | ├─ type | string | N | | type: term-关键词过滤; terms-多关键词过滤; range-数值范围过滤; | |
557
+ | ├─ value | object | N | | 过滤值 | |
558
+ | ├─ valueList | string [] | N | | 多关键词过滤列表(termstype使用) | item type: string |
559
+ | ├─ | | N | | | |
560
+ | needDetails | boolean | N | | 查询属性 | |
561
+ | page | number | Y | | 分页(起始页为0) | |
562
+ | query | string | N | | 通用查询词 | |
563
+ | searchKeyWordList | object [] | N | | 高级搜索词列表 | item type: object |
564
+ | ├─ advanced | boolean | N | | 是否高级搜索 | |
565
+ | ├─ fieldMap | object | N | | 字段映射及字段权重(如无特殊需求,参数请勿添加此字段) | |
566
+ | ├─ keyword | string | Y | | 关键词 | |
567
+ | ├─ language | number | N | | 词语言(如无特殊需求,参数请勿添加此字段) | |
568
+ | ├─ needTranslate | boolean | N | | 是否翻译(非必填,默认为false) | |
569
+ | ├─ operate | number | Y | | 搜索运算type: 0-并且; 1-或者; 2-且非; | |
570
+ | ├─ segmentationWord | boolean | N | | 是否分词(非必填,默认为false) | |
571
+ | ├─ userInput | boolean | N | | 是否用户输入(非必填,默认为true) | |
572
+ | ├─ weight | number | N | | 词权重(如无特殊需求,参数请勿添加此字段) | |
573
+ | ├─ wordType | number | Y | | 词type: 0-术语; 1-标题; 2-关键词; 3-摘要; 4-作者; 5-组织; 6-期刊; | |
574
+ | size | number | Y | | 页长(最小为1) | |
575
+ | sort | object [] | N | | 排序 | item type: object |
576
+ | ├─ asc | boolean | Y | | 升序排序 | |
577
+ | ├─ field | string | Y | | 字段: year-发表年份; n_citation-引用数; | |
578
+
579
+ #### Return
580
+
581
+ | name | type | necessary | default | notes | Other Information |
582
+ | ----------------- | --------- | --------- | ------- | ---------------------- | ----------------- |
583
+ | code | number | Y | | 错误码 | |
584
+ | success | boolean | Y | | 接口成功信息 | |
585
+ | data | object | Y | | Return | |
586
+ | ├─ hitList | object [] | N | | 结果列表 | item type: object |
587
+ | ├─ id | string | Y | | | |
588
+ | ├─ title | string | N | | 论文标题 | |
589
+ | ├─ titleZh | string | N | | 中文标题 | |
590
+ | ├─ authors | string [] | N | | 作者 | item type: string |
591
+ | ├─ | | N | | | |
592
+ | ├─ language | string | N | | 语言 | |
593
+ | ├─ year | number | N | | 发表年份 | |
594
+ | ├─ pdf | string | N | | | |
595
+ | ├─ doi | string | N | | | |
596
+ | ├─ issn | string | N | | | |
597
+ | ├─ isbn | string | N | | | |
598
+ | ├─ pubAbstract | string | N | | 摘要 | |
599
+ | ├─ pubAbstractZh | string | N | | 中文摘要 | |
600
+ | ├─ url | string [] | N | | | item type: string |
601
+ | ├─ | | N | | | |
602
+ | ├─ keywords | string [] | N | | 关键词 | item type: string |
603
+ | ├─ | | N | | | |
604
+ | ├─ keywordsZh | string [] | N | | 中文关键词 | item type: string |
605
+ | ├─ | | N | | | |
606
+ | ├─ venue | object | N | | 期刊 | |
607
+ | ├─ _id | string | N | | 期刊id | |
608
+ | ├─ raw | string | N | | 期刊name | |
609
+ | ├─ pageStart | string | N | | 起始页 | |
610
+ | ├─ pageEnd | string | N | | 截止页 | |
611
+ | ├─ pageString | string | N | | 起始页截止页字符串表示 | |
612
+ | ├─ volume | string | N | | 期刊卷册号 | |
613
+ | ├─ createDate | string | N | | | |
614
+ | ├─ ncitation | number | N | | 引用量 | |
615
+ | ├─ hitsTotal | number | N | | 命中数量 | |
616
+ | ├─ aggregationMap | object | N | | 聚合信息 | |
617
+ | msg | string | Y | | 接口成功信息 | |
618
+
619
+ ### getPublication
620
+
621
+ #### Information
622
+
623
+ **Path:** /soay.aminer.cn/getPublication
624
+
625
+ **Method:** GET
626
+
627
+ **Description:**
628
+
629
+ #### Parameters
630
+
631
+ **Query**
632
+
633
+ | name | necessary | examples | notes |
634
+ | ---- | --------- | -------- | ----- |
635
+ | id | 是 | | |
636
+
637
+ #### Return
638
+
639
+ | name | type | necessary | default | notes | Other Information |
640
+ | --------------- | --------- | --------- | ------- | ------------------------ | ----------------- |
641
+ | data | object [] | N | | | item type: object |
642
+ | ├─ cited_pubs | object | N | | | |
643
+ | ├─ total | number | N | | | |
644
+ | ├─ meta | object | N | | | |
645
+ | ├─ context | string | N | | | |
646
+ | ├─ time | string | N | | | |
647
+ | ├─ times | object [] | N | | | item type: object |
648
+ | ├─ d | number | N | | | |
649
+ | ├─ n | string | N | | | |
650
+ | ├─ s | string | N | | | |
651
+ | ├─ pub | object | N | | | |
652
+ | ├─ abstract | string | N | | 摘要 | |
653
+ | ├─ authors | object [] | N | | 作者列表 | item type: object |
654
+ | ├─ name | string | Y | | 作者姓名 | |
655
+ | ├─ id | string | N | | 作者id | |
656
+ | ├─ org | string | N | | 作者机构 | |
657
+ | ├─ orgid | string | N | | 机构id | |
658
+ | ├─ orgs | string [] | N | | | item type: string |
659
+ | ├─ | | N | | | |
660
+ | ├─ create_time | string | N | | | |
661
+ | ├─ doi | string | N | | | |
662
+ | ├─ hashs | object | N | | | |
663
+ | ├─ h1 | string | N | | | |
664
+ | ├─ h3 | string | N | | | |
665
+ | ├─ id | string | Y | | | |
666
+ | ├─ issn | string | N | | | |
667
+ | ├─ keywords | string [] | N | | 关键词 | item type: string |
668
+ | ├─ | | N | | | |
669
+ | ├─ lang | string | N | | 语言 | |
670
+ | ├─ num_citation | number | N | | 引用量 | |
671
+ | ├─ pages | object | N | | 发表期刊所在页码 | |
672
+ | ├─ end | string | N | | | |
673
+ | ├─ start | string | N | | | |
674
+ | ├─ title | string | Y | | 论文标题 | |
675
+ | ├─ pdf | string | N | | pdf文件链接 | |
676
+ | ├─ update_times | object | N | | | |
677
+ | ├─ u_v_t | string | N | | | |
678
+ | ├─ u_a_t | string | N | | | |
679
+ | ├─ u_c_t | string | N | | 创建时间 | |
680
+ | ├─ urls | string [] | N | | 原文url | item type: string |
681
+ | ├─ | | N | | | |
682
+ | ├─ venue | object | N | | 期刊信息(未对齐实体信息) | |
683
+ | ├─ info | object | N | | | |
684
+ | ├─ name | string | N | | | |
685
+ | ├─ issue | string | N | | | |
686
+ | ├─ volume | string | N | | | |
687
+ | ├─ venue_hhb_id | string | N | | 期刊id | |
688
+ | ├─ versions | object [] | N | | 合并版本信息 | item type: object |
689
+ | ├─ id | string | N | | | |
690
+ | ├─ sid | string | N | | | |
691
+ | ├─ src | string | N | | | |
692
+ | ├─ vsid | string | N | | | |
693
+ | ├─ year | number | N | | | |
694
+ | ├─ year | number | N | | 发表年份 | |
695
+ | ├─ succeed | boolean | N | | | |
696
+ | ├─ total_ref | number | N | | | |
697
+ | ├─ total_sim | number | N | | | |
698
+
699
+ ### getPersonBasicInfo
700
+
701
+ #### Information
702
+
703
+ **Path:** /soay.aminer.cn/getPersonBasicInfo
704
+
705
+ **Method:** GET
706
+
707
+ **Description:**
708
+
709
+ 学者个人基础信息
710
+
711
+ #### Parameters
712
+
713
+ **Query**
714
+
715
+ | name | necessary | examples | notes |
716
+ | ---- | --------- | -------- | ------ |
717
+ | id | Y | | 学者ID |
718
+
719
+ #### Return
720
+
721
+ | name | type | necessary | default | notes | Other Information |
722
+ | -------------------------- | --------- | --------- | ------- | ------------------------------------ | ----------------- |
723
+ | data | object [] | N | | | item type: object |
724
+ | ├─ data | object | N | | | |
725
+ | ├─ aff | string | N | | 机构 | |
726
+ | ├─ aff_details | object | N | | 机构信息 | |
727
+ | ├─ id | string | N | | 机构ID | |
728
+ | ├─ name_en | string | N | | 机构英文name | |
729
+ | ├─ name_zh | string | N | | 机构中文name | |
730
+ | ├─ aff_zh | string | N | | 机构(中文) | |
731
+ | ├─ bio | string | N | | 个人简介 | |
732
+ | ├─ edu | string | N | | 教育经历 | |
733
+ | ├─ email | string | N | | 邮箱 | |
734
+ | ├─ first_paper_time | number | N | | 第一篇论文时间 | |
735
+ | ├─ gender | string | N | | 性别 | |
736
+ | ├─ geo_info | object | N | | 流动信息 | |
737
+ | ├─ administrative_division | object | N | | | |
738
+ | ├─ country | string | N | | | |
739
+ | ├─ en0 | string | N | | | |
740
+ | ├─ en1 | string | N | | | |
741
+ | ├─ en2 | string | N | | | |
742
+ | ├─ formatted_address | string | N | | | |
743
+ | ├─ geo | object | N | | | |
744
+ | ├─ lat | number | N | | | |
745
+ | ├─ lng | number | N | | | |
746
+ | ├─ id | string | N | | | |
747
+ | ├─ name | string | N | | | |
748
+ | ├─ org_id | string | N | | | |
749
+ | ├─ homepage | string | N | | 个人主页 | |
750
+ | ├─ id | string | N | | | |
751
+ | ├─ labels | string [] | N | | 标签 | item type: string |
752
+ | ├─ | | N | | | |
753
+ | ├─ language | string | N | | 语言 | |
754
+ | ├─ links | object | N | | 个人主页链接 | |
755
+ | ├─ gs | object | N | | GoogleScholar个人主页 | |
756
+ | ├─ creator | string | N | | 标注人员 | |
757
+ | ├─ id | string | N | | | |
758
+ | ├─ type | string | N | | 连接type | |
759
+ | ├─ url | string | N | | 个人主页url | |
760
+ | ├─ resource | object | N | | | |
761
+ | ├─ resource_link | object [] | N | | 个人主页链接 | item type: object |
762
+ | ├─ id | string | N | | 连接type:hp(个人主页),dblp(dblp主页) | |
763
+ | ├─ url | string | N | | 主页连接 | |
764
+ | ├─ name | string | N | | 姓名 | |
765
+ | ├─ name_zh | string | N | | 中文姓名 | |
766
+ | ├─ position | string | N | | 职称 | |
767
+ | ├─ position_zh | string | N | | 职称(中文) | |
768
+ | ├─ work_details | object | N | | 工作经历 | |
769
+ | ├─ id | string | N | | | |
770
+ | ├─ name_en | string | N | | | |
771
+ | ├─ name_zh | string | N | | | |
772
+ | ├─ works | string | N | | 工作经历 | |
773
+ | ├─ meta | object | N | | | |
774
+ | ├─ context | string | N | | | |
775
+ | ├─ time | string | N | | | |
776
+ | ├─ succeed | boolean | N | | | |
777
+
778
+ ### getPersonlnterest
779
+
780
+ #### Information
781
+
782
+ **Path:** /soay.aminer.cn/getPersonlnterest
783
+
784
+ **Method:** GET
785
+
786
+ #### Parameters
787
+
788
+ **Query**
789
+
790
+ | name | necessary | examples | notes |
791
+ | ------- | --------- | ------------------------ | ---------- |
792
+ | id | Y | 53f46a3edabfaee43ed05f08 | 学者id |
793
+ | is_year | N | true | 按年份分组 |
794
+
795
+ #### Return
796
+
797
+ | name | type | necessary | default | notes | Other Information |
798
+ | ---------- | --------- | --------- | ------- | ---------- | ----------------- |
799
+ | data | object [] | N | | | item type: object |
800
+ | ├─ data | object | N | | | |
801
+ | ├─ data | object | N | | | |
802
+ | ├─ data | object [] | N | | | item type: object |
803
+ | ├─ n | number | Y | | 兴趣程度 | |
804
+ | ├─ t | string | Y | | 领域关键词 | |
805
+ | ├─ year | array [] | Y | | 年份 | item type: array |
806
+ | ├─ | | N | | | |
807
+ | ├─ | | N | | | |
808
+ | ├─ edited | boolean | N | | | |
809
+ | ├─ num | number | N | | | |
810
+ | ├─ succeed | boolean | N | | | |
811
+ | ├─ meta | object | N | | | |
812
+ | ├─ context | string | N | | | |
813
+ | ├─ time | string | N | | | |
814
+ | ├─ succeed | boolean | N | | | |
815
+
816
+ ### getCoauthors
817
+
818
+ #### Information
819
+
820
+ **Path:** /soay.aminer.cn/getCoauthors
821
+
822
+ **Method:** GET
823
+
824
+ **Description:**
825
+
826
+ 学者网络关系
827
+
828
+ #### Parameters
829
+
830
+ **Query**
831
+
832
+ | name | necessary | examples | notes |
833
+ | ---- | --------- | -------- | ------ |
834
+ | id | 是 | | 学者ID |
835
+
836
+ #### Return
837
+
838
+ | name | type | necessary | default | notes | Other Information |
839
+ | ----------- | --------- | --------- | ------- | ---------------- | ----------------- |
840
+ | data | object [] | N | | | item type: object |
841
+ | ├─ data | object | N | | | |
842
+ | ├─ crs | object [] | N | | 关联学者列表 | item type: object |
843
+ | ├─ id | string | Y | | | |
844
+ | ├─ name | string | Y | | 姓名 | |
845
+ | ├─ relation | string | Y | | 学者关系 | |
846
+ | ├─ w | number | Y | | 关系紧密度 | |
847
+ | ├─ id | string | N | | | |
848
+ | ├─ name | string | N | | 学者姓名 | |
849
+ | ├─ name_zh | string | N | | 学者姓名(中文) | |
850
+ | ├─ meta | object | N | | | |
851
+ | ├─ context | string | N | | | |
852
+ | ├─ time | string | N | | | |
853
+ | ├─ succeed | boolean | N | | | |
854
+
855
+ ### getPersonPubs
856
+
857
+ #### Information
858
+
859
+ **Path:** /soay.aminer.cn/getPersonPubs
860
+
861
+ **Method:** GET
862
+
863
+ **Description:**
864
+
865
+ 学者论文信息
866
+
867
+ #### Parameters
868
+
869
+ **Query**
870
+
871
+ | name | necessary | examples | notes |
872
+ | ------ | --------- | -------- | ---------------------------------------------- |
873
+ | id | Y | | 学者id |
874
+ | offset | Y | | 偏移量 |
875
+ | size | Y | | 每次获取条目数量 |
876
+ | order | N | citation | 排序方式,支持year和citation,未传默认为year, |
877
+
878
+ #### Return
879
+
880
+ | name | type | necessary | default | notes | Other Information |
881
+ | -------------- | --------- | --------- | ------- | ------------ | ----------------- |
882
+ | data | object [] | N | | | item type: object |
883
+ | ├─ data | object | N | | | |
884
+ | ├─ gindex | number | N | | g-index | |
885
+ | ├─ hindex | number | N | | h-index | |
886
+ | ├─ id | string | N | | | |
887
+ | ├─ name | string | N | | 姓名 | |
888
+ | ├─ name_zh | string | N | | 姓名(中文) | |
889
+ | ├─ ncitation | number | N | | 论文引用量 | |
890
+ | ├─ npubs | number | N | | 论文数 | |
891
+ | ├─ pubs | object [] | N | | 论文列表 | item type: object |
892
+ | ├─ abstract | string | Y | | 摘要 | |
893
+ | ├─ id | string | Y | | | |
894
+ | ├─ link | string [] | Y | | | item type: string |
895
+ | ├─ | | N | | | |
896
+ | ├─ ncitation | number | Y | | 引用量 | |
897
+ | ├─ title | string | Y | | 标题 | |
898
+ | ├─ venue | string | Y | | 期刊 | |
899
+ | ├─ year | number | Y | | 年份 | |
900
+ | ├─ source_link | object [] | Y | | | item type: object |
901
+ | ├─ desc | string | Y | | | |
902
+ | ├─ link | string | Y | | | |
903
+ | ├─ peek | string | Y | | | |
904
+ | ├─ meta | object | N | | | |
905
+ | ├─ context | string | N | | | |
906
+ | ├─ time | string | N | | | |
907
+ | ├─ succeed | boolean | N | | | |
908
+