Movatterモバイル変換


[0]ホーム

URL:


Loading

Alternatively, you can use theinfer trained model API. For example, to try a named entity recognition task, provide some sample text:

POST /_ml/trained_models/elastic__distilbert-base-cased-finetuned-conll03-english/_infer{  "docs":[{"text_field": "Sasha bought 300 shares of Acme Corp in 2022."}]}

In this example, the response contains the annotated text output and the recognized entities:

{  "inference_results" : [    {      "predicted_value" : "[Sasha](PER&Sasha) bought 300 shares of [Acme Corp](ORG&Acme+Corp) in 2022.",      "entities" : [        {          "entity" : "Sasha",          "class_name" : "PER",          "class_probability" : 0.9953193407987492,          "start_pos" : 0,          "end_pos" : 5        },        {          "entity" : "Acme Corp",          "class_name" : "ORG",          "class_probability" : 0.9996392198381716,          "start_pos" : 27,          "end_pos" : 36        }      ]    }  ]}

If you are satisfied with the results, you can add these NLP tasks in youringestion pipelines.


[8]ページ先頭

©2009-2026 Movatter.jp