Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Add information on metadata fields of projects to REST API #893

@juhoinkinen

Description

@juhoinkinen

The suggest, suggest_batch and learn methods of REST API now accept metadata of a document in addition to text (implemented in #867 ), which a backend can then use if a project configuration sets a select transform (implemented in #864). From the transform configuration, e.g. select(title,description,text) it is clear which metadata fields the project in question uses, but this information is not available for REST API users.

The project information accessible via /v1/projects/<projectid> could show also the metadata fields that the project uses when it performs the suggest operation.

For example, the response could include a field named metadata containing the names of the metadata fields:

{
  "backend": {
    "backend_id": "dummy"
  },
  "is_trained": true,
  "language": "fi",
  "modification_time": null,
  "name": "Dummy Finnish",
  "project_id": "dummy-fi",
  "vocab": {
    "languages": [
      "en",
      "fi"
    ],
    "vocab_id": "dummy"
  },
  "vocab_language": "fi",
  "metadata": [  // Added list
    "title",
    "description",
    "text"
   ]
}

For ensemble projects, the implementation should allow gathering the metadata fields that the source projects use, in addition to the fields the ensemble project itself uses.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions