EvilMindDevs / hms-sdk-unity

Unity C# wrapper SDK for Huawei Mobile Services kits.
MIT License
25 stars 23 forks source link

Implement Base Translation Methods, Download Model Classes, Remote and Local Translation Updates #156

Closed Andronovo-bit closed 4 months ago

Andronovo-bit commented 4 months ago

Description: This pull request includes the implementation of foundational translation methods and enhancements to handle local, remote (cloud) translation, and offline and online model usage. The changes involve the creation of new classes and updates to existing ones to support these functionalities.

Key Changes:

  1. Translation Methods:

    • Implemented base translation methods.
    • Future implementations of getLocalTranslator and getRemoteTranslator will be added after related classes are created.
  2. Model Classes for Offline Use:

    • Created MLLocalModel class for handling local ML models.
    • Created MLLocalModelManager class for managing local models, with remote model fields and methods to be added later.
    • Added MLException class for handling ML-related exceptions.
  3. Model Classes for Online Use:

    • Created MLRemoteModel class for handling local ML models.
    • Created MLRemoteModelManager class for managing local models, with remote model fields and methods to be added later.
  4. Code Updates:

    • Updated MLModelDownloadStrategy.cs to fix a bug in the Factory constructor.
    • Modified MLLocalTranslator.cs to use TaskPrimitive<string> instead of TaskStringWrapper in the TranslateAsync method.

Related Issues and Tickets:

Contributor:

Commit History: