Now, scroll down a bit further and click on
. You will be prompted for your SAP Cloud Platform credentials.
Scroll up a little for the Query Parameters section.
In the Options field enter the following:
{"numTopics":3, "numTopicsPerDoc":3, "numKeywordsPerTopic":5}
Now let’s build an archive with at least more than 2 text files.
If you are missing some inspiration, use the following articles content to create your text files:
Create a zip out of these text files.
Click on the Browse button next to files
parameter and pick your zip file.
Now scroll down a bit further and click on
.
Please take a note of the Request URL which we will use later:
https://sandbox.api.sap.com/ml/topicdetection/inference_sync
In the Response Body, you will get for each file, the associated keywords, topics and score.
The output will be sorted by descending topic score.
For example here, for the cheesecake.txt
document, the first list of keywords represent to top topic (with id 1) and it’s score is 1.0059799604699027.
{
"_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"processed_time": "Mon, 31 Jul 2017 14:52:20 GMT",
"request": {
"files": [
"Desktop.zip"
],
"options": {
"numKeywordsPerTopic": 5,
"numTopics": 3,
"numTopicsPerDoc": 3
},
"tenantName": "imgclassif-tech-user",
"texts": []
},
"status": "DONE",
"tenantName": "imgclassif-tech-user",
"topicDetection": [
{
"docName": "cheesecake.txt",
"keywords": [
[ "cheesecake", "cheese", "cream", "bake", "make" ],
[ "deep", "learn", "neural", "jump", "network" ],
[ "learn", "machine", "data", "jump", "algorithm" ]
],
"scores": [
1.0059799604699027,
0,
0
],
"topics": [
1,
2,
0
]
},
{
"docName": "deep_learning.txt",
"keywords": [
[ "deep", "learn", "neural", "jump", "network" ],
[ "learn", "machine", "data", "jump", "algorithm" ],
[ "cheesecake", "cheese", "cream", "bake", "make" ]
],
"scores": [
1.0683225059034496,
0.0008786062197741417,
0
],
"topics": [
2,
0,
1
]
},
{
"docName": "machine_learning.txt",
"keywords": [
[ "learn", "machine", "data", "jump", "algorithm" ],
[ "cheesecake", "cheese", "cream", "bake", "make" ],
[ "deep", "learn", "neural", "jump", "network" ]
],
"scores": [
0.890515209507582,
2.1184791916652968e-9,
0
],
"topics": [
0,
1,
2
]
}
]
}