This topic describes the bidding information extraction service.
This model is the Basic Edition and supports parsing for 13 fields. If you need the Premium Edition, which supports separate parsing for bidding and award information, more fields, and higher accuracy, see Bidding and award information extraction - Premium Edition service.
This service is provided by the NLP Self-Learning Platform. You can use this service by directly calling the API.
Service activation and resource plan purchase
Before you start, ensure that the service is activated. After activation, you can purchase a resource plan.
Activate service: Activation link
Purchase resource plan: Purchase link
Service invocation and debugging
For more information, see Model invocation.
For SDK examples, see SDK examples.
Debug
Configure access credentials using environment variables
Notes:
An AccessKey for an Alibaba Cloud account has full access permissions to all APIs, which poses a high security threat. We strongly recommend that you create and use a Resource Access Management (RAM) user for API access or daily operations and maintenance (O&M). To create a RAM user, log on to the RAM console.
To prevent key leakage, do not hardcode your AccessKey ID and AccessKey secret in your code. Instead, configure them as environment variables.
Configure on Linux and macOS
export NLP_AK_ENV=<access_key_id> export NLP_SK_ENV=<access_key_secret>Replace <access_key_id> with your AccessKey ID and <access_key_secret> with your AccessKey secret. For more information, see Step 2: Obtain an AccessKey for your account.
Configure on Windows
Create an environment variable file. Add the
NLP_AK_ENVandNLP_SK_ENVenvironment variables and set them to your AccessKey ID and AccessKey secret.Restart Windows.
When calling the bidding and award information extraction service, set the ServiceName parameter to NLP-NER-ZhaoBiao-AutoML.
Java code example
/**
* An AccessKey of an Alibaba Cloud account has full access permissions to all APIs. This poses a high security threat. We strongly recommend that you create and use a RAM user for API access or daily O&M. To create a RAM user, log on to the RAM console.
* This example shows how to store the AccessKey ID and AccessKey secret in environment variables. You can also store them in a configuration file as needed.
* To prevent key leakage, do not hardcode the AccessKey ID and AccessKey secret in your code. This is strongly recommended.
*/
String accessKeyId = System.getenv("NLP_AK_ENV");
String accessKeySecret = System.getenv("NLP_SK_ENV");
DefaultProfile defaultProfile = DefaultProfile.getProfile("cn-hangzhou",accessKeyId,accessKeySecret);
IAcsClient client = new DefaultAcsClient(defaultProfile);
String content = "Bidding document text";
RunPreTrainServiceRequest request = new RunPreTrainServiceRequest();
request.setServiceName("NLP-NER-ZhaoBiao-AutoML");
request.setPredictContent(content);
RunPreTrainServiceResponse response = client.getAcsResponse(request);
System.out.println(response.getPredictResult());Python code example
The PredictContent parameter specifies the document text. The PredictResult parameter is a JSON string that must be deserialized before it can be parsed.
# Install dependencies
pip install aliyun-python-sdk-core
pip install aliyun-python-sdk-nlp-automl# -*- coding: utf-8 -*-
import json
import os
from aliyunsdkcore.client import AcsClient
from aliyunsdkcore.acs_exception.exceptions import ClientException
from aliyunsdkcore.acs_exception.exceptions import ServerException
from aliyunsdknlp_automl.request.v20191111 import RunPreTrainServiceRequest
"""
* An AccessKey of an Alibaba Cloud account has full access permissions to all APIs. This poses a high security threat. We strongly recommend that you create and use a RAM user for API access or daily O&M. To create a RAM user, log on to the RAM console.
* This example shows how to store the AccessKey ID and AccessKey secret in environment variables. You can also store them in a configuration file as needed.
* To prevent key leakage, do not hardcode the AccessKey ID and AccessKey secret in your code. This is strongly recommended.
"""
access_key_id = os.environ['NLP_AK_ENV']
access_key_secret = os.environ['NLP_SK_ENV']
# Initialize the AcsClient instance
client = AcsClient(
access_key_id,
access_key_secret,
"cn-hangzhou"
);
content = 'Bidding document text'
# Initialize a request and set its parameters
request = RunPreTrainServiceRequest.RunPreTrainServiceRequest()
request.set_ServiceName('NLP-NER-ZhaoBiao-AutoML')
request.set_PredictContent(content)
# Print the response
response = client.do_action_with_exception(request)
resp_obj = json.loads(response)
predict_result = json.loads(resp_obj['PredictResult'])
print(predict_result['ner_dic'])Extracted fields and descriptions
Field name | Description |
Winning bid amount | Not normalized |
First winning company | |
Second winning company | |
Third winning company | |
Other bidding companies | |
Subject matter name | May include multiple subject matters. |
Tenderer name | |
Project name | |
Award/Contract/Transaction date | Not normalized |
Winning company name | |
Project number | |
Review panel members | |
Bid announcement date | Not normalized |