Exemplo n.º 1
0
 def phrase_table(self, language=None):
     """Resource for item name phrase table. This is a repository with phrase
 fingerprints of the item names."""
     if language == None: language = flags.arg.language
     return self.wf.resource("phrase-table.repo",
                             dir=corpora.kbdir(language),
                             format="repository")
Exemplo n.º 2
0
 def name_table(self, language=None):
     """Resource for item name table. This is a repository with all the names
 and the items they are aliases for."""
     if language == None: language = flags.arg.language
     return self.wf.resource("name-table.repo",
                             dir=corpora.kbdir(language),
                             format="repository")
Exemplo n.º 3
0
 def knowledge_base(self):
     """Resource for knowledge base. This is a SLING frame store with frames for
 each Wikidata item and property plus additional schema information.
 """
     return self.wf.resource("kb.sling",
                             dir=corpora.kbdir(),
                             format="store/frame")
Exemplo n.º 4
0
 def items(self):
     """Resource for reconciled items. This is a set of record files where each
 item is represented as a frame.
 """
     return self.wf.resource("*****@*****.**",
                             dir=corpora.kbdir(),
                             format="records/frame")
Exemplo n.º 5
0
 def item_names(self, language=None):
     """Resource for item names in language. This is a set of record files with
 one SLING frame per item.
   <qid>: {
     alias: {
       name: "<alias>"
       lang: /lang/<lang>
       sources: ...
       count: ...
       form: ...
     }
     ...
   }
 """
     if language == None: language = flags.arg.language
     return self.wf.resource("*****@*****.**",
                             dir=corpora.kbdir(language),
                             format="records/alias")
Exemplo n.º 6
0
 def xrefs(self):
   """Resource for store with cross-reference items."""
   return self.wf.resource("xrefs.sling",
                           dir=corpora.kbdir(),
                           format="store/frame")