当前位置:网站首页>Online text entity extraction capability helps applications analyze massive text data
Online text entity extraction capability helps applications analyze massive text data
2022-06-23 19:11:00 【Huawei mobile services】
With the development of information technology , Many valuable knowledge hiding is distributed in massive data , It affects the efficiency of people acquiring knowledge , How to deal with the complicated unstructured text data has become a difficult problem .
In recent days, ,HMS Core Machine learning services 6.5.0 Version added Online text entity extraction capability , This ability can detect whether there is a date in the text 、 full name 、 Proper nouns and other entity information , And extract such entities , That is, the ability to automatically process unstructured natural language text data . for example , The application of the film and television industry often produces a large number of film reviews 、 Information, etc , Using the online text entity extraction capability, we can quickly extract structural information , Help build knowledge map , It is easy for users to understand clearly .

Besides , Text entity extraction capability is more used in question and answer system 、 Information index 、 Knowledge map construction and other fields .
Question answering system
Question answering system is an advanced form of information retrieval system , It can be used accurately 、 Simple natural language to answer user's questions . During the implementation of question answering system , Then we need to use the text entity extraction ability to identify the problem and the entity information in the knowledge base , And then through a variety of algorithm models to match the accurate answer .
Information index
Use online text entity extraction capabilities , You can name specific entity information as indexes and hyperlinks . For example, the proper nouns mentioned by users in their comments , You can generate hyperlinks , It is convenient for other users to search and understand relevant contents .
Knowledge map construction
The map of knowledge is made up of entities 、 A data structure consisting of relationships and attributes , That is, a knowledge base with directed graph structure , Text entity extraction capability is the bottom capability in the process of knowledge map construction , It plays an extremely important role . For example, build a music knowledge map , First, we need to extract singers from a large amount of text data 、 song 、 Lyrics 、 Film and television and other related information , Then build the knowledge map .
at present , The online text entity extraction capability of Huawei machine learning service supports a total of person names 、 money 、 Film name 、 Page links 16 Entity categories , It can be applied to different categories according to the actual semantic scenarios App in .
Integration steps
- The development of preparation
For detailed preparation steps, please refer to Official website of Huawei developer Alliance .
- Integration and configuration apigateway authentication
be based on apigateway The authentication mechanism of :
"paths": {
"/entityExtract": { "post": { "operationId": "entityExtract",
"parameters": [{"in": "body", "name": "req", "required": true,
"schema": { "$ref": "#/definitions/NerEnterReq" } }, {
"name": "X-Request-ID", "in": "header", "required": true,
"type": "string"
}, {"name": "X-Package-Name", "in": "header", "required": true,
"type": "string" }, ……],
"responses": {"200": { "description": "response of 200",
"schema": { "$ref": "#/definitions/ResponseEntityNerBodyVo"}}}}}- Create an online text entity constructor
// Create a language detector using a custom parameter configuration .
MLRemoteNerSetting setting = new MLRemoteNerSetting.Factory()
.setSourceLangCode("zh")
.create();
MLRemoteNer ner = MLNerFactory.getInstance().getRemoteNer(setting);
Extract text entities .- Get text entity extraction online
Asynchronous method sample code :
ner.asyncEntityExtract(input).addOnSuccessListener(new OnSuccessListener<RemoteNerResultItem[]>() {
@Override
public void onSuccess(RemoteNerResultItem[] remoteNerResults) {
// Successful processing logic .
if(remoteNerResults != null){
// There are identification results
}else {
// The recognition result is null
}
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(Exception e) {
// Recognition failed , Get relevant exception information .
try {
MLException mlException = (MLException) e;
// Get error code , Developers can handle error codes , According to the error code for differentiated page prompt .
int errorCode = mlException.getErrCode();
// Get error information , Developers can combine error codes , Fast location problem .
String errorMessage = mlException.getMessage();
} catch (Exception error) {
// Conversion error handling .
}
}
});Synchronization method sample code :
try {
RemoteNerResultItem[] remoteNerResults = ner.syncEntityExtract(input);
// Identify success logic
if(remoteNerResults != null){
// There are identification results
}else {
// The recognition result is null
}
} catch (MLException mlException) {
// Failed processing logic .
// Get error code , Developers can handle error codes , According to the error code for differentiated page prompt .
int errorCode = mlException.getErrCode();
// Get error information , Developers can combine error codes , Fast location problem .
String errorMessage = mlException.getMessage();
}- After completion , Release resources
if (ner != null) {
ner.stop();
}Learn more >>
visit Official website of Huawei developer Alliance
obtain Development guidance document
Huawei mobile service open source warehouse address :GitHub、Gitee
Pay attention to our , The first time to understand HMS Core Latest technical information ~
边栏推荐
- sed replace \tPrintf to \t//Printf
- How to make a list sort according to the order of another list
- Matrix analysis notes (I)
- Various solutions to knapsack problems
- 【One by One系列】IdentityServer4(六)授权码流程原理之SPA
- Jerry added an input capture channel [chapter]
- Docker builds redis cluster
- 产品设计- 需求分析
- CV image classification
- 杰理之增加一个输入捕捉通道【篇】
猜你喜欢

又一家破产清算:那些在时代和资本裹挟下风雨飘摇的游戏公司

不止雷军 iQOO产品经理也称赞高通骁龙8+:焕然一新

STM32 (VIII) -- PWM output

How can enterprises do business monitoring well?

What does logistics service and management mainly learn

今年,安徽母基金大爆发

杰理之串口设置好以后打印乱码,内部晶振没有校准【篇】

Taolue biology rushes to the scientific innovation board: the actual controllers with annual losses of more than 100 million are Zhang Dawei and his wife, who are American nationals
![Jerry's broadcast MP3 prompt sound function [chapter]](/img/25/58c0f15a6fb2449ac505a06bb15887.png)
Jerry's broadcast MP3 prompt sound function [chapter]

物联网平台搭建设备,附源代码
随机推荐
不止雷军 iQOO产品经理也称赞高通骁龙8+:焕然一新
Jerry added an input capture channel [chapter]
8、AI医生案例
产品设计- 需求分析
[one by one series] spa of identityserver4 (VI) authorization code process principle
涂鸦智能通过聆讯:拟回归香港上市 腾讯是重要股东
Matrix analysis notes (I)
How long do you need to prepare for the PMP Exam?
用户分析-AARRR模型(海盗模型)
Matrix analysis notes (III-1)
User analysis aarrr model (pirate model)
#20Set介绍与API
Revelation: Bezos' business logic and leadership rules
杰理之增加一个输入捕捉通道【篇】
pmp考试需要备考多长时间?
傑理之串口設置好以後打印亂碼,內部晶振沒有校准【篇】
Task management of embedded development foundation (thread management)
Function definition and function parameters
Halcon knowledge: contour operator on region (1)
产品反馈机制