当前位置:网站首页>Online text entity extraction capability helps applications analyze massive text data
Online text entity extraction capability helps applications analyze massive text data
2022-06-24 14:15:00 【HMS Core】
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 ~
边栏推荐
- Harmony os. (2)
- Jerry's infrared filtering [chapter]
- HarmonyOS-3
- PM should also learn to reflect every day
- 详解kubernetes备份恢复利器 Velero | 深入了解Carina系列第三期
- 数据库一些基本操作(提供了原数据库信息)
- conda和pip命令
- Operation of simulated examination platform for examination questions of coal production and operation units (safety production management personnel) in 2022
- 取消冒泡
- Halcon 绘制区域 到图片中
猜你喜欢

【无标题】

谷歌WayMo提出R4D: 采用参考目标做远程距离估计

The first open source MySQL HTAP database in China will be released soon, and the three highlights will be notified in advance

SAP Marketing Cloud 功能概述(四)

unity 等高线创建方法
![[leetcode] 10. Regular expression matching](/img/a9/4cdf8d46068a2d7ea6ac212f416157.png)
[leetcode] 10. Regular expression matching

Télétravail: Camping à la maison gadgets de bureau | rédaction communautaire

食品饮料行业渠道商管理系统解决方案:实现渠道数字化营销布局

v-for 中 key的作用和原理

初识云原生安全:云时代的最佳保障
随机推荐
取消冒泡
Puzzle (016.2) finger painting Galaxy
2022 construction elevator driver (construction special type of work) examination questions and online simulation examination
npm包【详解】(内含npm包的开发、发布、安装、更新、搜索、卸载、查看、版本号更新规则、package.json详解等)
杰理之串口接收 IO 需要设置数字功能【篇】
龙蜥开发者说:首次触电,原来你是这样的龙蜥社区? | 第 8 期
Go语言三个高效编程的技巧
文本对比学习综述
Jericho turns on shouting in all modes to increase mic automatic mute [chapter]
HarmonyOS-3
远程办公之:在家露营办公小工具| 社区征文
详解kubernetes备份恢复利器 Velero | 深入了解Carina系列第三期
greendao使用问题
根据前序&中序遍历生成二叉树[左子树|根|右子树的划分/生成/拼接问题]
js去除字符串空格
数商云:加强供应商管理,助推航空运输企业与供应商高效协同
Kunpeng arm server compilation and installation paddlepaddle
MySQL复合索引探究
一键生成大学、专业甚至录取概率,AI填报志愿卡这么神奇?
Second, the examinee must see | consolidate the preferred question bank to help the examinee make the final dash