Beispiel #1
0
 public TermInjectorTranslationProviderElementTermReplacementVisitor(
     TermInjectorTranslationOptions options)
 {
     _options = options;
     _segment = new Segment();
     //Create a new trie processor
     _trieProcessor = new TrieProcessing();
     //Initialize the dictionary which will contain the positions and translations
     //of terms
     _positionAndTranslationOfTerms = new List <PositionAndTranslation>();
 }
Beispiel #2
0
        public TermInjectorTranslationProviderElementTermExtractionVisitor(
            TermInjectorTranslationOptions options,
            Trie glossaryTrie,
            RegexTrie <TranslationAndReplacement> regexTrie)
        {
            _options       = options;
            _trieProcessor = new TrieProcessing();
            _trie          = glossaryTrie;

            //Initialize the regex trie
            _regexTrie = regexTrie;

            _TermList = new List <PositionAndTranslation>();
        }
Beispiel #3
0
 public TermInjectorTranslationProviderElementTermReplacementVisitor(
     TermInjectorTranslationOptions options,
     Trie glossaryTrie,
     RegexTrie <TranslationAndReplacement> regexTrie)
 {
     _options = options;
     _segment = new Segment();
     //Initialize the glossary trie
     _trie = glossaryTrie;
     //Initialize the regex trie
     _regexTrie = regexTrie;
     //Create a new trie processor
     _trieProcessor = new TrieProcessing();
     //Initialize the dictionary which will contain the positions and translations
     //of terms
     _positionAndTranslationOfTerms = new List <PositionAndTranslation>();
     //Boolean for indicating whether the original segment has been changed
     _originalSegmentChanged = false;
 }