Exemple #1
0
        public override void ProcessParagraphUnit(IParagraphUnit paragraphUnit)
        {
            if (paragraphUnit.IsStructure)
            {
                return;
            }

            foreach (ISegmentPair item in paragraphUnit.SegmentPairs)
            {
                if (SkipSegment(item))
                {
                    continue;
                }

                _dataExtractor.Process(item.Source);
                var          sourceText   = _dataExtractor.PlainText.ToString();
                List <Token> sourceTokens = CloneList(_dataExtractor.Tokens);
                _dataExtractor.Process(item.Target);
                string        targetText   = _dataExtractor.PlainText.ToString();
                List <Token>  targetTokens = CloneList(_dataExtractor.Tokens);
                List <string> comments     = _dataExtractor.Comments;

                _excelSuperWriter.WriteEntry(item.Properties.Id.Id, sourceText, targetText, comments,
                                             item.Properties);
            }
        }
Exemple #2
0
        private string ReadSegment(ISegment item, out List <Token> tokens)
        {
            _dataExtractor.Process(item);

            var text = _dataExtractor.PlainText.ToString();

            tokens = CloneList(_dataExtractor.Tokens);

            return(text);
        }