Tài liệu tham khảo về khung MLKitEntityExtraction

MLKEntityExtractionRemoteModel


@interface MLKEntityExtractionRemoteModel : MLKRemoteModel

Mô hình trích xuất thực thể được lưu trữ từ xa trên máy chủ và được tải xuống thiết bị.

  • Mã nhận dạng mô hình của mô hình này.

    Khai báo

    Objective-C

    @property (nonatomic, readonly) MLKEntityExtractionModelIdentifier _Nonnull modelIdentifier;
  • Lấy thực thể của EntityExtractorRemoteModel được định cấu hình bằng giá trị nhận dạng mô hình đã cho. Bạn có thể sử dụng mô hình này để kích hoạt tệp tải xuống bằng cách gọi API download(_:) từ ModelManager.

    EntityExtractorRemoteModel sử dụng ModelManager nội bộ. Khi tải EntityExtractorRemoteModel xuống, hệ thống sẽ đăng một thông báo cho RemoteModel. Để xác minh xem những thông báo như vậy có thuộc về EntityExtractorRemoteModel hay không, hãy kiểm tra để đảm bảo trường ModelDownloadUserInfoKeyRemoteModel trong từ điển thông tin người dùng chứa đối tượng thuộc loại EntityExtractorRemoteModel .

    Khai báo

    Objective-C

    + (nonnull MLKEntityExtractionRemoteModel *)
        entityExtractorRemoteModelWithIdentifier:
            (nonnull MLKEntityExtractionModelIdentifier)modelIdentifier;

    Các tham số

    modelIdentifier

    Giá trị nhận dạng của mô hình.

    Giá trị trả về

    Một thực thể EntityExtractorRemoteModel.

  • Không dùng được.

    Khai báo

    Objective-C

    - (nonnull instancetype)init;