/// <summary>
        /// Gets the file extractor for this component.
        /// </summary>
        /// <param name="name">not used here</param>
        /// <returns>a FileExtractor containing an Bil Parser</returns>
        public IFileExtractor BuildFileExtractor(string name)
        {
            var parser    = new TxmlParser();
            var extractor = FileTypeManager.BuildFileExtractor(parser, this);

            return(extractor);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the file extractor for this component.
        /// </summary>
        /// <param name="name">not used here</param>
        /// <returns>a FileExtractor containing an Simple Text Parser</returns>
        public virtual IFileExtractor BuildFileExtractor(string name)
        {
            var parser = new SimpleTextParser
            {
                LockPrdCodes = true
            };
            var extractor = FileTypeManager.BuildFileExtractor(FileTypeManager.BuildNativeExtractor(parser), this);

            extractor.AddFileTweaker(new SimpleFilePreTweaker {
                RequireValidEncoding = false
            });
            return(extractor);
        }
        public IFileExtractor BuildFileExtractor(string name)
        {
            var parser = new PoFileParser(
                new FileHelper(),
                new LineParser(),
                new SegmentSettings(),
                new ParagraphUnitFactory(),
                new EntryBuilder());

            var fileExtractor = FileTypeManager.BuildFileExtractor(parser, this);

            var processor = new RegexEmbeddedBilingualProcessor(
                new EmbeddedContentVisitor(),
                new EmbeddedContentRegexSettings(),
                new TextProcessor());

            fileExtractor.AddBilingualProcessor(processor);

            return(fileExtractor);
        }