public ImportLexiconCommand(AppOptions options, string inputDir, string database, string profile, bool preflight) { _config = options.Configuration; _repositoryService = new RepositoryService(_config); _inputDir = inputDir ?? throw new ArgumentNullException(nameof(inputDir)); _database = database ?? throw new ArgumentNullException(nameof(database)); _profileText = profile ?? throw new ArgumentNullException(nameof(profile)); _preflight = preflight; _ud = new UniData(); _tAllowedChildren = new HashSet <string> { "hi", "qf", "x", "xr" }; _exAllowedChildren = new HashSet <string> { "hi", "q", "x" }; _extAllowedChildren = new HashSet <string> { "hi", "x" }; _lemmaHomRegex = new Regex(@"^(?<l>[^(]+)(?:\s*\((?<h>\d+)\))?"); _tagRegex = new Regex("<[^>]+>"); _wsRegex = new Regex(@"\s+"); _textCutterOptions = new TextCutterOptions { LimitAsPercents = false, LineFlattening = true, MaxLength = 200, Ellipsis = "\u2026" }; }
public XmlThesaurusParser() { _options = new TextCutterOptions { LimitAsPercents = false, LineFlattening = true, MaxLength = 30, MinusLimit = 5, PlusLimit = 5 }; _tailRegex = new Regex(@"\s*(?<p>\([^)]+\))|(?<p>\[[^]]+\])\s*$"); _wsRegex = new Regex(@"\s+"); }