一、背景
目前智能选品等各个业务场景需要对产品信息进行实体抽取功能。
业务价值:提供通用实体抽取功能,便于业务快速使用后去相关实体词等;预估2w。
二、功能说明
2.1、提供通用实体抽取API
输入:文本(必填,如标题+五点+描述)。
输出:实体分类,关键词(词组)。
--实体分类(20个类)
ENTITY_TYPE=['产品核心名称','颜色','材质','数量套装','结构规格','比例','尺寸','容量','重量','形状','风格','功能作用','规格型号','适用人群','适用对象','适用场景','产品配件','节日特色趋势','时间年份季节','认证技术专利']
ENTITY_TYPE_EN=['Core Product Term', 'Color', 'Material', 'QuantityPack', 'Structural Specifications', 'Ratio', 'Dimensions', 'Capacity', 'Weight', 'Shape', 'Style', 'Functional Features', 'SpecificationModel', 'Target User Group', 'Applicable Object', 'Applicable Scenario', 'Product Accessories', 'HolidayTrend Features', 'TimeYearSeason', 'CertificationTechnologyPatent']
--输出见:

注:该接口使用的是GTP4.1 智能用于应急使用,应用时需做调用控制,每周上线30w调用。
三、验收标准
每周支持30w的调用量。
import json
url = "113.96.35.34:12131/extract_entities"
payload = json.dumps({
"productName": "1 Set of Bird Chewing Toy Wooden Parrot Toy Suspending Parrot Swing Parrot Accessory",
"productDesc": "<strong>Description</strong><br />\n<br />\n<span>The Bird Swing is made of high class wood material. With fine craftsmanship, beautiful and delicate, a nice decor for your home. The bright colors and round shape can attract parrot's attention and increase its curiosity. </span><span>The swing toy saves installation space, very wear resistant and practical.</span><br />\n<br />\n<strong>Features</strong><br />\n<br />\n<span>-Color:Khaki<br />\n<span>-Material:Wood</span><br />\n<span>-Size:20.00X2.00X20.00cm/7.86X0.79X7.86in<br />\n</span><span></span><span>-</span><span>Adorable and delicate look design can match your other home decorations very well.</span><br />\n<span>-With fine craftsmanship, the bird swing is beautiful and delicate, and can be a nice decor for your home.</span><br />\n<span>-The creative and round shape can attract parrot's attention and increase its curiosity.</span><br />\n<span>-Manufactured with good and durable material which is safe and decorative.</span><br />\n<span>-The round and simple swing will create a happy atmosphere for your pet parrot and it will like this toy.</span>",
"featureList": "Adorable and delicate look design can match your other home decorations very well|With fine craftsmanship, the bird swing is beautiful and delicate, and can be a nice decor for your home|The creative and round shape can attract parrot's attention and increase its curiosity|Manufactured with good and durable material which is safe and decorative|The round and simple swing will create a happy atmosphere for your pet parrot and it will like this toy"
})
headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)