|
255 | 255 | " }\n", |
256 | 256 | " ]\n", |
257 | 257 | " },\n", |
258 | | - " # {\n", |
259 | | - " # \"@odata.type\": \"#Microsoft.Skills.Text.KeyPhraseExtractionSkill\",\n", |
260 | | - " # \"context\": \"/document/pages/*\",\n", |
261 | | - " # \"maxKeyPhraseCount\": 2,\n", |
262 | | - " # \"defaultLanguageCode\": \"en\",\n", |
263 | | - " # \"inputs\": [\n", |
264 | | - " # {\n", |
265 | | - " # \"name\": \"text\", \n", |
266 | | - " # \"source\": \"/document/pages/*\"\n", |
267 | | - " # }\n", |
268 | | - " # ],\n", |
269 | | - " # \"outputs\": [\n", |
270 | | - " # {\n", |
271 | | - " # \"name\": \"keyPhrases\",\n", |
272 | | - " # \"targetName\": \"keyPhrases\"\n", |
273 | | - " # }\n", |
274 | | - " # ]\n", |
275 | | - " # },\n", |
276 | | - " # {\n", |
277 | | - " # \"@odata.type\": \"#Microsoft.Skills.Text.V3.EntityRecognitionSkill\",\n", |
278 | | - " # \"context\": \"/document/pages/*\",\n", |
279 | | - " # \"categories\": [\"Person\", \"URL\", \"Email\"],\n", |
280 | | - " # \"minimumPrecision\": 0.5, \n", |
281 | | - " # \"defaultLanguageCode\": \"en\",\n", |
282 | | - " # \"inputs\": [\n", |
283 | | - " # {\n", |
284 | | - " # \"name\": \"text\", \n", |
285 | | - " # \"source\":\"/document/pages/*\"\n", |
286 | | - " # }\n", |
287 | | - " # ],\n", |
288 | | - " # \"outputs\": [\n", |
289 | | - " # {\n", |
290 | | - " # \"name\": \"persons\", \n", |
291 | | - " # \"targetName\": \"persons\"\n", |
292 | | - " # },\n", |
293 | | - " # {\n", |
294 | | - " # \"name\": \"urls\", \n", |
295 | | - " # \"targetName\": \"urls\"\n", |
296 | | - " # },\n", |
297 | | - " # {\n", |
298 | | - " # \"name\": \"emails\", \n", |
299 | | - " # \"targetName\": \"emails\"\n", |
300 | | - " # }\n", |
301 | | - " # ]\n", |
302 | | - " # }\n", |
303 | | - " # ],\n", |
| 258 | + " # {\n", |
| 259 | + " # \"@odata.type\": \"#Microsoft.Skills.Text.KeyPhraseExtractionSkill\",\n", |
| 260 | + " # \"context\": \"/document/pages/*\",\n", |
| 261 | + " # \"maxKeyPhraseCount\": 2,\n", |
| 262 | + " # \"defaultLanguageCode\": \"en\",\n", |
| 263 | + " # \"inputs\": [\n", |
| 264 | + " # {\n", |
| 265 | + " # \"name\": \"text\", \n", |
| 266 | + " # \"source\": \"/document/pages/*\"\n", |
| 267 | + " # }\n", |
| 268 | + " # ],\n", |
| 269 | + " # \"outputs\": [\n", |
| 270 | + " # {\n", |
| 271 | + " # \"name\": \"keyPhrases\",\n", |
| 272 | + " # \"targetName\": \"keyPhrases\"\n", |
| 273 | + " # }\n", |
| 274 | + " # ]\n", |
| 275 | + " # },\n", |
| 276 | + " # {\n", |
| 277 | + " # \"@odata.type\": \"#Microsoft.Skills.Text.V3.EntityRecognitionSkill\",\n", |
| 278 | + " # \"context\": \"/document/pages/*\",\n", |
| 279 | + " # \"categories\": [\"Person\", \"URL\", \"Email\"],\n", |
| 280 | + " # \"minimumPrecision\": 0.5, \n", |
| 281 | + " # \"defaultLanguageCode\": \"en\",\n", |
| 282 | + " # \"inputs\": [\n", |
| 283 | + " # {\n", |
| 284 | + " # \"name\": \"text\", \n", |
| 285 | + " # \"source\":\"/document/pages/*\"\n", |
| 286 | + " # }\n", |
| 287 | + " # ],\n", |
| 288 | + " # \"outputs\": [\n", |
| 289 | + " # {\n", |
| 290 | + " # \"name\": \"persons\", \n", |
| 291 | + " # \"targetName\": \"persons\"\n", |
| 292 | + " # },\n", |
| 293 | + " # {\n", |
| 294 | + " # \"name\": \"urls\", \n", |
| 295 | + " # \"targetName\": \"urls\"\n", |
| 296 | + " # },\n", |
| 297 | + " # {\n", |
| 298 | + " # \"name\": \"emails\", \n", |
| 299 | + " # \"targetName\": \"emails\"\n", |
| 300 | + " # }\n", |
| 301 | + " # ]\n", |
| 302 | + " # }\n", |
| 303 | + " ],\n", |
304 | 304 | " \"cognitiveServices\": {\n", |
305 | 305 | " \"@odata.type\": \"#Microsoft.Azure.Search.CognitiveServicesByKey\",\n", |
306 | 306 | " \"description\": os.environ['COG_SERVICES_NAME'],\n", |
|
570 | 570 | " r = requests.get(os.environ['AZURE_SEARCH_ENDPOINT'] + \"/indexers/\" + indexer_name +\n", |
571 | 571 | " \"/status\", headers=headers, params=params)\n", |
572 | 572 | " # pprint(json.dumps(r.json(), indent=1))\n", |
573 | | - " print(r.status_code)\n", |
574 | | - " print(\"Status:\",r.json().get('lastResult').get('status'))\n", |
575 | | - " print(\"Items Processed:\",r.json().get('lastResult').get('itemsProcessed'))\n", |
576 | | - " print(r.ok)\n", |
| 573 | + " #print(r.status_code)\n", |
| 574 | + " #print(\"Status:\",r.json().get('lastResult').get('status'))\n", |
| 575 | + " #print(\"Items Processed:\",r.json().get('lastResult').get('itemsProcessed'))\n", |
| 576 | + " #print(r.ok)\n", |
| 577 | + " print(r.json().get('lastResult'))\n", |
577 | 578 | " \n", |
578 | 579 | "except Exception as e:\n", |
579 | 580 | " print(\"Wait a few seconds until the process starts and run this cell again.\")" |
|
0 commit comments