Class XliffWCSplitter


  • public class XliffWCSplitter
    extends Object
    Splits a given XLIFF 1.2 input into several XLIFF documenta based on a provided word count. The split occurs anywhere after a trans-unit element (so file elements can be split as well). The word-count is done on the source content of each trans-unit. trans-unit with state-qualifier set to x-numeric, x-alphanumeric and x-punctuation are not counted. And trans-unit with translate='no' are also not counted.
    • Method Detail

      • process

        public Map<String,​Integer> process​(RawDocument rawDoc)
        Process a raw document.
        Parameters:
        rawDoc - the raw document to process.
      • process

        public Map<String,​Integer> process​(InputStream inputStream,
                                                 String outputRoot,
                                                 String srcLang)
        Process an input stream.
        Parameters:
        inputStream - the input stream to process.
        outputRoot - path of the output part with the root filename.