# Keyword extraction of commodities
Product keyword extraction service can extract keywords from e-commerce product titles, including trade names, brand names, a total of 10 categories, see the following table.
This interface, from the plug-in 1.1.8 Start Support
# to initialize
Plugin version number in the document, only for example reference, the latest version of the plugin,Subject to this
{
"pages": [
"pages/index/index"
],
"plugins": {
"chatbot": {
"version": "1.2.23",
"provider": "wx8c631f7e9f2465e1"
}
},
"requiredBackgroundModes": [
"audio"
],
"sitemapLocation": "sitemap.json"
}
var plugin = requirePlugin("chatbot")
App({
onLaunch: function () {
plugin.init({
appid: "P5Ot9PHJDechCYqDFAW1AiK6OtG3Ja", //Mini Program sample account, for learning and reference only
openid: "", //User's openid, required
success: () => {}, //Not required
fail: (error) => {}, //Not required
})
},
})
# Call product keyword extraction interface
const txt = "Xiaomi Rechargeable Treasure"
plugin.api.nlp("ner-product", { q: txt }).then((nothing) => {
console.log("ner result : ", nothing)
})
# Result
{
"preprocessed_text": "Xiaomi charging treasure,"
"entities": {
"product": [
[
"Xiaomi",
"brand",
0,
2
],
[
"Charging treasure,"
"name",
2,
5
]
]
}
}
# Return to Results
name | type | Introductions |
---|---|---|
preprocessed_text | string | The result of text preprocessing |
entities | dictionary | List of Product Attributes Extraction Results |
+key=domain | string | Fixed as product (Only exists when there is a product attribute result) |
+value=property | list of tuples | List of Product Attributes |
++entity | tuple-(string, string, int, int) | Quaternion(Text, English name of the product, Starting character position, End character position) |
# List of Product Attributes
English Name of Product | Attribute meaning |
---|---|
brand | Brand name |
name | Product Name |
Qualifier | Modifier |
sale | Marketing words |
color | colour |
material | texture of timber |
time | Time Season |
location | place |
model | model |
size | Size specification |