This method returns an in-depth word count report. Whereas the regular word count details shows summary information only, this method produces are very detailed report:
-
Counts of texts leveraged per each resource attached to the project
-
Counts of texts leveraged from the document itself (such as repetitions within document)
-
Counts of texts leveraged from the project memory (cross-leveraging)
Note: The method only works with word counts calculated since the release of this method.
URL
(GET) /api/projects/{pid}/wordcounts/{did}/{tloc}/report
PARAMETERS
The URL parameters are:
|
pid |
The project id |
int, Required |
|
did |
The document id. |
int, Required |
|
trg |
The target locale of the word count. |
string, Required |
RESULTS
Returns a JSON object with the word count details for the document and language.
|
dt |
Date when the word count was calculated |
datetime |
|
info |
Information about the project and document. |
object |
|
info.type |
Always "document". It means that this report contains word count details for a single document. |
string |
|
info.pid |
The project id |
int |
|
info.preference |
The project reference |
string |
|
info.did |
The document id |
int |
|
info.dname |
The document name |
string |
|
info.src, info.srct |
The document source locale and locale name. |
string |
|
info.trg, info.trgt |
The target locale of the word count and locale name. |
string |
|
|
|
|
|
general |
Report with full details. Each line corresponds to a category of word count (pre-translation, no match, excluded, 110% repetition, etc.). The report consists of 1 or more lines. These are organized in a hierarchy using the "level" property. The first line (level 0) includes the total words, characters and segments. Subsequent lines (level 1) then show word counts by leveraging category. Example:
These counts may then be categorized such as to show how many words are leveraged from individual resources. |
object[] |
|
resources |
Report showing pre-translations and matches only, split by resource leveraged: Leveraged from document, from project memory or attached resource. The report then shows, per resource, how many segments were leveraged with or without translation.
|
|
Each element of lines, has these properties:
|
level |
The "indentation" of this report line. For example level 2 is a child of the preceding level 1 line. |
datetime |
|
title |
A title such as "110% pre-translations". |
string |
|
s |
Total segments |
int |
|
w |
Total words |
int |
|
c |
Total characters |
int |
|
s-p |
Percentage of segments with respect to the parent category(the preceding line with level - 1). A value between 0 and 100. |
decimal |
|
w-p |
Percentage of characters with respect to the parent category. |
decimal |
|
c-p |
Percentage of characters with respect to the parent category. |
decimal |
|
key |
A constant describing the type of content in this line. For example "trans-110" refers to pre-translations at 110%. Useful if you want to further process the report. |
string |
|
show |
An indicator for display purposes. True: We show this line on-screen by default. False: The line can be collapsed by default. |
bool |
|
dsid |
If the line refers to leveraging from a specific resource, then this property contains the resource id. |
int? |
EXAMPLE
The following shows an example of a report.
{
"info": {
"type": "document",
"did": 8806,
"dname": "sample document.html",
"pid": 2275,
"preference": "Project 2000",
"src": "en",
"srct": "Anglais",
"trg": "fr",
"trgt": "Français"
},
"dt": "2019-01-21T08:30:00.4639974Z",
"general": [
{
"level": 0,
"title": "Total",
"show": true,
"s": 884,
"w": 11967,
"c": 65214,
"s-p": 100.0,
"w-p": 100.0,
"c-p": 100.0,
"key": "total",
"dsid": null
},
{
"level": 1,
"title": "Translations",
"show": true,
"s": 8,
"w": 8,
"c": 38,
"s-p": 0.905,
"w-p": 0.067,
"c-p": 0.058,
"key": "trans",
"dsid": null
},
{
"level": 2,
"title": "110% pre-translation",
"show": true,
"s": 0,
"w": 0,
"c": 0,
"s-p": 0.0,
"w-p": 0.0,
"c-p": 0.0,
"key": "trans-110",
"dsid": null
},
{
"level": 2,
"title": "100% pre-translation",
"show": true,
"s": 0,
"w": 0,
"c": 0,
"s-p": 0.0,
"w-p": 0.0,
"c-p": 0.0,
"key": "trans-100",
"dsid": null
},
{
"level": 2,
"title": "Fuzzy pre-translation",
"show": true,
"s": 0,
"w": 0,
"c": 0,
"s-p": 0.0,
"w-p": 0.0,
"c-p": 0.0,
"key": "trans-fuzzy",
"dsid": null
},
{
"level": 2,
"title": "Machine translations",
"show": true,
"s": 8,
"w": 8,
"c": 38,
"s-p": 100.0,
"w-p": 100.0,
"c-p": 100.0,
"key": "trans-mt",
"dsid": null
},
{
"level": 3,
"title": "Leveraged from project",
"show": false,
"s": 3,
"w": 3,
"c": 15,
"s-p": 37.500,
"w-p": 37.500,
"c-p": 39.474,
"key": "origin-project",
"dsid": null
},
{
"level": 3,
"title": "Other origin",
"show": false,
"s": 5,
"w": 5,
"c": 23,
"s-p": 0.0,
"w-p": 0.0,
"c-p": 0.0,
"key": "trans-mt",
"dsid": null
},
{
"level": 1,
"title": "Matches and repetitions",
"show": true,
"s": 777,
"w": 11860,
"c": 65077,
"s-p": 87.896,
"w-p": 99.106,
"c-p": 99.790,
"key": "match",
"dsid": null
},
{
"level": 2,
"title": "110% memory match",
"show": true,
"s": 490,
"w": 3976,
"c": 21865,
"s-p": 63.063,
"w-p": 33.524,
"c-p": 33.599,
"key": "match-110",
"dsid": null
},
{
"level": 3,
"title": "Leveraged from document",
"show": false,
"s": 149,
"w": 1348,
"c": 7461,
"s-p": 30.408,
"w-p": 33.903,
"c-p": 34.123,
"key": "origin-doc",
"dsid": null
},
{
"level": 3,
"title": "Leveraged from project",
"show": false,
"s": 341,
"w": 2628,
"c": 14404,
"s-p": 69.592,
"w-p": 66.097,
"c-p": 65.877,
"key": "origin-project",
"dsid": null
},
{
"level": 2,
"title": "100% match or repetition",
"show": true,
"s": 0,
"w": 0,
"c": 0,
"s-p": 0.0,
"w-p": 0.0,
"c-p": 0.0,
"key": "match-100",
"dsid": null
},
{
"level": 2,
"title": "Fuzzy match or repetition",
"show": true,
"s": 287,
"w": 7884,
"c": 43212,
"s-p": 36.937,
"w-p": 66.476,
"c-p": 66.401,
"key": "match-fuzzy",
"dsid": null
},
{
"level": 3,
"title": "99%",
"show": true,
"s": 99,
"w": 2628,
"c": 14404,
"s-p": 34.495,
"w-p": 33.333,
"c-p": 33.333,
"key": "sim-99",
"dsid": null
},
{
"level": 4,
"title": "Leveraged from project",
"show": false,
"s": 99,
"w": 2628,
"c": 14404,
"s-p": 100.0,
"w-p": 100.0,
"c-p": 100.0,
"key": "origin-project",
"dsid": null
},
{
"level": 3,
"title": "95%",
"show": true,
"s": 95,
"w": 2628,
"c": 14404,
"s-p": 33.101,
"w-p": 33.333,
"c-p": 33.333,
"key": "sim-95",
"dsid": null
},
{
"level": 4,
"title": "Leveraged from project",
"show": false,
"s": 95,
"w": 2628,
"c": 14404,
"s-p": 100.0,
"w-p": 100.0,
"c-p": 100.0,
"key": "origin-project",
"dsid": null
},
{
"level": 3,
"title": "93%",
"show": true,
"s": 93,
"w": 2628,
"c": 14404,
"s-p": 32.404,
"w-p": 33.333,
"c-p": 33.333,
"key": "sim-93",
"dsid": null
},
{
"level": 4,
"title": "Leveraged from resources",
"show": false,
"s": 93,
"w": 2628,
"c": 14404,
"s-p": 100.0,
"w-p": 100.0,
"c-p": 100.0,
"key": "origin-resources",
"dsid": null
},
{
"level": 5,
"title": "Master memory AX2",
"show": false,
"s": 93,
"w": 2628,
"c": 14404,
"s-p": 100.0,
"w-p": 100.0,
"c-p": 100.0,
"key": "origin-resource-1111",
"dsid": 1111
},
{
"level": 1,
"title": "No match",
"show": true,
"s": 0,
"w": 0,
"c": 0,
"s-p": 0.0,
"w-p": 0.0,
"c-p": 0.0,
"key": "nomatch",
"dsid": null
},
{
"level": 1,
"title": "Excluded",
"show": true,
"s": 99,
"w": 99,
"c": 99,
"s-p": 11.199,
"w-p": 0.827,
"c-p": 0.152,
"key": "exclude",
"dsid": null
}
],
"resources": [ .... ]
}