tonita.corpora#

tonita.corpora.add(corpus_id, api_key=None)#

Add a corpus.

Parameters:
  • corpus_id (str) – The ID of the corpus to add. This ID can only contain alphanumeric characters and underscores.

  • api_key (Optional[str]) – An API key. If this argument is None, then the value of tonita.api_key will be used.

Returns:

See docstring for AddCorpusResponse.

Return type:

AddCorpusResponse

Raises:
tonita.corpora.list(api_key=None)#

List all available corpora.

Parameters:

api_key (Optional[str]) – An API key. If this argument is None, then the value of tonita.api_key will be used.

Returns:

See docstring for ListCorporaResponse.

Return type:

ListCorporaResponse

Raises:
tonita.corpora.get(corpus_id, api_key=None)#

Get information about a corpus.

Parameters:
  • corpus_id (str) – The ID of the corpus to get information for.

  • api_key (Optional[str]) – An API key. If this argument is None, then the value of tonita.api_key will be used.

Returns:

See docstring for GetCorpusResponse.

Return type:

GetCorpusResponse

Raises:
tonita.corpora.delete(corpus_id, api_key=None)#

Delete a corpus.

Parameters:
  • corpus_id (str) – The ID of the corpus to delete.

  • api_key (Optional[str]) – An API key. If this argument is None, then the value of tonita.api_key will be used.

Returns:

See docstring for DeleteCorpusResponse.

Return type:

DeleteCorpusResponse

Raises:
tonita.corpora.recover(corpus_id, api_key=None)#

Recover a corpus that was previously marked to be deleted.

Parameters:
  • corpus_id (str) – The ID of the corpus to recover.

  • api_key (Optional[str]) – An API key. If this argument is None, then the value of tonita.api_key will be used.

Returns:

See docstring for RecoverCorpusResponse.

Return type:

RecoverCorpusResponse

Raises: