[API advanced road] counter attack! Using keyword extraction API to get insight into user requirements

Time:2020-11-18

Abstract:The boss said that the user demand insight report I finished with keyword extraction API was better than that of market research professionals.

In recent half a month’s lunch, it’s quite good. The market leader invites meals every day, either going out to a restaurant or taking dumplings from home. Thank you for saving 200000 research fees last time.

(for details, please stamp:How to use emotional analysis API to save 200000 research fees

This afternoon, he asked me to go to the old chicken soup in the bamboo grove opposite the company. I ordered tofu with bamboo shoots and an old chicken soup. As soon as he sat down, he snatched the chicken soup that had just been served.

Yo, what’s the matter with this boy? Do you dare to rob my soup? After watching him finish the bowl of chicken soup without saying a word, I knew that he was in trouble again.

After drinking the soup, he called the waiter over and asked for another one. Then he said to me, “brother, I’m hard. Last time you finished the analysis for us, the company approved the purchase plan of mobile phones. We purchased 10000 sets at a time, and tens of millions of them were smashed in. But the problem is that they can’t be sold now.”

Well, if you can’t sell it, you can’t blame me for not being able to sell it. Out of comfort, I asked, “what’s that for?”

In a word, the market leader almost threw the tens of millions of pots on my head: “last time, because there was no market research, the marketing department did activity planning / copywriting / design / advertising,There is no idea about what kind of people this mobile phone is suitable for and what the main selling points are. The copywriting and posters made by the mobile phone can’t arouse the interest of users at all. The promotion costs have been spent a lot, but the conversion rate is extremely low. “

I can’t recite this pot, but it’s true that the last sentiment analysis API can only analyze whether users approve or disapprove of this mobile phone. There is no way to analyze what users like in the end. How can this be done

I silently recalled the last time I used the sentiment analysis API to do user research. I still remember that I saw one at that timeKeyword extraction APIAh. sureUse keyword extraction API to extract the keywords of 10000 user reviews, and analyze these keywords with emotion analysis API. Positive words are selling points and negative words are user pain points.

I sent a product selling point and user pain point key words description to the market boss. After reading, he asked me to give the children in the marketing department a marketing training on user demand insight, saying that this material is better than the market research class members.

To be honest, we have no problem writing code and technical training, but I can’t do marketing training. It is more reliable to continue to output technical documents.

[keyword extraction API implementation evaluation analysis] the specific operation steps are as follows:

1、 Prepare the environment

1. Log in to Huawei cloud console and obtain the project ID in “API certificate”.

2. Get token through postman.

url:https://iam.cn-north-4.myhuaw…

Send a post request.

POST:https://iam.cn-north-4.myhuaw…

3. Record the x-subject-token value in the response header headers.

[API advanced road] counter attack! Using keyword extraction API to get insight into user requirements

2、 Call keyword extraction interface

1. Request example 1 (called via postman)

Fill in the request parameters in JSON format in the body:

  • Text: for text comments;
  • Limit: the maximum number of keywords.

Send a post request.

POST:https://nlp-ext.cn-north-4.myhuaweicloud.com/v1/{project_id}/ nlp-fundamental/keyword-extraction

[API advanced road] counter attack! Using keyword extraction API to get insight into user requirements

Fill in the headers with the x-subject-token obtained previously.

[API advanced road] counter attack! Using keyword extraction API to get insight into user requirements

Click send request to get:

[API advanced road] counter attack! Using keyword extraction API to get insight into user requirements

From the key words, we can find that the emphasis of the review is “photo”, “durable” and “good-looking”.

2. Request example 2 (called via Python)

#Define function to get keywords
def get_keyword(request_url, test_data, token):
 """
 Get keywords
 :param request_ URL: keyword extraction interface URL
 :param test_ Data: request comment data
 : param token: authentication information
 :return:
 """
 myheader = {"content-type": "application/json"}
 myheader['X-Auth-Token'] = token
 response = requests.post(
 request_url,
 headers=myheader,
 data=json.dumps(test_data),
 verify=False)
 response = json.loads(response.content.decode('utf-8'))
 return response
  
  
#Fill in the project ID of the Bureau
project_id = ""
#Fill in the user name, account name and user password
token = get_token(
 name="",
 domain_name="",
 pass_wd="",
 regoin_name="cn-north-4",
request_url="https://iam.cn-north-4.myhuaweicloud.com/v3/auth/tokens")
  
test_data = {
 "Text": "the wireless network of this mobile phone can't be turned on, the photographic clarity is not enough, and the appearance is also defective. "
 "limit": 5
}
  
print(
 get_keyword (
 "https://nlp-ext.cn-north-4.myhuaweicloud.com/v1/{project_id} /nlp-fundamental/keyword-extraction".replace("{project_id}",  project_id),
 test_data,
 token))

Response example:

[API advanced road] counter attack! Using keyword extraction API to get insight into user requirements

From the key words, we can find that the emphasis of the review is “photography”, “clarity” and “wireless network”. In this way, the negative analysis of the mobile phone can be divided into three parts.

The marketing department carried out new publicity planning and promotion according to the extracted keywords. When I saw the market leader with a lunch box smiling towards me, I knew that the effect should be good. Well, I’ll have dumplings this afternoon

It is understood that at presentAPI Explorer platformWe have opened 70 + cloud services such as EI enterprise intelligence, computing, application services, network, software development platform, video, etc., with 2000 + APIs and 6000 + error codes online. During the preliminary trial operation, the API interface on Huawei cloud API Explorer platform has been successfully accessed by many enterprises.

Click to view details:Huawei cloud one stop API solution platform API Explorer Online

Huawei cloud API Explorer platform will realize more functions in the next few months, such as supporting SDK sample code, CLI and other features. At the same time, it will also open more cloud service API interfaces to connect more developers to realize innovation and broaden innovation boundaries.

[welfare release] accelerate the innovation of artifact! “Huawei cloud API selection manual” is free of charge within limited time

Click follow to learn about Huawei’s new cloud technologies~