private function doesIgnore($name) { $mediaWikiUtil = MediaWikiUtil::getInstance("http://en.wikipedia.org/wiki/"); $name = $mediaWikiUtil->toCanonicalWikiCase($name); // TODO add patterns to a some config file if (fnmatch("*Citation*", $name)) { return true; } return false; }
public function start($language) { $this->language = $language; $this->parseHintToTripleGenerator = self::createParseHintToTripleGeneratorMap($language); //$this->defaultTripleGenerator = new DefaultTripleGenerator($language); // Initialize database connection if (false == Options::getOption('LiveMappingBased.useTemplateDb')) { $this->templateDb = new DummyTemplateDb(); } else { $odbc = ODBC::getDefaultConnection(); //$odbc = new ODBC("VOS", "dbpedia", "dbpedia"); $this->templateDb = new TemplateDb($odbc); } // Initialize the template name filter $this->templateNameFilter = new AndCompoundFilter(array(new LegacyTemplateFilter(), new TemplateFilter())); $mediaWikiUtil = MediaWikiUtil::getInstance("http://en.wikipedia.org/wiki/"); $this->rootTripleGenerator = new RootTripleGenerator($this->language, $this->templateNameFilter, $this->templateDb, $this->parseHintToTripleGenerator, $mediaWikiUtil); }
public function __construct($basePath) { $this->parser = new SmartLinkValueParser(); $this->basePath = $basePath; $this->mediaWikiUtil = MediaWikiUtil::getInstance("http://en.wikipedia.org/wiki/"); }