Natural Language ProcessingNatural Language Processing

Compute
Elastic Cloud Server
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
Domain Name Service
VPC Endpoint
Cloud Connect
Enterprise Switch
Security & Compliance
Anti-DDoS
Web Application Firewall
Host Security Service
Data Encryption Workshop
Database Security Service
Advanced Anti-DDoS
Data Security Center
Container Guard Service
Situation Awareness
Managed Threat Detection
Compass
Cloud Certificate Manager
Anti-DDoS Service
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GaussDB NoSQL
GaussDB(for MySQL)
Distributed Database Middleware
GaussDB(for openGauss)
Developer Services
ServiceStage
Distributed Cache Service
Simple Message Notification
Application Performance Management
Application Operations Management
Blockchain Service
API Gateway
Cloud Performance Test Service
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
DevCloud
ProjectMan
CodeHub
CloudRelease
CloudPipeline
CloudBuild
CloudDeploy
Cloud Communications
Message & SMS
Cloud Ecosystem
Marketplace
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP License Service
Support Plans
Customer Operation Capabilities
Partner Support Plans
Professional Services
enterprise-collaboration
Meeting
IoT
IoT
Intelligent EdgeFabric
DeveloperTools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Help Center> Natural Language Processing> Getting Started> Calling NLP APIs Using Postman
Updated at: Feb 22, 2022 GMT+08:00

Calling NLP APIs Using Postman

NLP enables you with natural language processing capabilities with open APIs using Postman.

The following describes how to call a word segmentation API:

Table 1 Calling the word segmentation API

No.

Operation Procedure

Reference

1

Register and authenticate a public cloud account using your real name.

NOTE:

If you have an account that has passed real-name authentication, skip this step and use your existing account.

For details, see 1.

2

Configure the environment.

Download and install Postman and the configuration file.

For details, see 2.

3

Call the API.

Use Postman to call the API and check the returned result, status code, and error code.

NOTE:

The returned result is in JSON format. You need to process the recognition result through writing code.

For details, see 3.

Procedure

  1. Register and authenticate a public cloud account using your real name.

    If you do not have a public cloud account, register one. If you have an account that has passed real-name authentication, skip this step and use your existing account.

    1. Visit https://www.huaweicloud.com/intl/en-us/ and click Register in the upper right corner. The registration page is displayed.
    2. Fill in user information as instructed to complete the registration.
    3. Click the username in the upper right corner to enter the My Account page. Then click Real-Name Authentication in the left navigation pane.
    4. Perform real-name authentication as prompted.

  2. Configure the environment.

    1. Download and install Postman. Select an appropriate version. Version 7.24.0 is recommended.

      Only a registered account can log in and obtain the latest version of Postman.

    2. Download the SDK configuration file of Postman:

      NLP_API.postman_collection.zip. Decompress the file to obtain a JSON file.

    3. Load the SDK configuration file.
      1. Log in to Postman and choose File > Import > Import File > Choose File.

      2. Select the downloaded SDK.postman_collection.json configuration file.
      3. After the load is complete, check the following configuration file in the left navigation tree.

  3. Call the API.

    1. Obtain the token.
      1. On the Postman page, choose get-token in the navigation tree on the left. Click the Body tab, add the HUAWEI CLOUD username, password, and region ap-southeast-3 where NLP is deployed. See the following figure.
        • name in user indicates the IAM username and password indicates the password.
        • name in domain indicates the account name.
        • name in project indicates the region name, for example, ap-southeast-3. For details, see section "Endpoints" in the Natural Language Processing API Reference.

        The region where the HUAWEI CLOUD service for obtaining the token is located must be the same as the region where the called service is located. Otherwise, the calling will fail.

      2. Click Send in the upper right corner to send POST https://iam.ap-southeast-3.myhuaweicloud.com/v3/auth/tokens. Obtain the token in Headers (the validity period of the token is 24 hours) and project ID at the end of Body.

    2. Call the word segmentation API.
      1. Click segment. On the Headers tab page, copy the token to X-Auth-Token.

      2. Click Body, modify the body parameters according to , and click Send to obtain the result.

Did you find this page helpful?

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel