projects/{pid}/wordcounts/{did}/{trg}/report

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

didThe document id.int, Required
trgThe target locale of the word count.string, Required


RESULTS

Returns a JSON object with the word count details for the document and language.

dtDate when the word count was calculateddatetime
infoInformation about the project and document.object
info.typeAlways "document". It means that this report contains word count details for a single document.string
info.pidThe project idint
info.preferenceThe project referencestring
info.didThe document idint
info.dnameThe document namestring
info.src, info.srctThe document source locale and locale name.string
info.trg, info.trgtThe 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:

  • Level 0: Total : 1000 words
    • Level 1: Translations : 400 words
      • Level 2: 110% pre-translation : 200 words
        • Level 3: Translation memory "My memory" : 150 words
        • Level 3: From project memory : 50 words
      • Level 2: 100% pre-translation : 100 words
        • ...
      • Level 2: Fuzzy pre-translation : 100 words
    • Level 1: Matches and repetitions : 300 words
      • ...

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:

levelThe "indentation" of this report line. For example level 2 is a child of the preceding level 1 line.datetime
titleA title such as "110% pre-translations".string
sTotal segmentsint
wTotal wordsint
cTotal charactersint
s-pPercentage of segments with respect to the parent category(the preceding line with level - 1). A value between 0 and 100.decimal
w-pPercentage of characters with respect to the parent category.decimal
c-pPercentage of characters with respect to the parent category.decimal
keyA 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
showAn indicator for display purposes. True: We show this line on-screen by default. False: The line can be collapsed by default.bool
dsidIf 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": [ .... ]
}







Copyright Wordbee - Buzzin' Outside the Box since 2008