Ejemplo n.º 1
0
 def open(self, cdb_lu, cdb_syn, verbose=False):
     """
     Open and parse Cornetto database files with counts
     
     @param cdb_lu: xml definition of the lexical units with counts
     @type cdb_lu: file or filename
     @param cdb_syn: xml definition of the synsets
     @type cdb_syn: file or filename
     @keyword verbose: verbose output during parsing
     """
     (self._form2lu, self._c_lu_id2lu, self._c_sy_id2synset, self._graph,
      self._cat2counts) = parse_cdb_with_counts(cdb_lu, cdb_syn, verbose)
Ejemplo n.º 2
0
 def open(self, cdb_lu, cdb_syn, verbose=False):
     """
     Open and parse Cornetto database files with counts
     
     @param cdb_lu: xml definition of the lexical units with counts
     @type cdb_lu: file or filename
     @param cdb_syn: xml definition of the synsets
     @type cdb_syn: file or filename
     @keyword verbose: verbose output during parsing
     """
     ( self._form2lu, 
       self._c_lu_id2lu,
       self._c_sy_id2synset, 
       self._graph,
       self._cat2counts ) = parse_cdb_with_counts(cdb_lu, cdb_syn, verbose)
Ejemplo n.º 3
0
 def _parse(cdb_lu=db_dir + "cdb_lu_minimal_subcounts.xml", 
            cdb_syn=db_dir + "cdb_syn_minimal.xml"):
     global form2lu, c_lu_id2lu, c_sy_id2synset, graph, cat2counts
     form2lu, c_lu_id2lu, c_sy_id2synset, graph, cat2counts = parse_cdb_with_counts(cdb_lu, cdb_syn, verbose=True)
Ejemplo n.º 4
0
 def _parse(cdb_lu=db_dir + "cdb_lu_minimal_subcounts.xml",
            cdb_syn=db_dir + "cdb_syn_minimal.xml"):
     global form2lu, c_lu_id2lu, c_sy_id2synset, graph, cat2counts
     form2lu, c_lu_id2lu, c_sy_id2synset, graph, cat2counts = parse_cdb_with_counts(
         cdb_lu, cdb_syn, verbose=True)