Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-1484

Count translated characters by MT engine and customer

    XMLWordPrintable

Details

    • High
    • Hide
      Attention: The numbers exported by this new feature are only collected from the point in time onwards, when translate5 is updated to the release with this feature.
      To configure log auto clean, define how many days the log should stay in the database in runtimeOptions.LanguageResources.usageLogger.logLifetime.
      Show
      Attention: The numbers exported by this new feature are only collected from the point in time onwards, when translate5 is updated to the release with this feature. To configure log auto clean, define how many days the log should stay in the database in runtimeOptions.LanguageResources.usageLogger.logLifetime.
    • Enables language resources usage log and statistic export.

    Description

      Scenario

      MT is used for different clients in translate5. For InstantTranslate the used chars must be invoiced to the clients who used the MT.

      User experience of the feature

      In the clients panel of translate5 an new column is introduced, in which the user can download the MT usage statistics.

      Downloaded is an Excel-File with 3 sheets:

      • 1st sheet: "MT usage by month".
        The sheet contains the total sums per customer and month with the following columns:
        • MT engine resource type
        • MT engine name
        • Source Language
        • Target Language
        • Month and Year for that the sum of the current row is counted
        • The total characters
      • 2nd sheet: "MT usage log".
        Contains the data for each single MT request, as long as it is still available in translate5.
        Contains the hint, that the table does not hold the complete data that leads to the sums of table one, but only the data that has not been automatically deleted so far.
        The following columns:
        • the MT engine resource type
        • the MT engine
        • source language
        • target language
        • the datetime of the request
        • number of translated chars for the request, divided by the numbers of customers logged for this request
          (the division by logged customers is important, because it is possible to assign more than one client to a user and a language resource in translate5. If this user uses this language resource in InstantTranslate, the request belongs to all clients that are assigned to both: language resource and user.)
      • Third sheet: "TM usage by month".
        Counted is, how many characters and words are actually used as 100%-Match from a TM. For task-based TM-usage the statistic is generated/updated when saving a segment (be it pre-translation or segment save), because this is the earliest point in time. Counted are 100%-Matches, that are pre-translated
        • in a normal task (match-type TM and match-rate 100%, independent if they have been edited or not)
        • in a normal task, but taken over by the user through e. g. STRG+1 (match-type TM and match-rate 100%, independent if they have been edited or not)
        • in InstantTranslate text area
        • in InstantTranslate through pre-translation of a document (match-type TM and match-rate 100%, independent if they have been edited or not)
      • Fourth sheet: "Documents by month"
        The sheet contains the total sums per customer and month with the following columns:
        • Source Language
        • Target Language
        • Month and Year for that the sum of the current row is counted
        • The total number of documents

      User experience: Automatic deletion of logging data

      In the translate5 configuration a new configuration is introduced that defines, how old entries in the mt_usage_log can maximally be.

      If they are older than the configured value, they are automatically deleted. This deletion can be triggered by a cron job from outside of translate5, if this is configured. If not, the deletion will take place automatically every 15 minutes (for the deletion via cron / automatic execution every 15 minutes an exisitng translate5 mechanism is used).

      Implementation

      In the database, we will log the information in 2 different tables:

      • in a mt_usage_log table all requests to a MT resource are logged as separate rows
      • in a mt_usage_sum_log table the sums of the logs are added up.

      Logging of each request in the mt_usage_log table

      On each translation request to a MT engine translate5 logs

      • the MT engine resource type
      • the MT engine name
      • the chars in the source, that are being sent to translation per language combination
      • the source inside translate5, that initiated the translation request (at the moment instantTranslate or editor)
      • the customer(s)
        • if the request is triggered through InstantTranslate: the customers, that are associated with the requested language resources AND at the same time with the current user
        • if the request is triggered through translate5 editor: the customer, that is associated with the current task
      • a datetime stamp, when the request has been made

      Summing up the chars of each request in the mt_usage_sum_log

      Whenever MT engine usage is logged, translate5 adds up the counted chars. For each new month a new row is inserted in the table for a unique combination of

      • language resource id
      • source language
      • target language
      • customerid

      If the row for a month already exists, it is updated.

      The table contains the following columns

      • language resource id
      • source language
      • target language
      • customerid
      • month (sum date for 1 month period ex: 2018-12)
      • totalCharacters

      A unique key is set that combines all columns except totalCharacters (use sql triggers for this update ?)

      • when record with same languageresourceid, customerid,source,target and month and year sum date exist, update the total characters value so the new value is the existing total characters + the new value

      Attachments

        Activity

          People

            aleksandar Aleksandar Mitrev
            marcmittag Marc Mittag [Administrator]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: