Пример #1
0
 protected function initNewStyle(phpMorphy_FilesBundle $bundle, $options)
 {
     $this->options = $options = $this->repairOptions($options);
     $storage_type = $options['storage'];
     $storage_factory = $this->storage_factory = $this->createStorageFactory($options['shm']);
     $graminfo_as_text = $this->options['graminfo_as_text'];
     // fsa
     $this->common_fsa = $this->createFsa($storage_factory->open($storage_type, $bundle->getCommonAutomatFile(), false), false);
     // lazy
     $this->predict_fsa = $this->createFsa($storage_factory->open($storage_type, $bundle->getPredictAutomatFile(), true), true);
     // lazy
     // graminfo
     $graminfo = $this->createGramInfo($storage_factory->open($storage_type, $bundle->getGramInfoFile(), true), $bundle);
     // lazy
     // gramtab
     $gramtab = $this->createGramTab($storage_factory->open($storage_type, $graminfo_as_text ? $bundle->getGramTabFileWithTextIds() : $bundle->getGramTabFile(), true));
     // always lazy
     // common source
     //$this->__common_source = $this->createCommonSource($bundle, $this->options['common_source']);
     $this->helper = $this->createMorphierHelper($graminfo, $gramtab, $graminfo_as_text, $bundle);
 }