public void Initialize(IParserRegister register, IEngineParser engine)
 {
     register.Initialize(this, engine);
     rootParsers.Add(register.GetRootParser());
     foreach (var item in register.GetParsers())
     {
         parsers.Add(item.Key, item.Value);
     }
 }
Example #2
0
        public void Initialize(IParserContainer container, IEngineParser engine)
        {
            rootParser = new RootParser(container, engine);

            parsers = new Dictionary <Type, object>()
            {
                [typeof(Principal)]  = new PrincipalParser(container, engine),
                [typeof(Database)]   = new DatabaseParser(container, engine),
                [typeof(Permission)] = new PermissionParser(container, engine),
                [typeof(Securable)]  = new SecurableParser(container, engine),
            };
        }
        public void Initialize(IParserContainer container, IEngineParser engine)
        {
            rootParser = new RootParser(container, engine);

            parsers = new Dictionary <Type, object>()
            {
                [typeof(Account)]    = new AccountParser(container, engine),
                [typeof(Folder)]     = new FolderParser(container, engine),
                [typeof(Permission)] = new PermissionParser(container, engine),
                [typeof(File)]       = new FileParser(container, engine),
            };
        }
        public ClassficatorCategory(WordDbContext wordDbContext, IVocalabry vocalabry)
        {
            _wordDbContext          = wordDbContext;
            _vocalabry              = vocalabry;
            _categoryClassification = new MulticlassSupportVectorLearning <Linear>()
            {
                Learner = (p) => new LinearDualCoordinateDescent()
                {
                    Loss = Loss.L2
                }
            };

            _messages    = InitLearnData();
            EngineParser = new EngineParser(_vocalabry.GetNonPersistentVocalabry());
            InitLearningMachine();
        }
 public PermissionParser(IParserContainer container, IEngineParser engine)
     : base(container, engine)
 {
 }
Example #6
0
 public AccountParser(IParserContainer container, IEngineParser engine)
     : base(container, engine)
 {
 }
Example #7
0
 public FileParser(IParserContainer container, IEngineParser engine)
     : base(container, engine)
 {
 }
 public PrincipalParser(IParserContainer container, IEngineParser engine)
     : base(container, engine)
 {
 }
Example #9
0
 public RootParser(IParserContainer container, IEngineParser engine)
 {
     this.container = container;
     this.engine    = engine;
 }
Example #10
0
 public SecurableParser(IParserContainer container, IEngineParser engine)
     : base(container, engine)
 {
 }