コード例 #1
0
        public PosTaggerModelBuilder(string templateFilename,
                                     LanguageTypeEnum languageType,
                                     UrlDetectorConfig urlDetectorConfig)
        {
            templateFilename.ThrowIfNullOrWhiteSpace("templateFilename");
            urlDetectorConfig.ThrowIfNull("urlDetectorConfig");

            _posTaggerScriber            = PosTaggerScriber.Create4ModelBuilder(templateFilename);
            _posTaggerInputTypeProcessor = CreatePosTaggerInputTypeProcessor(languageType);
            _urlDetector = new UrlDetector(urlDetectorConfig);
            _words       = new List <Word>();
        }
コード例 #2
0
        public PosTaggerProcessor(PosTaggerProcessorConfig config,
                                  IMorphoModel morphoModel,
                                  MorphoAmbiguityResolverModel morphoAmbiguityModel)
        {
            CheckConfig(config, morphoModel, morphoAmbiguityModel);

            _tokenizer                    = new Tokenizer(config.TokenizerConfig);
            _words                        = new List <Word>(DEFAULT_WORDSLIST_CAPACITY);
            _posTaggerScriber             = PosTaggerScriber.Create(config.ModelFilename, config.TemplateFilename);
            _posTaggerPreMerging          = new PosTaggerPreMerging(config.Model);
            _posTaggerMorphoAnalyzer      = new PosTaggerMorphoAnalyzer(morphoModel, morphoAmbiguityModel);
            _processSentCallback1Delegate = new Tokenizer.ProcessSentCallbackDelegate(ProcessSentCallback1);
            _processSentCallback2Delegate = new Tokenizer.ProcessSentCallbackDelegate(ProcessSentCallback2);
        }
コード例 #3
0
        public static PosTaggerScriber Create(string modelFilename, string templateFilename)
        {
            var _PosTaggerCRFSuiteConverter = new PosTaggerScriber(modelFilename, templateFilename);

            return(_PosTaggerCRFSuiteConverter);
        }
コード例 #4
0
        public static PosTaggerScriber Create4ModelBuilder(string templateFilename)
        {
            var _PosTaggerCRFSuiteConverter = new PosTaggerScriber(templateFilename);

            return(_PosTaggerCRFSuiteConverter);
        }