简历抽取(英文)服务

简历抽取服务使用示例。

Java代码示例

  1. DefaultProfile defaultProfile = DefaultProfile.getProfile("cn-hangzhou","your-access-key-id","your-access-key-secret");
  2. IAcsClient client = new DefaultAcsClient(defaultProfile);
  3. String content = "Resume Text";
  4. RunPreTrainServiceRequest request = new RunPreTrainServiceRequest();
  5. request.setServiceName("ResumeExtractorEN");
  6. request.setPredictContent(content);
  7. RunPreTrainServiceResponse response = client.getAcsResponse(request);
  8. System.out.println(response.getPredictResult());

Python代码示例

  1. # 安装依赖
  2. pip install aliyun-python-sdk-core
  3. pip install aliyun-python-sdk-nlp-automl
  1. # -*- coding: utf8 -*-
  2. import json
  3. from aliyunsdkcore.client import AcsClient
  4. from aliyunsdkcore.acs_exception.exceptions import ClientException
  5. from aliyunsdkcore.acs_exception.exceptions import ServerException
  6. from aliyunsdknlp_automl.request.v20191111 import RunPreTrainServiceRequest
  7. # Initialize AcsClient instance
  8. client = AcsClient(
  9. "<your-access-key-id>",
  10. "<your-access-key-secret>",
  11. "cn-hangzhou"
  12. );
  13. content = 'Resume Text'
  14. # Initialize a request and set parameters
  15. request = RunPreTrainServiceRequest.RunPreTrainServiceRequest()
  16. request.set_ServiceName('ResumeExtractorEN')
  17. request.set_PredictContent(content)
  18. # Print response
  19. response = client.do_action_with_exception(request)
  20. resp_obj = json.loads(response)
  21. predict_result = json.loads(resp_obj['PredictResult'])
  22. print(predict_result['result'])
说明 调用简历抽取(英文)服务,ServiceName需要传入:ResumeExtractorEN

PredictContent内容示例

  1. John Smith
  2. john.smith@gmail.com / +852 1111 1234
  3. Unit 111, Tower 6A, Century Link, 6 Nanking Street, Tung Chung, Lantau Island, Hong Kong
  4. EMPLOYMENT HISTORY
  5. Aurostyle Limited (International Division, Christian Bernard Group), Hong Kong
  6. June 2010 December 2012
  7. Marketing Manager
  8. o Oversaw marketing activities in the International office of a French jewellery group.
  9. o Worked closely with global marketing team and regional sales team to ensure qualitative
  10. marketing collaterals, trade marketing tools and premiums can be delivered or localized
  11. for POS promotions in international regions including China, Middle East and North
  12. America.
  13. o Drove and contributed to the launch of the jewellery line by French fashion houses, Guy
  14. Laroche and Cacharel, in international regions by leading POS activations, localizing trade
  15. marketing materials and conducting frontline staff trainings.
  16. Waddy Jewellery Group Limited
  17. June 2007 June 2010
  18. Marketing Executive
  19. Marketing Manager
  20. o Oversaw marketing activities in a fine jewellery manufacturer.
  21. o Responsible for the development and maintenance of marketing collaterals, visual
  22. merchandising tools, corporate website and company newsletters
  23. o Successfully facilitated companys participation in over 50 international tradeshows.
  24. EDUCATION
  25. The Hong Kong Polytechnic University, Hong Kong
  26. 2002 - 2004
  27. Masters of Science, Marketing Management
  28. University of British Columbia, Canada
  29. 1996 - 2000
  30. Honours Bachelor of Arts, African Studies
说明 PredictContent参数为简历文本参数。

PredictResult内容示例

说明 PredictResult是JSON字符串,需要反序列化之后进行解析,具体结构如下示例。
  1. {
  2. "result": "{\"Schools\": [{\"School\": \"The Hong Kong Polytechnic University\", \"Degree\": null, \"StartDate\": \"2002-1-1\", \"EndDate\": \"2004-1-1\", \"DegreeCode\": null, \"SchoolDuration\": \"2002 - 2004\"}, {\"School\": \"University of British Columbia\", \"Degree\": \"Masters\", \"StartDate\": \"2000-3-1\", \"EndDate\": null, \"DegreeCode\": \"master\", \"SchoolDuration\": \", Mar\"}, {\"School\": \"University of British Columbia\", \"Degree\": \"Masters\", \"StartDate\": \"2000-3-1\", \"EndDate\": null, \"DegreeCode\": \"master\", \"SchoolDuration\": \", Mar\"}], \"Name\": \"John Smith\", \"Lang\": \"en\", \"Phone\": \"+852 1111 1234\", \"CountryCode\": \"852\", \"RegionalPhone\": \"11111234\", \"FamilyName\": \"Smith\", \"GivenName\": \"John\", \"City\": \"Hong Kong\", \"Email\": \"john.smith@gmail.com\", \"Companies\": [{\"Position\": null, \"EndDate\": \"2012-12-1\", \"Company\": \"Aurostyle Limited\", \"StartDate\": \"2010-6-1\", \"CompanyDuration\": \"June 2010 \u2013 December 2012\"}, {\"Position\": null, \"EndDate\": \"2010-6-1\", \"Company\": \"Waddy Jewellery Group Limited\", \"StartDate\": \"2007-6-1\", \"CompanyDuration\": \"June 2007 \u2013 June 2010\"}]}",
  3. "time": 128,
  4. "message": "",
  5. "ret_code": 0
  6. }

出参result是一个JSON字符串,是一个JSON字符串,具体结构如下所示。

  1. {
  2. "Schools": [{
  3. "School": "The Hong Kong Polytechnic University",
  4. "StartDate": "2002-1-1",
  5. "EndDate": "2004-1-1",
  6. "SchoolDuration": "2002 - 2004"
  7. }, {
  8. "School": "University of British Columbia",
  9. "Degree": "Masters",
  10. "StartDate": "2000-3-1",
  11. "DegreeCode": "master",
  12. "SchoolDuration": ", Mar"
  13. }, {
  14. "School": "University of British Columbia",
  15. "Degree": "Masters",
  16. "StartDate": "2000-3-1",
  17. "DegreeCode": "master",
  18. "SchoolDuration": ", Mar"
  19. }],
  20. "Name": "John Smith",
  21. "Lang": "en",
  22. "Phone": "+852 1111 1234",
  23. "CountryCode": "852",
  24. "RegionalPhone": "11111234",
  25. "FamilyName": "Smith",
  26. "GivenName": "John",
  27. "City": "Hong Kong",
  28. "Email": "john.smith@gmail.com",
  29. "Companies": [{
  30. "Position": null,
  31. "EndDate": "2012-12-1",
  32. "Company": "Aurostyle Limited",
  33. "StartDate": "2010-6-1",
  34. "CompanyDuration": "June 2010 \u2013 December 2012"
  35. }, {
  36. "Position": null,
  37. "EndDate": "2010-6-1",
  38. "Company": "Waddy Jewellery Group Limited",
  39. "StartDate": "2007-6-1",
  40. "CompanyDuration": "June 2007 \u2013 June 2010"
  41. }]
  42. }

支持字段列表

字段名 描述
Name 姓名
Email 邮箱
Phone 联系方式
Address 地址
School 学校
Degree 学位
SchoolDuration 入学就读时间范围
Company 公司
Position 职位
CompanyDuration 公司就职时间范围