Skip to main content

Count words and pre-translate documents

NOTE: This method can be used for Standard projects only. Word counts are done automatically in Codyt projects.

Count words for and pre-translate newly added documents, all documents or a selected list of documents.

Please note that only documents marked for online translation are counted.

This method requires that a word count configuration was setup in the project beforehand. This configuration specifies fuzzy match intervals, pre-translation options and other parameters. Currently, this setup cannot be done via the API.

URL

(PUT) projects/{projectid}/wordcounts/{targetlocale}

PARAMETERS

tokenid

The token obtained on connection

Required

projectid

The project id

Required

targetlocale

The target language to count words for. Word counts need to be carried out per project target language.

Required

docids

Optional comma-separated list of project documents to count words for. If this parameter is not supplied then all documents (or all new documents) are counted.

Optional

newdocsonly

Default: true

If true then only new documents are counted (i.e. documents counted before are not recounted). If false, then the system will recount all documents of the project.

Optional

inproject

Default: true

If true, then the system will count repetitions within all project documents.

Optional

dofuzzy

Default: true

If true, then fuzzy matches will be carried out. This requires that the word count configuration of the project had fuzzy match intervals defined.

Optional

domachinetranslate

Default: false

If true, then segments not pretranslated during the wordcounting process will be pretranslated using machine translation. If a system is defined in the wordcount settings used to do this wordount, and this system can machine translate the current language couple, then it will be used. If the system cannot pretranslate, then no machine translation will be done. If no systems are defined, then the system will pick the first one that can translate the current language couple from the platform configuration.

Optional

 

RESULTS

The method executes asynchronously. It returns the id of the asynchronous operation or 0 if the operation has completed immediately:

XML
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">2147483647</int>

If not 0 then your software should poll the status of the operation every 5 seconds. See Asynchronous operations, operation "asyncoperations/{operationid}/status".

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.